Feature proposal: dynamic state IDs based on an input variable
See original GitHub issueThis was called out as “nice to have” but not delivered in the initial iteration of auto-generated state IDs for meltano run
.
For scenarios where the ‘environment’ actually builds to multiple deploy targets, such as one per customer or one per CI/CD build number or one per CI/CD branch name, it would be great to have a configurable and dynamic state ID suffix
that could take one or more inputs, and use those inputs to ensure a unique set of STATE ID refs when running via meltano run
.
Today state IDs are generated like:
${environment_name}:${tap-name}-to-${target-name}
But we could add some per-environment setting such as state_id_suffix
or deploy_target_key
which would concatenate with the base state ID calc:
${environment_name}:${tap-name}-to-${target-name}:${suffix_str}
Taking the branch names example, and an environment name called cicd
, this could look like the following:
cicd:tap-github-to-target-snowflake:main
cicd:tap-github-to-target-snowflake:develop
cicd:tap-github-to-target-snowflake:staging
cicd:tap-github-to-target-snowflake:feat/my-cool-feature
cicd:tap-github-to-target-snowflake:fix/my-super-important-fix
Where each of these variations are basically populated with some input like CI_BRANCH_REF
.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:12
Top GitHub Comments
@ReubenFrankel can you update your PR to close this issue as well once the PR is merged? 😄
This is looking very exciting. Thank you all who contributed to this feature. Really looking forward to trying it out. Thanks