Treat concurrent default-group creation as success - #6668
Open
lorenzozanee wants to merge 1 commit into
Open
lorenzozanee wants to merge 1 commit into
lorenzozanee wants to merge 1 commit into
Conversation
lorenzozanee
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
aponcedeleonch,
jhrozek,
rdimitrov and
reyortiz3
as code owners
September 15, 2026 18:45
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6668 +/- ##
=======================================
Coverage 79.08% 79.08%
=======================================
Files 785 785
Lines 78381 78385 +4
=======================================
+ Hits 61989 61993 +4
Misses 16387 16387
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
thvprocesses concurrently could fail withfailed to ensure default group exists: group already exists: defaultwhen the processes raced the Exists-then-Create window in the default-group startup migration. This is reproducible in the core E2E shard, which runs Ginkgo withPROCS=4.groups.ErrGroupAlreadyExistsas success: when another process created the default group first, the desired end state already holds. Explicitgroup createcalls (CLI and the API 409 response) still report the conflict.--help,-handhelpare now classified as informational commands, so printing help no longer triggers migrations or the container runtime check.CheckTHVBinaryAvailablenow includes stderr in its error so startup failures are diagnosable instead of being masked asthv binary not available.Fixes #6359
Type of change
Test plan
task test)task lint-fix)New
Test_EnsureDefaultGroupExistsConcurrentspawns 8 concurrent default-group migrations against a fresh shared store and requires all of them to succeed (it fails onmainwithgroup already exists: default). Manually verified: 10 rounds of 4 concurrentthvprocesses against a fresh shared XDG state directory all exit 0 (previously 6/10 rounds had at least one process fail), andthv --helpon a fresh directory exits 0 without creating the default group or requiring a container runtime.Does this introduce a user-facing change?
Yes. Concurrent
thvstartups that previously failed withgroup already exists: defaultnow succeed, andthv --helpno longer requires a container runtime or triggers migrations.Supersedes #6457 (原PR分支已删,按原提交重建)