Skip to content

Use versionCompatibility in Renovate for Spock variants#2321

Merged
leonard84 merged 2 commits intomasterfrom
vampire/renovate-version-compatibility
Mar 19, 2026
Merged

Use versionCompatibility in Renovate for Spock variants#2321
leonard84 merged 2 commits intomasterfrom
vampire/renovate-version-compatibility

Conversation

@Vampire
Copy link
Copy Markdown
Member

@Vampire Vampire commented Mar 13, 2026

Summary by CodeRabbit

  • Chores
    • Simplified dependency compatibility configuration for more efficient version management.

Copy link
Copy Markdown
Member Author

Vampire commented Mar 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 90688342-cc22-4a02-8702-95f6dfb09c70

📥 Commits

Reviewing files that changed from the base of the PR and between 9c6342c and 410d699.

📒 Files selected for processing (1)
  • .github/renovate.json5

📝 Walkthrough

Walkthrough

Simplifies renovate configuration by replacing three explicit Spock Groovy version compatibility blocks (groovy-3.0, groovy-4.0, groovy-5.0) with a single regex-based versionCompatibility pattern for org.spockframework:spock- package, reducing configuration lines from 12 to 1.

Changes

Cohort / File(s) Summary
Renovate Configuration
.github/renovate.json5
Consolidates three separate groovy version compatibility rules into one regex-based pattern (versionCompatibility: "^(?<version>.*)-(?<compatibility>groovy-.*)$"), removing explicit matchCurrentVersion and allowedVersions entries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Poem

A rabbit hops through config lands,
Trimming rules with careful hands,
One regex pattern, clean and sleek,
Replaces three in just one week, 🐰
Less to maintain, more to applaud!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing multiple version blocks with a single versionCompatibility rule in the Renovate configuration for Spock.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vampire/renovate-version-compatibility
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 13, 2026

Greptile Summary

This PR simplifies the Renovate configuration for org.spockframework:spock-* packages by replacing three separate explicit version-matching rules (one each for groovy-3.0, groovy-4.0, and groovy-5.0) with a single versionCompatibility regex rule that dynamically extracts the Groovy compatibility tier from the version string.

  • Cleaner config: Three nearly-identical rules collapsed into one, reducing maintenance overhead.
  • Forward-compatible: Future Groovy versions (e.g. groovy-6.0, groovy-7.0) are automatically handled without any config changes — previously, each new Groovy release would require a new rule.
  • Broader coverage: The old config had no rule covering groovy-2.5 variants; the new single rule implicitly covers all suffix patterns matching the regex.
  • Regex correctness verified: ^(?<version>.*)-(?<compatibility>groovy-.*)$ correctly parses all known Spock version formats, including milestone releases like 2.5-M1-groovy-4.0 (splits to version=2.5-M1, compatibility=groovy-4.0), relying on regex backtracking to find the last -groovy- boundary.
  • Behavioral equivalence: Renovate's versionCompatibility feature natively enforces that updates are only proposed within the same compatibility group, achieving the same semantic constraint the old matchCurrentVersion + allowedVersions approach provided.

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure Renovate config simplification with no production code impact.
  • The change is confined to a single Renovate configuration file. The replacement regex has been verified correct for all known Spock version string formats (release, milestone, and all Groovy variants). The versionCompatibility feature is the idiomatic Renovate mechanism for exactly this use case. The new rule is strictly more general than the three rules it replaces, adding forward-compatibility for future Groovy versions at no cost. No logic, runtime, security, or build issues were identified.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/renovate.json5 Replaces three explicit groovy-version rules with a single versionCompatibility regex, correctly grouping Spock package updates by groovy compatibility tier; regex has been verified correct for all known version string formats.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Renovate scans for updates\nto org.spockframework:spock-*] --> B{versionCompatibility regex\napplied to each version string}
    B --> C["Parse: ^(?&lt;version&gt;.*)-(?&lt;compatibility&gt;groovy-.*)$"]
    C --> D["e.g. 2.3.0-groovy-4.0\n→ version: 2.3.0\n→ compatibility: groovy-4.0"]
    C --> E["e.g. 2.5-M1-groovy-3.0\n→ version: 2.5-M1\n→ compatibility: groovy-3.0"]
    D --> F{Group by compatibility tier}
    E --> F
    F --> G["groovy-3.0 group\nOnly proposes updates within\nsame groovy-3.0 versions"]
    F --> H["groovy-4.0 group\nOnly proposes updates within\nsame groovy-4.0 versions"]
    F --> I["groovy-5.0 group\nOnly proposes updates within\nsame groovy-5.0 versions"]
    F --> J["groovy-N.0 group\nAuto-handled for any\nfuture Groovy versions"]
Loading

Last reviewed commit: 410d699

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.16%. Comparing base (6eafb3d) to head (3b3ed21).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2321   +/-   ##
=========================================
  Coverage     82.16%   82.16%           
+ Complexity     4824     4823    -1     
=========================================
  Files           472      472           
  Lines         15036    15036           
  Branches       1905     1905           
=========================================
+ Hits          12354    12355    +1     
  Misses         1989     1989           
+ Partials        693      692    -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leonard84 leonard84 enabled auto-merge (squash) March 19, 2026 11:33
@testlens-app
Copy link
Copy Markdown

testlens-app bot commented Mar 19, 2026

🚨 TestLens detected 1 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Check Project/Task Test Runs
Verify Branches and PRs / Build and Verify (4.0, 8, windows-latest) :spock-specs:test AsyncConditionsSpec > passing example - check passes

🏷️ Commit: 3b3ed21
▶️ Tests: 8227 executed
⚪️ Checks: 61/61 completed

Test Failure

AsyncConditionsSpec > passing example - check passes (:spock-specs:test in Verify Branches and PRs / Build and Verify (4.0, 8, windows-latest))
Async conditions timed out after 1.00 seconds; 1 out of 1 evaluate blocks did not complete in time
	at spock.util.concurrent.AsyncConditions.await(AsyncConditions.java:143)
	at spock.util.concurrent.AsyncConditions.await(AsyncConditions.java:121)
	at spock.util.concurrent.AsyncConditionsSpec.passing example - check passes(AsyncConditionsSpec.groovy:34)

Muted Tests

Select tests to mute in this pull request:

  • AsyncConditionsSpec > passing example - check passes

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@leonard84 leonard84 merged commit 4e265f4 into master Mar 19, 2026
65 of 66 checks passed
@leonard84 leonard84 deleted the vampire/renovate-version-compatibility branch March 19, 2026 11:48
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