Skip to content

Conversation

@0xavi0
Copy link
Contributor

@0xavi0 0xavi0 commented Dec 1, 2025

  • Change GitRepo deletion.

This PR introduces changes to how GitRepos are deleted, as well as their dependent resources.

Two main changes are introduced:

  • The function that deletes the GitRepo has been modified to check for any pending resources, especially Bundles and ImageScans, since previously the GitRepo was removed before these resources were fully deleted.

  • A new controller is introduced for Content resources to track the number of BundleDeployments that reference the same one. This controller aims to eliminate the conflicts that occurred when updating or deleting BundleDeployments, as they were being updated or removed concurrently while modifying a shared Content resource.

With these changes, the goal is to eliminate both update conflicts (which triggered additional Reconcile calls in the controllers) and potential race conditions when deleting and recreating GitRepos that still had dependent resources pending deletion.


Refers to #4389
Backport of: #4389

Additional Information

Checklist

- [ ] I have updated the documentation via a pull request in the
fleet-docs repository.

* Change GitRepo deletion.

This PR introduces changes to how GitRepos are deleted, as well as their dependent resources.

Two main changes are introduced:

* The function that deletes the GitRepo has been modified to check for any pending resources, especially *Bundles* and *ImageScans*, since previously the *GitRepo* was removed before these resources were fully deleted.

* A new controller is introduced for *Content* resources to track the number of *BundleDeployments* that reference the same one.
  This controller aims to eliminate the conflicts that occurred when updating or deleting *BundleDeployments*, as they were being updated or removed concurrently while modifying a shared *Content* resource.

With these changes, the goal is to eliminate both update conflicts (which triggered additional Reconcile calls in the controllers) and potential race conditions when deleting and recreating *GitRepos* that still had dependent resources pending deletion.

---------

Signed-off-by: Xavi Garcia <[email protected]>
@0xavi0 0xavi0 added this to the v2.13.1 milestone Dec 1, 2025
@0xavi0 0xavi0 self-assigned this Dec 1, 2025
@0xavi0 0xavi0 added this to Fleet Dec 1, 2025
@0xavi0 0xavi0 marked this pull request as ready for review December 1, 2025 09:40
@0xavi0 0xavi0 requested a review from a team as a code owner December 1, 2025 09:40
@thardeck thardeck merged commit 3213051 into rancher:release/v0.14 Dec 1, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this to ✅ Done in Fleet Dec 1, 2025
@0xavi0 0xavi0 changed the title Change GitRepo deletion. (#4361) [v0.14] - Change GitRepo deletion. (#4361) Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants