Skip to content

Fix detection of component dependencies - #134

Merged
Andriy Knysh (aknysh) merged 1 commit into
masterfrom
update-11
Apr 14, 2022
Merged

Andriy Knysh (aknysh) merged 1 commit into
masterfrom
update-11

Conversation

@aknysh

Copy link
Copy Markdown
Member

what

  • Fix detection of component dependencies for imported YAML config files

why

  • If a file was imported and did not contain a vars section, global or related to the component, the imported file was not included in the component dependencies (deps section), and a Spacelift label for the file was not created (if the imported file changes, Spacelift would not notice the change and would not run the stack)
  • Update the dependencies logic to check for these sections: backend, backend_type, env, remote_state_backend, remote_state_backend_type, settings or vars
// Component depends on the imported config file if any of the following conditions is true:
// 1. The imported file has any of the global `backend`, `backend_type`, `env`, `remote_state_backend`, `remote_state_backend_type`, `settings` or `vars` sections which are not empty
// 2. The imported file has the component type section, which has any of the `backend`, `backend_type`, `env`, `remote_state_backend`, `remote_state_backend_type`, `settings` or `vars` sections which are not empty
// 3. The imported config file has the "components" section, which has the component type section, which has the component section
// 4. The imported config file has the "components" section, which has the component type section, which has the base component section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A minor, backward compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants