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
Deprecate Config, replace with StackConfigDir #9145
Conversation
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.
lgtm, the lints & question I asked are non-blocking
sdk/go/common/workspace/project.go
Outdated
|
||
// StacksDirectory indicates where to store the Pulumi.<stack-name>.yaml files, combined with the folder | ||
// Pulumi.yaml is in. | ||
StacksDirectory string `json:"stacksDirectory,omitempty" yaml:"stacksDirectory,omitempty"` |
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.
only comment here is for such a visible change which will need to be reflected in docs, might want to get wider feedback on the name. up to you
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.
Yes, I want to get a few OKs on this before committing to this name.
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.
StackConfigFilesPath
? Might be a little clearer, since we're pointing to config files, not the stacks themselves (obviously).
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.
Thinking off Josh's comment, maybe this should be "ConfigDirectory"? It used to just be called Config, how much do we need to make it clear its for stacks config?
Other ideas, "Stack[s]ConfigDirectory". "Dir" or "FilesPath" instead of "Directory"?
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.
@Frassle What's the proper term for Pulumi.yaml
versus Pulumi.stackname.yaml
?
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.
shrug "Project settings file" and "stack config file" I think.
@pgavlin or @lukehoban might have a definitive answer to that.
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.
In our docs - these are currently "project file" and "stack configuration file". (Though this page includes a weird title that I feel like we should change "Project Configuration Reference").
From that page - the description of the current option is:
config
: (optional) directory to store stack-specific configuration files, relative to location ofPulumi.yaml
.
Here's suggestions in my order of preference:
stackConfigDir
stackDir
stackConfigPath
stackPath
stacksDir
stacksPath
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.
stackConfigDir seems fine to me, will update.
Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
Co-authored-by: Vlad Gorodetsky <v@gor.io>
// Back compat: If StacksDirectory is not present and Config is given and it's a non-empty string use it | ||
// for the stacks directory. | ||
if hasConfigValue { | ||
return filepath.Join(filepath.Dir(projPath), configValue, fileName), 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.
Should we issue a deprecation warning, suggesting that the user switches to use StacksDirectory
?
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.
I wasn't sure how well that would display, this is called into from a few different places.
Do we have an issue to track the docs update? |
No but I was planning on doing that, I'll update the title as suggested by Luke as well. |
Mirror the changes to the Go SDK made in pulumi#9145 (2b3fbdb)
Description
We want to re-purpose the config key for hierarchical config, but currently it's used to set the directory to store stack config in. This adds a new property to specify the stacks directory (
stacksDirectory
, name open to change) but maintains backwards comparability by also checking ifconfig
is a non-empty string and using that if set.Relates to #2307
Checklist