Skip to content

fix: Fix snapshot camel-test#2881

Merged
Periecle merged 3 commits intodevelopfrom
feature/fix-snapshot
Apr 15, 2026
Merged

fix: Fix snapshot camel-test#2881
Periecle merged 3 commits intodevelopfrom
feature/fix-snapshot

Conversation

@Periecle
Copy link
Copy Markdown
Collaborator

@Periecle Periecle commented Apr 15, 2026

Summary by CodeRabbit

  • Chores
    • Added an automated CI validation that detects pre-release (SNAPSHOT) dependencies, surfaces errors in the workflow output, and fails the build when such dependencies are present.
    • Strengthened dependency management across modules by explicitly pinning a test dependency version and adding an enforcement rule to ensure consistent, non-SNAPSHOT version resolution.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 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: 5e6dd084-6ec6-4005-9bf2-6c5c0da1651a

📥 Commits

Reviewing files that changed from the base of the PR and between d98c562 and 8f6e157.

📒 Files selected for processing (3)
  • .github/workflows/maven.yml
  • embedded-kafka/pom.xml
  • pom.xml
✅ Files skipped from review due to trivial changes (3)
  • embedded-kafka/pom.xml
  • pom.xml
  • .github/workflows/maven.yml

📝 Walkthrough

Walkthrough

The changes add CI and build-time safeguards against SNAPSHOT dependencies: a GitHub Actions step scans the effective POM and fails the job if any SNAPSHOTs are found; the root POM enforcer adds a requireReleaseDeps rule; embedded-kafka/pom.xml pins org.apache.camel:camel-test to the release camel.version.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/maven.yml
Added a pre-build step that runs ./mvnw help:effective-pom (quiet, no transfers), greps for SNAPSHOT, emits a ::error:: annotation with matching lines and exits non‑zero when matches exist; otherwise proceeds to existing Maven build.
Root POM - Enforcer
pom.xml
Added maven-enforcer-plugin requireReleaseDeps rule to reject SNAPSHOT dependencies (message: "SNAPSHOT dependencies are not allowed.") with onlyWhenRelease=false and failWhenParentIsSnapshot=false.
Dependency Management Override
embedded-kafka/pom.xml
Added an explicit dependencyManagement entry for org.apache.camel:camel-test pinned to ${camel.version} to ensure the test dependency aligns with the release version.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hops and checks across the tree,
I sniffed out SNAPSHOTs, set them free.
CI guards and POMs in tune,
No loose versions under the moon.
🥕

🚥 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 'fix: Fix snapshot camel-test' accurately reflects the main change: addressing a snapshot dependency issue with camel-test through Maven enforcer plugin configuration and explicit dependency management.
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
  • Commit unit tests in branch feature/fix-snapshot

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/maven.yml:
- Around line 58-64: The pipeline masks failures of the ./mvnw
help:effective-pom command by attaching "|| true" to the whole pipeline;
separate the commands so the Maven invocation runs normally and its failure
propagates, then pipe its output to grep "SNAPSHOT" with "|| true" applied only
to grep; update the SNAPSHOTS assignment logic (referencing the ./mvnw
help:effective-pom invocation and the SNAPSHOTS variable) so that if ./mvnw
fails the workflow exits with an error instead of treating SNAPSHOTS as empty.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5634fd72-3b7b-4118-89d6-4bd48b0aa458

📥 Commits

Reviewing files that changed from the base of the PR and between 0a17e29 and d98c562.

📒 Files selected for processing (3)
  • .github/workflows/maven.yml
  • embedded-kafka/pom.xml
  • pom.xml

Comment thread .github/workflows/maven.yml Outdated
@Periecle Periecle added the bug label Apr 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.45%. Comparing base (da1bf2d) to head (bccaced).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2881   +/-   ##
==========================================
  Coverage      82.45%   82.45%           
  Complexity       694      694           
==========================================
  Files            205      205           
  Lines           3135     3135           
  Branches         146      146           
==========================================
  Hits            2585     2585           
  Misses           481      481           
  Partials          69       69           

☔ 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.

@Periecle Periecle force-pushed the feature/fix-snapshot branch from d98c562 to 2991e1d Compare April 15, 2026 07:55
@Periecle Periecle merged commit c0f61c7 into develop Apr 15, 2026
7 checks passed
@Periecle Periecle deleted the feature/fix-snapshot branch April 15, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants