test(integration): de-flake otel pre-job config test#803
Open
cbartz wants to merge 2 commits into
Open
Conversation
The test dispatched a quick workflow, waited for it to complete, then SSHed into the runner to read the otel config the pre-job script wrote. Ephemeral runner VMs are torn down on job completion, so the inspection raced the runner-manager cleanup: when cleanup won, get_single_runner found zero VMs and the test failed with an empty runner list. Dispatch the long-running wait workflow and inspect the runner while its job is in progress, so the VM is guaranteed alive. Poll on the config file to absorb the pre-job hook write timing.
8 tasks
yanksyoon
approved these changes
Jul 3, 2026
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.
What this PR does
De-flakes
test_otel_collector_endpoint_pre_job_installs_config. Instead of dispatching a quick workflow, waiting for it to complete, then SSHing into the runner, it now dispatches the long-running wait workflow and inspects the runner while its job is in progress. The config read is polled to absorb the timing of the pre-job hook write.Why we need it
The runner is ephemeral, so its OpenStack VM is torn down on job completion. Reading the otel config after completion races the runner-manager cleanup loop — when cleanup wins,
get_single_runnerfinds zero VMs and the test fails withfound more than one runners or no runners: []. This was observed failing on the 22.04 base while passing on 24.04 in the same run (e.g. PR #802 CI). Keeping the job in progress guarantees the VM is alive during inspection.Checklist
docs/changelog.mdwith user-relevant changes — N/A, no user-facing changeterraform fmtpasses andtflintreports no errors — N/Agithub-runner-manager/pyproject.toml— N/A, not changed