Skip to content
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

Set default namespace for go config for configless of get/try/require #4802

Merged
merged 2 commits into from
Jun 12, 2020

Conversation

EvanBoyle
Copy link
Contributor

@EvanBoyle EvanBoyle commented Jun 11, 2020

Fixes #4296

As far as I can tell, other languages don't expose the config-less form of get/try/require methods. Exposing these in go was probably a bug, but given that removing them would be breaking this is the next best thing.

This change reverses the logic used in the "pulumi config set" command:

func parseConfigKey(key string) (config.Key, error) {

Given that you can't set a "namespace-less" config key, this change seems correct. Updated the integration test coverage to include this behavior.

@pgavlin
Copy link
Member

pgavlin commented Jun 12, 2020

Given that you can set a "namespace-less" config key, this change seems correct.

Should this read "cannot set a namespace-less" config key? Otherwise this is a breaking change, no?

@EvanBoyle
Copy link
Contributor Author

@pgavlin Yes, that is a typo. You cannot set a "namespace-less" key. The code linked here automatically prepends the project if it doesn't find the separator token :

func parseConfigKey(key string) (config.Key, error) {

@EvanBoyle EvanBoyle merged commit fa69a31 into master Jun 12, 2020
@pulumi-bot pulumi-bot deleted the evan/goConfigDefaultNamespace branch June 12, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Go config doesn't implicitly use current project
2 participants