Skip to content

fix: container repo deletion protection for scoped variables - #7078

Merged
bhupesh-devtron merged 1 commit into
developfrom
fix/container-repo-deletion-protection
Nov 5, 2026
Merged

bhupesh-devtron merged 1 commit into
developfrom
fix/container-repo-deletion-protection

Conversation

@bhupesh-devtron

@bhupesh-devtron bhupesh-devtron commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2992

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@bito-code-review

Copy link
Copy Markdown

Bito Automatic Review Skipped - Draft PR

Bito didn't auto-review because this pull request is in draft status.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change draft PR review settings here, or contact your Bito workspace admin at shivam@devtron.ai.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

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>
@bhupesh-devtron
bhupesh-devtron force-pushed the fix/container-repo-deletion-protection branch from 77ad378 to dce912d Compare November 3, 2026 11:50
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@bhupesh-devtron
bhupesh-devtron merged commit 6f19e08 into develop Nov 5, 2026
9 of 10 checks passed
@bhupesh-devtron
bhupesh-devtron deleted the fix/container-repo-deletion-protection branch November 5, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants