chore(ci): rationalize CI into single workflow with unified comment#22247
chore(ci): rationalize CI into single workflow with unified comment#22247
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
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.
|
Claude Code on behalf of Guillaume Nodet Regarding testing: since Regarding the architecture doc: added All review comments have been addressed:
|
|
What is the output of the way indicated to test it? |
|
Claude Code on behalf of Guillaume Nodet The Pushed a dummy |
|
🧪 CI tested the following changed modules:
✅ POM dependency changes: targeted tests included Changed properties: arangodb-java-version Modules affected by dependency changes (2)
All tested modules (936 modules)
|
apupier
left a comment
There was a problem hiding this comment.
by looking to the genrated output, some feedback:
- inside the build log, there are some tests played:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.camel.catalog.CamelCatalogCacheTest
[INFO] Tests run: 98, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.953 s -- in org.apache.camel.catalog.CamelCatalogCacheTest
[INFO] Running org.apache.camel.catalog.CamelCatalogJsonSchemaTest
[INFO] Tests run: 755, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.966 s -- in org.apache.camel.catalog.CamelCatalogJsonSchemaTest
[INFO] Running org.apache.camel.catalog.CamelCatalogTest
[INFO] Tests run: 98, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.057 s -- in org.apache.camel.catalog.CamelCatalogTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 951, Failures: 0, Errors: 0, Skipped: 0
- given that the changes wasn't impacting a component dependency, there are no tests played in the incremental-test, which I think is the main objective of reworking on this github actions. So we still do not know if it is working now.
- unless I missed some parts, we do not know if the /component-test feature is still working
so unless a human takes the responsibility to monitor the result after the merge and be ready to revert in case of problem, I think this is still not ready to be merged
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>
070c8c3 to
989fe6f
Compare
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.
989fe6f to
265f055
Compare
265f055 to
9e69933
Compare
8cc70dd to
463ac2d
Compare
Fork Testing ReportClaude Code on behalf of Guillaume Nodet Ran manual tests on Test 1: Component file change detection ✅Run: 23613433728 — All 3 JDKs passed Changed
Test 2: Parent POM dependency detection ✅ (script worked, tests failed)Run: 23613434374 — JDK 21 failed (test failures) Changed
Test 3: skip_full_build + extra_modules (
|
Updated Fork Testing ReportClaude Code on behalf of Guillaume Nodet After fixing the bugs found in the first round, re-ran the failing tests. All 3 code paths now pass. Test 1: Component file change detection ✅Run: 23613433728 — All 3 JDKs passed
Test 2: Parent POM dependency detection ✅Run: 23620804048 — All 3 JDKs passed
Test 3: skip_full_build + extra_modules (
|
| Bug | Commit | Description |
|---|---|---|
| Pipefail in dependent count | b9e4fd7 | wc -l || echo "0" under set -o pipefail produced "24\n0", breaking [[ -gt ]] |
| Hardcoded github-repo default | b9e4fd7 | action.yaml default was 'apache/camel' instead of ${{ github.repository }} |
| Exclusion list without -amd | 636e55b | !:camel-allcomponents exclusion syntax fails when modules aren't in reactor (no -amd) |
35f0fd3 to
cbd8704
Compare
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>
cbd8704 to
bc2b653
Compare
Summary
Merge three separate CI actions (
incremental-build,detect-dependencies,component-test) into one unifiedincremental-build.shand simplify the workflow architecture. The change detection mechanism itself is unchanged — this is purely structural.What changed
detect-dependenciesintoincremental-build.sh— property change detection now runs inline, feeding its results into the same Maven invocation instead of a separate one/component-testinto the main "Build and test" workflow viaworkflow_dispatchwithextra_modulesparameterworkflow_runcommenter (pr-test-commenter.yml)build-all,build-dependents) from the commenter welcome messageCI-ARCHITECTURE.mddocumenting the workflow structureBenefits
Single Maven invocation — previously,
incremental-buildanddetect-dependenciesran as separate steps with independent Maven calls. Now both file-path-detected and POM-dependency-detected modules are combined into onemvn install, avoiding redundant reactor resolution and compilation.One unified PR comment — instead of up to 3 separate bot comments (incremental-build, detect-dependencies, component-test), there is now a single comment updated in place. This reduces noise and makes it easier to see what CI actually tested.
Fork PR comments work — the inline
actions/github-scriptcomment step ran in the PR's context, which lackspull-requests: writepermission for fork PRs. The newworkflow_runcommenter (pr-test-commenter.yml) runs in the base repo context with proper permissions./component-testreuses the full pipeline — instead of a separate action that only ran tests (skipping the build, regen, and uncommitted-changes checks), component-test now dispatches the same "Build and test" workflow with extra modules appended. This ensures component tests go through the same validation as PR builds.Concurrency group separation —
/component-testdispatches get a distinct concurrency group suffix (-component-test), so they don't cancel in-flight PR builds and vice versa.Less code to maintain — 3 actions → 1 action, 3 shell scripts → 1 script. The deleted
detect-test.sh(96 lines) andcomponent-test.sh(71 lines) are folded intoincremental-build.sh.Workflow overview
Before → After
Files
.github/actions/component-test/,.github/actions/detect-dependencies/.github/workflows/pr-test-commenter.yml,.github/CI-ARCHITECTURE.mdincremental-build/,pr-build-main.yml,pr-manual-component-test.yml,main-build.yml,pr-commenter.ymlTest plan
pull_requesteventsworkflow_dispatchworks for CI-only file changes (.github/**is inpaths-ignore)/component-test kafkadispatches the main workflow with correctextra_modulesskip-testsandtest-dependentslabels still work