Skip to content

feat(autopatch): only delete versionissue links when no component ins…#1229

Merged
MR2011 merged 2 commits into
mainfrom
fix/data-inconsistency
Jun 19, 2026
Merged

feat(autopatch): only delete versionissue links when no component ins…#1229
MR2011 merged 2 commits into
mainfrom
fix/data-inconsistency

Conversation

@drochow

@drochow drochow commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 19, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the MariaDB autopatch cleanup flow so that ComponentVersionIssue links are only removed when a component version is actually safe to delete (i.e., when it has no remaining component instances).

Changes:

  • Removed the unconditional “remove all issues from component versions” step during autopatch processing.
  • Moved issue-link removal to occur alongside component version deletion when the version has no remaining instances.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 283 to 293
if len(res) == 0 {
for vIdDi := range versionIdsOfDisappearedInstances {
if err := s.RemoveAllIssuesFromComponentVersion(vIdDi); err != nil {
return err
}
}
if err := s.DeleteComponentVersion(vIdDi, util.SystemUserId); err != nil {
return err
}

}
@MR2011 MR2011 merged commit 6f0f3cb into main Jun 19, 2026
9 of 11 checks passed
@MR2011 MR2011 deleted the fix/data-inconsistency branch June 19, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants