CAMEL-24318 - improve regen.sh - #25260
Conversation
8d5797a to
187812a
Compare
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 0 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 0).
|
gnodet
left a comment
There was a problem hiding this comment.
Good improvements — multithreaded Maven builds and separate log files for regen are welcome changes. A few observations:
Missing pr-build-main.yml update:
The PR updates main-build.yml to reference the new log filenames (build-regen.log, build-regen-catalog.log), but .github/workflows/pr-build-main.yml still references build.log at line 148. When pr-build-main.yml runs the full-build path (line 135: ./etc/scripts/regen.sh), regen.sh will write to the new filenames, but the artifact upload step will look for the non-existent build.log. The upload-artifact action will warn rather than fail, but log artifacts will be missing from PR builds, making CI failures harder to debug. Consider applying the same log filename update to pr-build-main.yml.
Minor observations (not blocking):
- Removing
-xfromgit cleanmeans.gitignore'd files (including*.logper line 13 of.gitignore) survive between runs. Combined with the append operator (>>), log files from previous local runs accumulate rather than starting fresh. In CI (fresh checkout) this is harmless. Consider addingrm -f build-regen.log build-regen-catalog.logbefore the Maven invocations, or switching from>>to>. - The
-T1Cflag on the secondmvnwinvocation (-f catalog/camel-catalog) targets a single POM, so Maven parallelism has nothing to distribute there. Harmless but unnecessary.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of Guillaume Nodet
187812a to
53f2a96
Compare
gnodet
left a comment
There was a problem hiding this comment.
Claude Code on behalf of Guillaume Nodet
Thanks for addressing all three points from the previous review — pr-build-main.yml is now updated, >> was changed to > to avoid log accumulation, and -T1C was correctly not added to the single-POM catalog build. The main-build.yml change is correct as-is.
One issue with the updated artifact upload paths:
🟡 MEDIUM — build.log dropped from artifact upload in pr-build-main.yml
The artifact upload (line ~148) now only lists build-regen.log and build-regen-catalog.log, but the "Quick dependency build" step (line ~142) still writes to build.log via Maven's -l build.log flag. When skip_full_build is true, regen.sh does not run, so the regen log files are never created — meanwhile build.log IS produced but is no longer uploaded.
This means no build logs are archived for quick PR builds, making CI failures harder to debug.
Suggested fix — add build.log to the upload path list:
path: |
build-regen.log
build-regen-catalog.log
build.log53f2a96 to
5a9967b
Compare
* use multithreads for Maven to improve performance. locally with 22 cores, it divided the time by 2. On GitHub CI, it won't be that much as there is only 4 Cores currently * remove x option from git clean to avoid removing the files which are part of .gitignore, for instance all IDE related files * renamed the build log to avoid overriding the first one and to be able to keep both of them Signed-off-by: Aurélien Pupier <apupier@ibm.com>
5a9967b to
e1d86c9
Compare
gnodet
left a comment
There was a problem hiding this comment.
Claude Code on behalf of Guillaume Nodet
All previous feedback has been addressed — build.log is now included in the pr-build-main.yml artifact upload paths alongside the regen log files, covering both the quick-dependency-build path and the full-regen path. The upload-artifact v7 action gracefully handles missing files, so whichever build path runs, the relevant logs are captured.
The three changes across both workflow files are correct:
pr-build-main.ymlupdated with all three log files>>changed to>to avoid log accumulation-T1Ccorrectly omitted from the single-POM catalog buildmain-build.ymlcorrectly omitsbuild.logsince it only runsregen.sh
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.