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
Hierarchical and structured config implementation: the initial pass #10832
Changes from 27 commits
6c6b5ce
683f7e1
f659376
966e96f
aa648fd
dff4079
6531b66
d419605
02bdbd0
7975498
78ecb2b
969e0e6
0498be1
65cfee4
5bd9b80
fbc68cb
77c7880
ae03899
46be886
2755638
afeac6e
9a9a39b
c739adb
4cb2c19
37730d4
00f4ba3
813ac76
7c509d2
0766b86
12f3992
c606757
42a51fe
51b1329
fb11347
58de26d
f2ac21f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
changes: | ||
- type: feat | ||
scope: cli | ||
description: Implement initial MVP for hierarchical and structured project configuration | ||
Frassle marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,16 @@ func NewPassphraseSecretsManager(stackName tokens.Name, configFile string, | |
rotatePassphraseSecretsProvider bool) (secrets.Manager, error) { | ||
contract.Assertf(stackName != "", "stackName %s", "!= \"\"") | ||
|
||
info, err := workspace.LoadProjectStack(configFile) | ||
project, path, err := workspace.DetectProjectStackPath(stackName.Q()) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if configFile == "" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm we might need to clean up this configFile global before merging this, it's a global injection used by tests so they don't actually have to have a Pulumi..yaml setup, but given we now need Pulumi.yaml and Pulumi..yaml it might be simpler to just clean up the tests rather than rely on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right I've cleaned up configFile now on master, so it should always set here. |
||
configFile = path | ||
} | ||
|
||
info, err := workspace.LoadProjectStack(project, configFile) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,16 @@ import ( | |
func NewServiceSecretsManager(s Stack, stackName tokens.Name, configFile string) (secrets.Manager, error) { | ||
contract.Assertf(stackName != "", "stackName %s", "!= \"\"") | ||
|
||
info, err := workspace.LoadProjectStack(configFile) | ||
project, path, err := workspace.DetectProjectStackPath(stackName.Q()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above, configFile should always be set here. |
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if configFile == "" { | ||
configFile = path | ||
} | ||
|
||
info, err := workspace.LoadProjectStack(project, configFile) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
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.