Starting to many add MU at the same try create issues#1891
Draft
maximenoel8 wants to merge 3 commits intoSUSE:masterfrom
Draft
Starting to many add MU at the same try create issues#1891maximenoel8 wants to merge 3 commits intoSUSE:masterfrom
maximenoel8 wants to merge 3 commits intoSUSE:masterfrom
Conversation
e6377f7 to
3bd6c34
Compare
3bd6c34 to
e55ba45
Compare
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.
Context
Recent improvements to the
reposyncmethod have exposed a pre-existing issue where custom channels were not being correctly synced. This bug was previously hidden because the old method always reported success, masking failures silently.The root cause is that multiple custom repository syncs are launched in parallel, but the underlying download process is sequential. When too many syncs are queued simultaneously, they hit the 10-minute timeout and fail. The consequence is that packages from custom channels may be missing when bootstrapped, leading to unreliable tests.
What does this PR do?
Introduces a throttling mechanism to limit the number of concurrent custom repository syncs to 5 at a time.
Approaches considered:
java.util.concurrent.Semaphore— the cleanest solution, but rejected by Jenkins script security sandbox:Lockable Resources plugin (
lock(resource: ..., quantity: 5)) — would be ideal, but requires admin rights to pre-configure the resource pool in Jenkins.synchronizedcounter withwaitUntil— the chosen approach. A shared counter protected by asynchronizedblock ensures at most 5 syncs run concurrently. Atry/finallyguarantees the counter is always decremented even on failure, preventing deadlocks. The throttling logic is extracted into a reusablewithThrottle {}closure to keep the stage code clean.Impact