Conversation
When a pull request touches more than 500 files, joining all changed paths into space-separated environment variables exceeds Linux's ARG_MAX limit. Every bash shell then fails to start with "Argument list too long", crashing the job before the docs builder runs. When the total file count exceeds 500, the file list outputs are now cleared. An empty list tells the docs builder to do a full rebuild rather than an incremental one. Mirrors the same fix applied to elastic/docs-actions#353. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Looks good to me.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
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.
The
docs-preview-localworkflow crashes before any step runs when a pull request touches more than a few hundred files. This mirrors the same fix applied to elastic/docs-actions#353.Affects: Deploys & previews, Automation
Prompt summary: A massive detection-rules PR was failing the docs CI check with "Argument list too long". The ask was to identify the root cause, confirm the PR was safe to merge from a docs perspective, and fix the workflow so large PRs no longer crash it.
Why
The
check-modified-file-detailstep joins every changed file path into a space-separated string and sets it as a job-level environment variable. When a PR touches hundreds or thousands of files, the combined environment exceeds Linux'sARG_MAXlimit (~2 MB). Every subsequent bash shell fails to start withArgument list too long— including the "Skip build" step — so the job exits with an error before the docs builder runs at all. The docs content never failed; the runner infrastructure did.What
File-list cap in
check-modified-file-detailWhen the total number of changed files exceeds 500, the step now outputs empty strings for
added_files,modified_files,deleted_files, andrenamed_filesinstead of joining them all. The docs builder CLI interprets empty file lists as a signal to do a full rebuild rather than an incremental one. PRs under 500 files continue to use the incremental path unchanged.🤖 Generated with Claude Code