Repository navigation
fix(deploy): check the receiver resolver file - #100
Merged
Merged
Conversation
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:6d03a43d0f3dbada;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
A missing or invalid resolver file can reach Docker after the deployment has already started preparing the App key. The deployment view also needs to tell operators how the resolver mount affects collector access. Previous change
Behavior change
deploy/up.shchecks that the receiver resolver variable names an existing, non-empty regular file before it calls Docker. A bad value exits with status 2 and prints a message that includes the variable name. The deployment view explains that the mounted file replaces Docker's embedded DNS for the receiver. The receiver then needs the collector's IP address.Decisions
An exported value takes precedence over a literal path in
.env. Compose resolves relative paths besidecompose.yaml. The temporary Compose environment file carries the checked path throughsudowhen it filters environment variables.Deviations from the task
The tests also cover an empty variable and a symlink to a directory. They cover a resolver assignment inside an unrelated quoted value, and precedence for an exported path.
Needs human judgment
Check whether any deployment uses variable expansion for the resolver path in
.env. It can set a literal path there or export the resolved value before callingdeploy/up.sh.Risk
Deployments with a missing resolver variable or an invalid file stop before the key helper runs. The caller must supply a valid path for deployment to proceed.
Verification
bazelisk run //:format,bazelisk run //:gazelle, andbazelisk test //:golangci_lint_testpassed.bazelisk test //...reported 33 passes and one skipped test on Linux. The deployment tests cover the resolver preflight, the successful path throughsudo, and the receiver bind settingcreate_host_path: false. The committed size waspr_size: code=170/400 raw=199/1500.Human steering
The PR J4 brief specified the resolver preflight, Compose assertion, and deployment documentation.
Assisted-by: LLM effort=medium;harness=claude-code:2.1.330;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli