Skip to content

Commit 3924b3e

Browse files
gnodetclaude
andcommitted
ci: normalize formatting in CI-ARCHITECTURE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c37ce1b commit 3924b3e

1 file changed

Lines changed: 34 additions & 59 deletions

File tree

.github/CI-ARCHITECTURE.md

Lines changed: 34 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,42 @@ PR comment: /component-test kafka http
2929
## Workflows
3030

3131
### `pr-build-main.yml` — Build and test
32+
3233
- **Trigger**: `pull_request` (main branch), `workflow_dispatch`
3334
- **Matrix**: JDK 17, 21, 25 (25 is experimental)
3435
- **Steps**:
3536
1. Full build via `regen.sh` (`mvn install -DskipTests -Pregen`)
3637
2. Check for uncommitted generated files
3738
3. Run incremental tests (only affected modules)
3839
4. Upload test comment as artifact
39-
- **Inputs** (workflow_dispatch): `pr_number`, `pr_ref`, `extra_modules`,
40-
`skip_full_build`
40+
- **Inputs** (workflow_dispatch): `pr_number`, `pr_ref`, `extra_modules`, `skip_full_build`
4141

4242
### `pr-test-commenter.yml` — Post CI test comment
43+
4344
- **Trigger**: `workflow_run` on "Build and test" completion
4445
- **Purpose**: Posts the unified test summary comment on the PR
45-
- **Why separate**: Uses `workflow_run` to run in base repo context, allowing
46-
comment posting on fork PRs (where `GITHUB_TOKEN` is read-only)
46+
- **Why separate**: Uses `workflow_run` to run in base repo context, allowing comment posting on fork PRs (where `GITHUB_TOKEN` is read-only)
4747

4848
### `pr-manual-component-test.yml` — /component-test handler
49+
4950
- **Trigger**: `issue_comment` with `/component-test` prefix
5051
- **Who**: MEMBER, OWNER, or CONTRIBUTOR only
51-
- **What**: Resolves component names to module paths, dispatches the main
52-
"Build and test" workflow with `extra_modules` and `skip_full_build=true`
53-
- **Build**: Uses a quick targeted build (`-Dquickly`) of the requested
54-
modules and their dependencies instead of the full `regen.sh` build
52+
- **What**: Resolves component names to module paths, dispatches the main "Build and test" workflow with `extra_modules` and `skip_full_build=true`
53+
- **Build**: Uses a quick targeted build (`-Dquickly`) of the requested modules and their dependencies instead of the full `regen.sh` build
5554

5655
### `pr-id.yml` + `pr-commenter.yml` — Welcome message
56+
5757
- **Trigger**: `pull_request` (all branches)
5858
- **Purpose**: Posts the one-time welcome message on new PRs
59-
- **Why two workflows**: `pr-id.yml` runs in PR context (uploads PR number),
60-
`pr-commenter.yml` runs via `workflow_run` with write permissions
59+
- **Why two workflows**: `pr-id.yml` runs in PR context (uploads PR number), `pr-commenter.yml` runs via `workflow_run` with write permissions
6160

6261
### `main-build.yml` — Main branch build
62+
6363
- **Trigger**: `push` to main, camel-4.14.x, camel-4.18.x
6464
- **Steps**: Same as PR build but without comment posting
6565

6666
### Other workflows
67+
6768
- `pr-labeler.yml` — Auto-labels PRs based on changed files
6869
- `pr-doc-validation.yml` — Validates documentation changes
6970
- `pr-cleanup-branches.yml` — Cleans up merged PR branches
@@ -75,105 +76,79 @@ PR comment: /component-test kafka http
7576
## Actions
7677

7778
### `incremental-build`
79+
7880
The core test runner. Determines which modules to test using:
81+
7982
1. **File-path analysis**: Maps changed files to Maven modules
80-
2. **POM dependency analysis**: For `parent/pom.xml` changes, detects property
81-
changes and finds modules that reference the affected properties in their
82-
`pom.xml` files (uses simple grep, not Maveniverse Toolbox — see Known
83-
Limitations below)
83+
2. **POM dependency analysis**: For `parent/pom.xml` changes, detects property changes and finds modules that reference the affected properties in their `pom.xml` files (uses simple grep, not Maveniverse Toolbox — see Known Limitations below)
8484
3. **Extra modules**: Additional modules passed via `/component-test`
8585

8686
Results are merged, deduplicated, and tested. The script also:
87+
8788
- Detects tests disabled in CI (`@DisabledIfSystemProperty(named = "ci.env.name")`)
8889
- Applies an exclusion list for generated/meta modules
89-
- Checks for excluded modules with associated integration tests (via
90-
`manual-it-mapping.txt`) and advises contributors to run them manually
90+
- Checks for excluded modules with associated integration tests (via `manual-it-mapping.txt`) and advises contributors to run them manually
9191
- Generates a unified PR comment with all test information
9292

9393
### `install-mvnd`
94+
9495
Installs the Maven Daemon (mvnd) for faster builds.
9596

9697
### `install-packages`
98+
9799
Installs system packages required for the build.
98100

99101
## PR Labels
100102

101103
| Label | Effect |
102-
|-------|--------|
104+
| --- | --- |
103105
| `skip-tests` | Skip all tests |
104106
| `test-dependents` | Force testing dependent modules even if threshold exceeded |
105107

106108
## CI Environment
107109

108-
The CI sets `-Dci.env.name=github.com` via `MVND_OPTS` (in `install-mvnd`).
109-
Tests can use `@DisabledIfSystemProperty(named = "ci.env.name")` to skip
110-
flaky tests in CI. The test comment warns about these skipped tests.
110+
The CI sets `-Dci.env.name=github.com` via `MVND_OPTS` (in `install-mvnd`). Tests can use `@DisabledIfSystemProperty(named = "ci.env.name")` to skip flaky tests in CI. The test comment warns about these skipped tests.
111111

112112
## Known Limitations of POM Dependency Detection
113113

114114
The property-grep approach has structural limitations that can cause missed modules:
115115

116-
1. **Managed dependencies without explicit `<version>`** — Most Camel modules
117-
inherit dependency versions via `<dependencyManagement>` in the parent POM
118-
and do not declare `<version>${property}</version>` themselves. When a managed
119-
dependency version property changes, only modules that explicitly reference
120-
the property are detected — modules relying on inheritance are missed.
116+
1. **Managed dependencies without explicit** `<version>` — Most Camel modules inherit dependency versions via `<dependencyManagement>` in the parent POM and do not declare `<version>${property}</version>` themselves. When a managed dependency version property changes, only modules that explicitly reference the property are detected — modules relying on inheritance are missed.
121117

122-
2. **Maven plugin version changes are completely invisible** — Plugin version
123-
properties (e.g. `<maven-surefire-plugin-version>`) are both defined and
124-
consumed in `parent/pom.xml` via `<pluginManagement>`. Since the module
125-
search excludes `parent/pom.xml`, no modules are found and **no tests run
126-
at all** for plugin updates. Modules inherit plugins from the parent without
127-
any `${property}` reference in their own `pom.xml`.
118+
2. **Maven plugin version changes are completely invisible** — Plugin version properties (e.g. `<maven-surefire-plugin-version>`) are both defined and consumed in `parent/pom.xml` via `<pluginManagement>`. Since the module search excludes `parent/pom.xml`, no modules are found and **no tests run at all** for plugin updates. Modules inherit plugins from the parent without any `${property}` reference in their own `pom.xml`.
128119

129-
3. **BOM imports** — When a BOM version property changes (e.g.
130-
`<spring-boot-bom-version>`), modules using artifacts from that BOM are not
131-
detected because they reference the BOM's artifacts, not the BOM property.
120+
3. **BOM imports** — When a BOM version property changes (e.g. `<spring-boot-bom-version>`), modules using artifacts from that BOM are not detected because they reference the BOM's artifacts, not the BOM property.
132121

133-
4. **Transitive dependency changes** — Modules affected only via transitive
134-
dependencies are not detected.
122+
4. **Transitive dependency changes** — Modules affected only via transitive dependencies are not detected.
135123

136-
5. **Non-property version changes** — Direct edits to `<version>` values (not
137-
using `${property}` substitution) or structural changes to
138-
`<dependencyManagement>` sections are not caught.
124+
5. **Non-property version changes** — Direct edits to `<version>` values (not using `${property}` substitution) or structural changes to `<dependencyManagement>` sections are not caught.
139125

140-
These limitations mean the incremental build may under-test when parent POM
141-
properties change. A future improvement could use
142-
[Maveniverse Toolbox](https://github.com/maveniverse/toolbox) `tree-find` or
143-
[Scalpel](https://github.com/maveniverse/scalpel) to resolve the full
144-
dependency graph and detect all affected modules.
126+
These limitations mean the incremental build may under-test when parent POM properties change. A future improvement could use [Maveniverse Toolbox](https://github.com/maveniverse/toolbox) `tree-find` or [Scalpel](https://github.com/maveniverse/scalpel) to resolve the full dependency graph and detect all affected modules.
145127

146128
## Manual Integration Test Advisories
147129

148-
Some modules are excluded from CI's `-amd` expansion (the `EXCLUSION_LIST`)
149-
because they are generated code, meta-modules, or expensive integration test
150-
suites. When a contributor changes one of these modules, CI cannot automatically
151-
test all downstream effects.
130+
Some modules are excluded from CI's `-amd` expansion (the `EXCLUSION_LIST`) because they are generated code, meta-modules, or expensive integration test suites. When a contributor changes one of these modules, CI cannot automatically test all downstream effects.
152131

153-
The file `manual-it-mapping.txt` (co-located with the incremental build script)
154-
maps source modules to their associated integration test suites. When a changed
155-
module has a mapping entry, CI posts an advisory in the PR comment:
132+
The file `manual-it-mapping.txt` (co-located with the incremental build script) maps source modules to their associated integration test suites. When a changed module has a mapping entry, CI posts an advisory in the PR comment:
156133

157-
> You modified `dsl/camel-jbang/camel-jbang-core`. The related integration
158-
> tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider
159-
> running them manually:
134+
> You modified `dsl/camel-jbang/camel-jbang-core`. The related integration tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider running them manually:
135+
>
160136
> ```
161137
> mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
162138
> ```
163139
164140
To add new mappings, edit `manual-it-mapping.txt` using the format:
141+
165142
```
166143
source-artifact-id:it-module-path:command
167144
```
168145
169146
## Multi-JDK Artifact Behavior
170147
171-
All non-experimental JDK matrix entries (17, 21) upload the CI comment
172-
artifact with `overwrite: true`. This ensures a comment is posted even if
173-
one JDK build fails. Since the comment content is identical across JDKs
174-
(same modules are tested regardless of JDK version), last writer wins.
148+
All non-experimental JDK matrix entries (17, 21) upload the CI comment artifact with `overwrite: true`. This ensures a comment is posted even if one JDK build fails. Since the comment content is identical across JDKs (same modules are tested regardless of JDK version), last writer wins.
175149
176150
## Comment Markers
177151
178152
PR comments use HTML markers for upsert (create-or-update) behavior:
179-
- `<!-- ci-tested-modules -->` — Unified test summary comment
153+
154+
- `<!-- ci-tested-modules -->` — Unified test summary comment

0 commit comments

Comments
 (0)