-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ci): Ensure idempotence of user creation #114206
Conversation
Previously, re-running `run.sh` in the same container would fail at the useradd step, because the user already exists. Instead, change that step to "create if not exists" semantics to ease interactive debugging of CI failures. Split out from rust-lang#111891 per request by @jackh726
(rustbot has picked a reviewer for you, use r? to override) |
@bors r+ rollup=iffy |
⌛ Testing commit 912dacb with merge 22f3e280103c6bfbbf90bf1ca2a650186182d32b... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
Previously, the `id -u $LOCAL_USER_ID` check would succeed, because there was already a user mapped to the $LOCAL_USER_ID with a different name. Looking up the entry in the database by name, however, correctly makes the `useradd` operation idempotent. An alternative fix would be to avoid duplicating an already-existing-ID, however that would require either probing for an available ID or identifying where LOCAL_USER_ID is being set and changing it to better match the ubuntu base image, neither of which is a one-line change.
@rustbot label -S-waiting-on-author +S-waiting-on-review |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9fca8e7): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 650.283s -> 651.653s (0.21%) |
Previously, re-running
run.sh
in the same container would fail at the useradd step, because the user already exists. Instead, change that step to "create if not exists" semantics to ease interactive debugging of CI failures.Split out from #111891 per request by @jackh726