You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/03/27 08:46:06 UTC
[PR] Fix docs gulp race condition with dsl target directories [camel]
gnodet opened a new pull request, #22292:
URL: https://github.com/apache/camel/pull/22292
## Summary
The gulpfile.js glob pattern `../dsl/**/src/main/docs/...` uses `**` which recurses into `target/` directories created by concurrent Maven builds. When a test process deletes `target/surefire` while gulp is scanning, it causes an `ENOENT` error that fails the docs build:
```
Error: ENOENT: no such file or directory, scandir '.../dsl/camel-kamelet-main/target/surefire'
```
This is a race condition that occurs intermittently when `docs` and `dsl` modules build in parallel (e.g., with mvnd).
**Fix:** Replace `**` with explicit depth patterns using `!(target)` extglob to prevent scanning into `target/` directories:
- `dsl/src/main/docs/...` for depth-0 (`dsl.adoc`)
- `dsl/{*,*/!(target)}/src/main/docs/...` for depth 1-2
## Test plan
- [x] Verified the glob patterns still match all expected dsl doc files (`dsl.adoc`, `jbang.adoc`, etc.)
- [x] CI green on PR #22207 which includes this fix
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #22292:
URL: https://github.com/apache/camel/pull/22292#issuecomment-4141110367
For the test plan to validate the issue, we also need to check that the website doc is still genrated will all the correct content
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22292:
URL: https://github.com/apache/camel/pull/22292#issuecomment-4141065944
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #22292:
URL: https://github.com/apache/camel/pull/22292#issuecomment-4142916955
Note: the second commit (3ec45dc) adds a `resilientSrc` wrapper around `gulp.src()` that gracefully handles ENOENT errors from ephemeral directories (e.g. `.camel-jbang/work` created/deleted by tests running in parallel). Instead of failing the build, it logs a warning and continues. This is a defense-in-depth measure — the first commit prevents scanning `target/`, but other transient directories could still cause the same race condition during parallel builds.
It also adds `.camel-jbang/**` to the ignore patterns and logs the number of symlinked files per destination for easier debugging.
_Claude Code on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22292:
URL: https://github.com/apache/camel/pull/22292#issuecomment-4141153772
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `docs`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #22292:
URL: https://github.com/apache/camel/pull/22292
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #22292:
URL: https://github.com/apache/camel/pull/22292#issuecomment-4141251118
Good point. I've verified that the website docs are still generated with all correct content:
**Glob pattern equivalence:** Using `npx glob@11`, confirmed both old (`../dsl/**/src/main/docs/*.adoc` with `ignore: ['**/target/**']`) and new (`../dsl/src/main/docs/*.adoc` + `../dsl/{*,*/!(target)}/src/main/docs/*.adoc`) patterns match exactly the same 11 files — no files gained, none lost.
**Full gulp build:** Ran `gulp` end-to-end — completed successfully with all 71 "others" pages generated and all DSL entries present in the generated `nav.adoc` (dsl, cli-connector, cli-debug, dsl-modeline, java-joor-dsl, kamelet-main, kamelet-main-support, java-xml-io-dsl, java-xml-jaxb-dsl, yaml-dsl, camel-yaml-dsl-validator-maven-plugin).
**CI:** Green on this PR.
Regarding build links: this race condition is primarily observable during local development with mvnd (where docs and dsl modules build in parallel). In CI, `regen.sh` uses `./mvnw` sequentially, making the race much less likely. No CI builds were found with this specific ENOENT error. This is a preventive improvement, consistent with PR #21996 which was also described as a "preventive change, not a fix for a specific observed failure."
I've updated the PR description with the full validation details.
_Claude Code on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix docs gulp race condition with dsl target directories [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #22292:
URL: https://github.com/apache/camel/pull/22292#issuecomment-4142946013
Dropped the second commit (resilient ENOENT handling). The `.camel-jbang/work` directory issue will be handled separately by fixing the tests to not create ephemeral directories in the source tree where gulp scans.
_Claude Code on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org