From 8871fa47af5fa839877eca3e784254b895ce2078 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 13 Mar 2026 20:46:29 +0100 Subject: [PATCH] Fix flaky docs gulp build by excluding target directories from glob scanning 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 --- docs/gulpfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/gulpfile.js b/docs/gulpfile.js index c41af376504ec..39d7dc056961a 100644 --- a/docs/gulpfile.js +++ b/docs/gulpfile.js @@ -326,7 +326,7 @@ const tasks = Array.from(sourcesMap).flatMap(([type, definition]) => { } }) - return gulp.src(source) + return gulp.src(source, { ignore: ['**/target/**'] }) .pipe(filterFn) .pipe( map((file, done) => { @@ -409,7 +409,7 @@ const tasks = Array.from(sourcesMap).flatMap(([type, definition]) => { return done() } - return gulp.src(source) // asciidoc files + return gulp.src(source, { ignore: ['**/target/**'] }) // asciidoc files .pipe(through2.obj(extractExamples)) // extracted example files // symlink links from a fixed directory, i.e. we could link to // the example files from `destination`, that would not work for