Conversation
Merge the separate detect-dependencies action into the incremental-build action to provide a single unified CI test mechanism. Previously, two independent mechanisms determined which modules to test: 1. incremental-build: file-path based module detection 2. detect-dependencies: POM property change analysis using Maveniverse Toolbox For dependency version bumps in parent/pom.xml, the file-path approach would identify "parent" as the changed module, find that everything depends on it, and give up. The detect-dependencies action would then run separately and find the actually affected modules via Toolbox dependency analysis. This resulted in two separate PR comments, wasted CI time testing "parent" (which has no tests), and general confusion. The merged script now: - Uses file-path analysis for source code changes (unchanged) - Uses Toolbox dependency analysis for any changed pom.xml (generalized from parent-only to all pom.xml files) - Merges and deduplicates both sets of affected modules - Filters out pom-only parent modules when Toolbox found the real targets - Runs tests once and posts a single unified PR comment - Raises the testable modules threshold to 1000 (effectively disabled) - Removes the unused "build" mode (builds are handled by regen.sh) - Supports push builds (git diff HEAD~1) when no PR ID is provided Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Make /component-test dispatch the main "Build and test" workflow instead of running its own independent build. This avoids duplicate full builds and produces a unified PR comment. Changes: - pr-manual-component-test.yml now resolves component names to paths and dispatches the main workflow via workflow_dispatch with extra_modules - incremental-build action accepts extra-modules input - incremental-build script merges extra modules into the test list - Disabled-test detection (@DisabledIfSystemProperty with ci.env.name) is now included in the unified comment for all tested modules - Removed the standalone component-test action (logic merged) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the CI test summary comment posting from the build workflow to a separate workflow_run-triggered workflow. This allows posting comments on PRs from forks, where the GITHUB_TOKEN has read-only permissions. Changes: - pr-build-main.yml: replace inline comment posting with artifact upload (pr-number + incremental-test-comment.md), remove pull-requests:write - New pr-test-commenter.yml: triggers on "Build and test" completion, downloads the artifact, and posts/updates the unified PR comment with full permissions (runs in base repo context) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix concurrency: /component-test dispatches get their own concurrency group so they don't cancel running normal builds - Remove dead labels: build-all and build-dependents no longer exist, remove them from the welcome message - Add workflow run link to the test summary comment so reviewers can easily access detailed results across all JDK versions - Document paths-ignore with instructions for testing CI changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a new dependency is added to parent/pom.xml, the diff contains
structural XML elements like <groupId>, <artifactId>, <version> which
were incorrectly extracted as "changed properties" by detectChangedProperties.
This caused the script to search for modules using ${artifactId} or
${groupId} as property references, which either matched nothing useful
or caused spurious failures.
Fix: filter out known structural POM element names (groupId, artifactId,
version, scope, type, etc.) so only actual property names like
"pgvector-version" or "openai-java-version" are detected.
Fixes the CI script bug seen in PR #22207 where adding a new component
to parent/pom.xml caused the dependency detection to fail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
.github/workflows/pr-build-main.yml
Outdated
| uses: ./.github/actions/detect-dependencies | ||
| extra-modules: ${{ inputs.extra_modules || '' }} | ||
| - name: Save PR number and test comment for commenter workflow | ||
| if: always() && matrix.java == '21' |
There was a problem hiding this comment.
Why is it filtering only on JDK 21?
There was a problem hiding this comment.
Claude Code on behalf of Guillaume Nodet
The comment lists which modules were tested — this is identical across all JDK versions since the same modules are tested on JDK 17, 21, and 25. Per-JDK pass/fail results are visible in the GitHub Actions checks UI. Uploading from one JDK avoids duplicate artifacts. Added a comment in the workflow to clarify this.
There was a problem hiding this comment.
Claude Code on behalf of Guillaume Nodet
Updated — removed the JDK 21 filter. All non-experimental matrix entries now upload the artifact with overwrite: true. Since the content is identical across JDKs, whichever finishes last wins.
| - name: Check Permission | ||
| uses: actions-cool/check-user-permission@7b90a27f92f3961b368376107661682c441f6103 |
There was a problem hiding this comment.
Why the check user permission has been removed?
There was a problem hiding this comment.
Claude Code on behalf of Guillaume Nodet
Good catch — this was accidentally removed during the rewrite. Re-added in the latest commit.
apupier
left a comment
There was a problem hiding this comment.
I think we will need to be able to test it in some ways before merging as it is quite a complex change
oscerd
left a comment
There was a problem hiding this comment.
This looks a really good improvement for maintainability. I think it would be important to have a document under .github folder where we show the architecture of our GH actions ecosystem. That way it could be used for knowledge in the future.
- Pin actions/github-script to hash (ed597411d8f9) in pr-test-commenter.yml - Re-add check-user-permission step to pr-manual-component-test.yml - Add comment explaining why JDK 21 filter for comment artifact upload Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add .github/CI-ARCHITECTURE.md documenting the GitHub Actions ecosystem: workflow relationships, action descriptions, PR labels, and CI environment configuration. Addresses review feedback requesting architecture documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude Code on behalf of Guillaume Nodet Regarding testing: since Regarding the architecture doc: added All review comments have been addressed:
|
Remove the JDK 21 filter — all non-experimental matrix entries now upload the comment artifact with overwrite:true. The content is identical across JDKs (same modules tested), so whichever finishes last wins. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Unifies the CI test infrastructure into a single, maintainable system. Previously there were multiple independent mechanisms for detecting and testing affected modules, producing separate confusing PR comments.
1. Merge
detect-dependenciesintoincremental-buildparent) are filtered out when Toolbox finds the real targetsbuildmode (builds are handled byregen.sh)detect-dependenciesaction2. Unify
/component-testwith the main workflow/component-testnow dispatches the main "Build and test" workflow viaworkflow_dispatchwith the extra modules, instead of running its own independent build@DisabledIfSystemProperty(named = "ci.env.name")) added to the unified PR commentcomponent-testaction3. Fork PR comment support via
workflow_runpr-test-commenter.ymltriggered byworkflow_runGITHUB_TOKENis read-onlypull-requests: writepermission4. Miscellaneous fixes
/component-testdispatches get their own concurrency group so they don't cancel running normal buildsbuild-allandbuild-dependentslabels removed from welcome message (were only used in the now-removedbuildmode)<groupId>,<artifactId>,<version>, etc.) were incorrectly extracted as "changed properties" when adding new dependencies toparent/pom.xml, causing spurious failures (fixes the CI bug seen in CAMEL-21540: Add PGVector component for PostgreSQL vector database #22207)Files changed
.github/actions/incremental-build/incremental-build.sh.github/actions/incremental-build/action.yamlmode, addedextra-modules.github/workflows/pr-build-main.yml.github/workflows/pr-manual-component-test.yml.github/workflows/pr-test-commenter.ymlworkflow_run.github/workflows/pr-commenter.yml.github/workflows/main-build.ymlmodeparameter.github/actions/detect-dependencies/.github/actions/component-test/Test plan
workflow_dispatchto verify the unified script works end-to-end/component-testdispatch to verify it triggers the main workflowworkflow_run