Skip to content

fix(gradle): Handle changing collections in init script#11589

Draft
Juli0q wants to merge 1 commit intooss-review-toolkit:mainfrom
boschglobal:fix/gradle-concurrent-modification
Draft

fix(gradle): Handle changing collections in init script#11589
Juli0q wants to merge 1 commit intooss-review-toolkit:mainfrom
boschglobal:fix/gradle-concurrent-modification

Conversation

@Juli0q
Copy link
Contributor

@Juli0q Juli0q commented Mar 20, 2026

Process configurations and repositories until no new entries are found instead of iterating live collections directly or taking a single snapshot. This avoids concurrent modification issues while still picking up configurations and repositories that are added during resolution.

@Juli0q Juli0q force-pushed the fix/gradle-concurrent-modification branch from 8494857 to 81a59c2 Compare March 20, 2026 13:32
@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.40%. Comparing base (ac51bff) to head (64ff236).

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11589   +/-   ##
=========================================
  Coverage     58.40%   58.40%           
  Complexity     1758     1758           
=========================================
  Files           355      355           
  Lines         13219    13219           
  Branches       1314     1314           
=========================================
  Hits           7721     7721           
  Misses         5008     5008           
  Partials        490      490           
Flag Coverage Δ
test-ubuntu-24.04 42.44% <ø> (ø)
test-windows-2025 42.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Process configurations and repositories until no new entries are found
instead of iterating live collections directly or taking a single
snapshot. This avoids concurrent modification issues while still picking
up configurations and repositories that are added during resolution.

Signed-off-by: Julian Olderdissen <[email protected]>
@Juli0q Juli0q force-pushed the fix/gradle-concurrent-modification branch from 81a59c2 to 64ff236 Compare March 23, 2026 15:29
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

class GradleConcurrentModificationFunTest : FunSpec({

Check warning

Code scanning / QDJVM

Unused symbol Warning

Class "GradleConcurrentModificationFunTest" is never used
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

class GradleLateRepositoryFunTest : FunSpec({

Check warning

Code scanning / QDJVM

Unused symbol Warning

Class "GradleLateRepositoryFunTest" is never used
@Juli0q Juli0q changed the title fix(gradle): Avoid ConcurrentModificationException in init script fix(gradle): Handle changing collections in init script Mar 23, 2026
@sschuberth
Copy link
Member

Just wondering @Juli0q: Does it really make sense to address this in the "legacy" Gradle analyzer still? Does the issue even appear with GradleInspector?

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