Prevent docs gulp build from scanning target directories#21996
Open
Prevent docs gulp build from scanning target directories#21996
Conversation
…canning The gulp `symlink:asciidoc:others` task uses a `**` glob pattern to scan DSL module directories. During parallel CI builds, temp directories under `target/` (e.g. `templates-tmp87842628`) can appear and disappear while the glob is scanning, causing ENOENT race conditions. Exclude `**/target/**` from `gulp.src()` calls in both `createSymlinks` and `createExampleSymlinks` functions, since build output directories should never contain documentation source files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
**/target/**fromgulp.src()glob scanning increateSymlinksandcreateExampleSymlinksfunctionsothers.asciidocsource pattern uses../dsl/**/src/main/docs/*.adocwhich causes recursive scanning of all directories underdsl/, includingtarget/directoriesRationale
This is a preventive change, not a fix for a specific observed failure. The
**glob pattern in theotherssource configuration causes the glob library to recursively scan all directories under../dsl/, including Maventarget/directories. These directories:templates-tmp*) created by Maven plugins during parallel builds, which could cause ENOENT race conditions if a directory appears in a listing but is deleted beforescandirreads itExcluding
**/target/**is a safe, no-functional-change improvement that avoids unnecessary I/O and eliminates a potential source of flakiness during parallel CI builds.