-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add imports
to stack output. Add stacks
to each component output
#24
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! I just made one minor comment that you might want to consider.
@@ -39,29 +53,38 @@ func ProcessYAMLConfigFiles(filePaths []string) ([]string, error) { | |||
// ProcessYAMLConfigFile takes a path to a YAML config file, | |||
// recursively processes and deep-merges all imports, | |||
// and returns stack config as map[interface{}]interface{} | |||
func ProcessYAMLConfigFile(filePath string) (map[interface{}]interface{}, error) { | |||
func ProcessYAMLConfigFile(filePath string, importsList *[]string) (map[interface{}]interface{}, *[]string, 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.
Do you really want a pointer here? I would consider passing by value unless there is a strong reason. It makes unexpected side-effects less likely.
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.
it's uses recursion, and by-value did not work (it was losing data b/w the recursion steps)
what
imports
to stack outputstacks
to each component outputwhy
imports
attribute shows all imported stacks for the current stack - can be used in CI/CD pipelines to determine stack dependenciesstacks
attribute shows all the stacks the component (and its base component, if present) is declared in - can be used in CI/CD pipelines (e.g. Spacelift) to determine all stacks that the component depends on,and to provision triggers for all the dependencies (once any of the stack config files changes, the component's job will be triggered)
test