A variable referenced only in a Container Repository field (app-level
ci_template or a pipeline's ci_template_override) had no entry in
variable_entity_mapping, so deletion protection never saw it as in use.
Deleting such a variable silently succeeded and broke the app's next build.
- Track usage on save/update (CiTemplateService), including the CI_JOB
app-level sync path in BuildPipelineConfigService that updates
ci_template_override directly.
- Exclude a pipeline's override from the liveness check once its Docker
Config Override is turned off, even though the override row itself
stays active in the DB.
- Backfill mappings for Container Repository values saved before this
change shipped.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Description
Fixes https://github.com/devtron-labs/sprint-tasks/issues/2992
Checklist:
Does this PR introduce a user-facing change?