Repository navigation
ci: explain a missing Bazel workspace in fetch.sh - #368
Merged
Merged
Conversation
Generated-by: LLM harness=codex;model=openai:gpt-6.2-sol Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:a659371582e2e1e3;surface=exec
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.
Why
Push runs on a consumer's main failed twice in
fetch.shwithERROR: Bazel 'query' must be invoked from within a workspace, 0.4 s into the step. The checkout had succeeded and the repository root holdsMODULE.bazel, so the log gave the operator nothing to act on. The jobs ran on different self-hosted runners without overlapping, which rules out a shared work directory race.Behavior change
fetch.shchecks each configured workspace forMODULE.bazel. A missing file prints a diagnostic and exits 1.must be invoked from within a workspace, the retry loop prints the same diagnostic and stops without retrying. The diagnostic says which Bazel command reported the error.::group::block. It lists the workspace path,pwd, the first 40 lines ofls -la, whetherMODULE.bazelandREPO.bazelexist, and the current git commit and short status when the directory is a checkout. One::error::line then gives the cause in plain words.Decisions
fetch-workspaces.Risk
A workspace in
fetch-workspaceswithout its ownMODULE.bazelnow fails before Bazel runs, although Bazel could find a parent workspace. The existingcache_fetch_testfixture neededMODULE.bazelfiles for that reason. The consumer's root cause is still open. The next failing run prints the diagnostic.Verification
//repo/tests:fetch_workspace_testcovers a workspace withoutMODULE.bazel(the diagnostic prints and the exit is 1) and a failing command with another error (no diagnostic).//repo/tests:fetch_workspace_test, check the Bash subprocess on windows-2025 and remove the exclusion.Opened-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli
Generated-by: LLM harness=codex;model=openai:gpt-6.2-sol
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:a659371582e2e1e3;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:debb814921f029ad;surface=cli