UID2-6621: Fix bore setup race condition and missing operator config guard#202
Open
UID2-6621: Fix bore setup race condition and missing operator config guard#202
Conversation
…guard
Two bugs causing E2E test failures for all private operator types (AWS, GCP):
1. setup_bore.sh: Race condition where the shell's > redirect creates output
files immediately (empty), so the until loop exits before the ekzhang/bore
Docker image is pulled or outputs the tunnel URL. Fixed by waiting for
actual content (" at ") in the files instead of just file existence.
2. prepare_resources_for_e2e_docker_compose.sh: The operator config file is
only copied for public operators, but jq_string_update was called
unconditionally for all operator types, causing a jq file-not-found error.
Fixed by guarding the update with a file existence check.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Fixes two bugs in the E2E shared scripts that caused all private operator E2E tests (AWS, GCP) to fail. Observed in run 22162906844.
Jira: UID2-6621
Bug 1: Race condition in
setup_bore.shThe bore Docker containers are launched in background with stdout redirected to files (
> bore_core.out &). The shell's>redirect creates the output files immediately (empty) before Docker starts. The previousuntil [ -f file ]loop therefore exited instantly — before theekzhang/boreimage was pulled or bore output the tunnel URL — resulting in empty bore URLs output ashttp://with no host/port.Empty bore URLs cascaded into:
corecontainer receivinghttp://as its S3/KMS endpoints → core goes unhealthycreate_cloudformation_stack.pycrashing withIndexError: list index out of rangewhen parsing the port fromhttp://Fix: Wait for actual content in the bore output files (grep for
" at "which appears in bore's tunnel URL line) instead of just file existence.Bug 2: Missing file guard in
prepare_resources_for_e2e_docker_compose.shThe operator config file (
./docker/uid2-operator/conf/local-e2e-docker-config.json) is only copied forOPERATOR_TYPE == public, butjq_string_updatewas called on it unconditionally for all operator types:For private operators (aws, gcp), the operator container runs externally (not in docker-compose), so the config file is not needed.
Fix: Guard the
jq_string_updatecall with a file existence check.Test plan