feat: handle duplicate files from multiple packages deterministically#550
Merged
punkwalker merged 5 commits intocnoe-io:mainfrom Nov 12, 2025
Merged
feat: handle duplicate files from multiple packages deterministically#550punkwalker merged 5 commits intocnoe-io:mainfrom
punkwalker merged 5 commits intocnoe-io:mainfrom
Conversation
Signed-off-by: suwhang-cisco <suwhang@cisco.com>
Signed-off-by: suwhang-cisco <suwhang@cisco.com>
Signed-off-by: suwhang-cisco <suwhang@cisco.com>
Contributor
|
/e2e |
Signed-off-by: suwhang-cisco <suwhang@cisco.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to the issue: #548
Currently, when we pass in multiple packages to
idpbuilder createe.g.where both packages have the same yaml files:
idpbuilder will be re-queuing both files in Gitea multiple times until sync is complete, causing race condition and indeterministic behaviour which file ends up in the cluster.
As
ref-implementationis a package that contains all core elements for the idpbuilder cluster to be functional, it is useful for other packages to be built on top. However, there are cases where other packages would require to modify some of the existing applications in ref-implementation such as bringing their own customised backstage.The fix I propose in this PR adds new label
"cnoe.io/package-priority"to rank the order of packages and let the later packages higher priority, much like how helm values files work. It then uses this priority to determine if the package should be written in Gitea and reconciled or not.This is Gitea experiencing multiple re-syncing between the duplicate files in current idpbuilder:

New idpbuilder binary with the fix only updates the file once with the highest priority package:
