chore(ci): Fix parent POM dependency change detection#22022
Merged
Conversation
The detect-dependencies action was not finding affected modules because
it searched for ${property-name} references in module pom.xml files.
This never matches because modules inherit managed versions from the
parent without referencing the property directly.
New approach:
1. Detect changed properties in parent/pom.xml diff
2. Map each property to the artifact(s) it versions in dependencyManagement
3. Find modules that depend on those artifacts by searching for artifactId
4. Run tests for affected modules
Also adds:
- PR comment posting with test results summary
- Step summary output
- Proper skip-mvnd-install input in action.yaml
- Run only on non-experimental matrix (skip JDK 25)
- Remove overly restrictive version|dependency|artifact filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Instead of grepping pom.xml files for artifactId references (which misses transitive dependencies), use toolbox:tree-find to scan the full dependency tree of every module in the reactor. This accurately detects modules affected by BOM version bumps (e.g., netty-bom -> all modules using any io.netty artifact transitively). Key changes: - Extract groupId:artifactId from parent pom (not just artifactId) - Detect BOM imports and search by groupId wildcard - Use awk to parse toolbox output (mvnd strips module prefixes when captured to variables) - Add coverage to exclusion list Tested locally: jaxb-impl-version correctly finds camel-parquet-avro (transitive via hadoop-common -> jersey-json -> jaxb-impl). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vignesh-manel
pushed a commit
to vignesh-manel/camel
that referenced
this pull request
Mar 18, 2026
* chore(ci): Fix parent POM dependency change detection
The detect-dependencies action was not finding affected modules because
it searched for ${property-name} references in module pom.xml files.
This never matches because modules inherit managed versions from the
parent without referencing the property directly.
New approach:
1. Detect changed properties in parent/pom.xml diff
2. Map each property to the artifact(s) it versions in dependencyManagement
3. Find modules that depend on those artifacts by searching for artifactId
4. Run tests for affected modules
Also adds:
- PR comment posting with test results summary
- Step summary output
- Proper skip-mvnd-install input in action.yaml
- Run only on non-experimental matrix (skip JDK 25)
- Remove overly restrictive version|dependency|artifact filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(ci): Use Maveniverse Toolbox for accurate dependency detection
Instead of grepping pom.xml files for artifactId references (which
misses transitive dependencies), use toolbox:tree-find to scan the
full dependency tree of every module in the reactor.
This accurately detects modules affected by BOM version bumps (e.g.,
netty-bom -> all modules using any io.netty artifact transitively).
Key changes:
- Extract groupId:artifactId from parent pom (not just artifactId)
- Detect BOM imports and search by groupId wildcard
- Use awk to parse toolbox output (mvnd strips module prefixes
when captured to variables)
- Add coverage to exclusion list
Tested locally: jaxb-impl-version correctly finds camel-parquet-avro
(transitive via hadoop-common -> jersey-json -> jaxb-impl).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
For the record, this assumption is wrong. Those components are not using the dependency, but they are excluding it, see: The script was working correctly and this change was merged based on a wrong assumption. |
gnodet
added a commit
that referenced
this pull request
Mar 26, 2026
This reverts the detect-dependencies CI action back to its original implementation. The reworked version is causing issues in CI. A proper fix will be done in #22247. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 task
gnodet
added a commit
that referenced
this pull request
Mar 26, 2026
Reverts the detect-dependencies CI action back to its original implementation. The reworked version was causing issues in CI. A proper fix will be done in #22247.
gnodet
added a commit
to gnodet/camel
that referenced
this pull request
Mar 26, 2026
- Restore maxNumberOfTestableProjects to 50 (was accidentally changed to 1000) - Restore root project change handling: exit early with informative comment - Restrict POM dependency analysis to parent/pom.xml only (matches original detect-test.sh behavior; detection improvements deferred to follow-up PR) - Add explicit comment about intentional Toolbox removal (pre-apache#22022 approach) - Add skip_full_build input for /component-test dispatches to avoid full regen.sh build (uses quick targeted build with -Dquickly instead) - Document multi-JDK artifact upload behavior (intentional overwrite for resilience when one JDK fails) - Update CI-ARCHITECTURE.md to reflect all changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 26, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
to gnodet/camel
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert apache#22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
Mar 27, 2026
Merge the three separate CI actions (detect-dependencies, component-test, incremental-build) into a single incremental-build action and streamline the workflow files: - Merge POM dependency detection (from detect-dependencies) and /component-test logic into incremental-build.sh - Rationalize pr-build-main.yml to support both PR builds and workflow_dispatch with extra_modules and skip_full_build inputs - Replace pr-manual-component-test.yml with a lightweight dispatcher that resolves component names and dispatches pr-build-main.yml - Add pr-test-commenter.yml (workflow_run) to post unified test summary comments on PRs (including fork PRs) - Generate a single unified PR comment combining file-path analysis, POM dependency detection, and /component-test results - Add CI-ARCHITECTURE.md documenting the workflow ecosystem - Revert #22022 (detect-dependencies action) since its functionality is now integrated into incremental-build - Delete obsolete actions: detect-dependencies, component-test Bug fixes found during CI testing: - Fix pipefail issue in dependent module count (set -o pipefail caused mvn|wc||echo to produce multi-line output) - Use ${{ github.repository }} instead of hardcoded 'apache/camel' in action.yaml default for github-repo input - Only append module exclusion list when using -amd flag (exclusion modules must be in the reactor to be excluded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
Summary
The
detect-dependenciesCI action was never finding affected modules for dependabot PRs that bump versions inparent/pom.xml.Root cause: The script searched for
${property-name}(e.g.,${jaxb-impl-version}) in modulepom.xmlfiles. This never matches because modules inherit managed versions from the parent's<dependencyManagement>without referencing the property directly — they just declare<artifactId>jaxb-impl</artifactId>without a<version>.Fix: New approach that maps properties to artifacts to modules:
parent/pom.xmlto find changed property namesparent/pom.xmlto find which<artifactId>uses each property as its<version>in<dependencyManagement>pom.xmlfiles for those artifact IDsExample: For PR #22019 (
jaxb-impl-versionbump), the old script found 0 modules. The new script correctly findscamel-drill,camel-ibm-cos, andcamel-swift.Additional improvements
version|dependency|artifactkeyword filter on property namesskip-mvnd-installinput to avoid reinstalling mvndTest plan
jaxb-impl-version→jaxb-impl→camel-drill, camel-ibm-cos, camel-swiftdetection worksparent/pom.xmlwill exercise the full flow