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 global_cache_tracker::max_download_size test flakiness #13860

Merged
merged 1 commit into from
May 4, 2024

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented May 4, 2024

This (hopefully) fixes an issue where the global_cache_tracker::max_download_size test was sporadically failing on CI. My theory is that the populate_cache function was inconsistently saving entries with either the same timestamp or timestamps that differed by 1 second. The SQL query in get_registry_items_to_clean_size_both sorts the results based on (timestamp,name). Thus if the timestamps were the same, it was sorting on name. If they differed, then the timestamp would dominate. The solution is to force the tests to use the same basis for the starting time so that a function call like days_ago(1) returns consistent results.

I don't have a particularly good way to reproduce the issue. Adding a sleep into populate_cache causes 100% errors. Running on a slowed down system, or perhaps GitHub Actions might also reproduce, but I did not try.

@rustbot
Copy link
Collaborator

rustbot commented May 4, 2024

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 4, 2024
@epage
Copy link
Contributor

epage commented May 4, 2024

@bors r+

@bors
Copy link
Contributor

bors commented May 4, 2024

📌 Commit b44edc5 has been approved by epage

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 May 4, 2024
@bors
Copy link
Contributor

bors commented May 4, 2024

⌛ Testing commit b44edc5 with merge d72d0b2...

@bors
Copy link
Contributor

bors commented May 4, 2024

☀️ Test successful - checks-actions
Approved by: epage
Pushing d72d0b2 to master...

@bors bors merged commit d72d0b2 into rust-lang:master May 4, 2024
21 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
Update cargo

10 commits in 05364cb2f61a2c2b091e061c1f42b207dfb5f81f..0ca60e940821c311c9b25a6423b59ccdbcea218f
2024-05-03 16:48:59 +0000 to 2024-05-08 01:54:25 +0000
- chore: Add cargo-lints to unstable docs (rust-lang/cargo#13881)
- test: clean up unnecessary uses of `match_exact` (rust-lang/cargo#13879)
- docs(ref): Correct heading level of `[lints]` documentation (rust-lang/cargo#13878)
- Fix: Build only the specified artifact library when multiple types are available (rust-lang/cargo#13842)
- docs: add missing CARGO_MAKEFLAGS env for plugins (rust-lang/cargo#13872)
- Add more documentation to `cargo::rustc-check-cfg` (rust-lang/cargo#13869)
- fix(toml): Remove unstable rejrected frontmatter syntax for cargo script (rust-lang/cargo#13861)
- Update UI example code in contributor guide (rust-lang/cargo#13864)
- style(test): Remove check-cfg warning (rust-lang/cargo#13865)
- Fix global_cache_tracker::max_download_size test flakiness (rust-lang/cargo#13860)

r? ghost
@ehuss ehuss added this to the 1.80.0 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants