New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow pulumi destroy -s <stack>
if not in a pulumi project dir
#9918
Conversation
…i project directory
/run-integration-tests |
Please view the results of the PR Build + Integration Tests Run Here |
sm, err := getStackSecretsManager(s) | ||
if err != nil { | ||
return result.FromError(fmt.Errorf("getting secrets manager: %w", err)) | ||
// fallback on snapshot SecretsManager | ||
sm = snap.SecretsManager | ||
} | ||
|
||
cfg, err := getStackConfiguration(s, sm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
efb0bb8
to
dd33c7b
Compare
@@ -171,7 +171,8 @@ func GetEnvironmentTagsForCurrentStack() (map[apitype.StackTagName]string, error | |||
// Tags based on Pulumi.yaml. | |||
projPath, err := workspace.DetectProjectPath() | |||
if err != nil { | |||
return nil, err | |||
// No current stack return empty | |||
return make(map[apitype.StackTagName]string), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This swallows err
perhaps a change to log it instead? Slightly suspicious here
workspace.DetectProjectPath()
may return "", nil
which does return GetEnvironmentTagsForCurrentStack = empty
even before the changes, but the change is still needed to ignore an error. What's the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will think more on this.
I've re-tested the example that used to panic.
And it passes on top of the latest changes. So that's good. Changes LGTM. Do you know what's going on with the failing CI? Also would need a CHANGELOG entry. Thank you. |
Description
second time's the charm
Fixes #2440
Checklist