Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run credentials validation only once (#2949)
This should address the error duplication reported in #2285 as suggested by @t0yv0. We now have a global counter which guard the credentials check and makes sure we only run it once. For testing, I ran a few programs both with and without errors and it does seem to do the right thing. ``` Previewing update (dedev) View in Browser (Ctrl+O): https://app.pulumi.com/venelin-pulumi-corp/aws_bucket_go/dedev/previews/88831526-f63f-42f2-98d9-957fbea78fc0 Type Name Plan Info pulumi:pulumi:Stack aws_bucket_go-dedev 4 war └─ pulumi:providers:aws default 1 err Diagnostics: pulumi:providers:aws (default): error: rpc error: code = Unknown desc = unable to validate AWS credentials. Details: No valid credential sources found. Please see https://www.pulumi.com/registry/packages/aws/installation-configuration/ for more information about providing credentials. Error: failed to refresh cached credentials, failed to read cached SSO token file, open /Users/vvm/.aws/sso/cache/55357933a7310d2db90c3fa1ed0970a7bb34ed39.json: no such file or directory Make sure you have set your AWS region, e.g. `pulumi config set aws:region us-west-2`. pulumi:pulumi:Stack (aws_bucket_go-dedev): warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go warning: using pulumi-resource-aws from $PATH at /Users/vvm/code/pulumi-aws/bin/pulumi-resource-aws warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go warning: using pulumi-resource-aws from $PATH at /Users/vvm/code/pulumi-aws/bin/pulumi-resource-aws ```
- Loading branch information