Skip to content
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

Merged
merged 2 commits into from
Aug 7, 2023
Merged

Conversation

sethp
Copy link
Contributor

@sethp sethp commented Jul 29, 2023

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

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
Copy link
Collaborator

rustbot commented Jul 29, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 29, 2023
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Jul 31, 2023

📌 Commit 912dacb has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2023
@bors
Copy link
Contributor

bors commented Jul 31, 2023

⌛ Testing commit 912dacb with merge 22f3e280103c6bfbbf90bf1ca2a650186182d32b...

@bors
Copy link
Contributor

bors commented Jul 31, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 31, 2023
@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2023
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.
@sethp
Copy link
Contributor Author

sethp commented Aug 5, 2023

@rustbot label -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 5, 2023
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 6, 2023

📌 Commit fff66a9 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 6, 2023
@bors
Copy link
Contributor

bors commented Aug 7, 2023

⌛ Testing commit fff66a9 with merge 9fca8e7...

@bors
Copy link
Contributor

bors commented Aug 7, 2023

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 9fca8e7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 7, 2023
@bors bors merged commit 9fca8e7 into rust-lang:master Aug 7, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 7, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9fca8e7): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.5%, 2.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 650.283s -> 651.653s (0.21%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants