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

test: Auto-redact file number #14121

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

dieterplex
Copy link
Contributor

@dieterplex dieterplex commented Jun 21, 2024

This is from #14096 (comment), and #14096 (comment).

The compiler might emit more files across different versions, so does cargo package itself. Better redacting the actual number to reduce changes in snapshots.

If the actual number of files is needed to be checked, we should encourage using extra assertions like validate_crate_contents and validate_upload_with_contents for cargo package.

@rustbot
Copy link
Collaborator

rustbot commented Jun 21, 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 A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2024
@weihanglo
Copy link
Member

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 21, 2024

📌 Commit e11d172 has been approved by weihanglo

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 Jun 21, 2024
@bors
Copy link
Collaborator

bors commented Jun 21, 2024

⌛ Testing commit e11d172 with merge 9229609...

@epage
Copy link
Contributor

epage commented Jun 21, 2024

Why is this being redacted? I am not seeing any motivation in this PR or the linked comment?

@bors
Copy link
Collaborator

bors commented Jun 21, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 9229609 to master...

@bors bors merged commit 9229609 into rust-lang:master Jun 21, 2024
22 checks passed
@dieterplex dieterplex deleted the redact-file-num branch June 21, 2024 13:47
@weihanglo
Copy link
Member

See #14096 (comment). The PR description is updated as well #14121.

@epage
Copy link
Contributor

epage commented Jun 21, 2024

I haven't really thought through the cargo clean case to really say on that, I disagree about cargo package. At least for now, I would like to lean towards redacting less, rather than redacting more. Currently, the porting instructions are very limited in only suggesting auto-redactions for machine-specific information. We have snapshot updating which removes the burden of updating the tests.

@weihanglo
Copy link
Member

We have an imperfect CI job that needs to accommodate to stable, beta, and nightly toolchains. cargo package is controlled by Cargo so probably safe not to redact. Artifacts emitted by rustc are not.

epage added a commit to epage/cargo that referenced this pull request Jun 21, 2024
This is a partial revert of #rust-lang#14121
(e11d172)

Our focus for redacting (auto or with globs) includes
- run-specific information (timing, hashes, platform-specific wording)
- rustc-specific information

(We tend to use globs for rustc-specific information because there might
be some very specific times we need to care about some of the details)

However, "Packaged files" does not fit into any of that and, for now, we
are erring on the side of redacting less, rather than more, with the
move to snapbox.
As we see how it works out and what the underlying requirements are, we
can revisit this.
@epage
Copy link
Contributor

epage commented Jun 21, 2024

Posted #14123 for the cargo package side of this.

bors added a commit that referenced this pull request Jun 21, 2024
fix(test): Un-redact Packaged files

This is a partial revert of ##14121
(e11d172)

Our focus for redacting (auto or with globs) includes
- run-specific information (timing, hashes, platform-specific wording)
- rustc-specific information

(We tend to use globs for rustc-specific information because there might be some very specific times we need to care about some of the details)

However, "Packaged files" does not fit into any of that and, for now, we are erring on the side of redacting less, rather than more, with the move to snapbox.
As we see how it works out and what the underlying requirements are, we can revisit this.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 22, 2024
Update cargo

17 commits in 3ed207e416fb2f678a40cc79c02dcf4f936a21ce..bc89bffa5987d4af8f71011c7557119b39e44a65
2024-06-18 19:18:22 +0000 to 2024-06-22 00:36:36 +0000
- test: migrate weak_dep_features, workspaces and yank to snapbox (rust-lang/cargo#14111)
- test: migrate features and features(2|_namespaced) to snapbox (rust-lang/cargo#14100)
- test: Add auto-redaction for not found error (rust-lang/cargo#14124)
- test: migrate build to snapbox (rust-lang/cargo#14068)
- test: migrate unit_graph, update and vendor to snapbox (rust-lang/cargo#14119)
- fix(test): Un-redact Packaged files (rust-lang/cargo#14123)
- test: Auto-redact file number (rust-lang/cargo#14121)
- test: migrate lints_table and lints/(mod|unknown_lints) to snapbox (rust-lang/cargo#14104)
- Simplify checking feature syntax (rust-lang/cargo#14106)
- test: migrate testsuites to snapbox (rust-lang/cargo#14091)
- Make `-Cmetadata` consistent across platforms (rust-lang/cargo#14107)
- fix(toml): Warn when edition is unuset, even when MSRV is unset (rust-lang/cargo#14110)
- Add `CodeFix::apply_solution` and impl `Clone` (rust-lang/cargo#14092)
- test: migrate `cargo_alias_config&cargo_config/mod` to snapbox (rust-lang/cargo#14093)
- Simplify checking for dependency cycles (rust-lang/cargo#14089)
- test: Migrate `pub_priv.rs` to snapshot (rust-lang/cargo#14103)
- test: migrate rustdoc and rustdocflags to snapbox (rust-lang/cargo#14098)

<!--
r? ghost
-->
@rustbot rustbot added this to the 1.81.0 milestone Jun 22, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jun 23, 2024
Update cargo

17 commits in 3ed207e416fb2f678a40cc79c02dcf4f936a21ce..bc89bffa5987d4af8f71011c7557119b39e44a65
2024-06-18 19:18:22 +0000 to 2024-06-22 00:36:36 +0000
- test: migrate weak_dep_features, workspaces and yank to snapbox (rust-lang/cargo#14111)
- test: migrate features and features(2|_namespaced) to snapbox (rust-lang/cargo#14100)
- test: Add auto-redaction for not found error (rust-lang/cargo#14124)
- test: migrate build to snapbox (rust-lang/cargo#14068)
- test: migrate unit_graph, update and vendor to snapbox (rust-lang/cargo#14119)
- fix(test): Un-redact Packaged files (rust-lang/cargo#14123)
- test: Auto-redact file number (rust-lang/cargo#14121)
- test: migrate lints_table and lints/(mod|unknown_lints) to snapbox (rust-lang/cargo#14104)
- Simplify checking feature syntax (rust-lang/cargo#14106)
- test: migrate testsuites to snapbox (rust-lang/cargo#14091)
- Make `-Cmetadata` consistent across platforms (rust-lang/cargo#14107)
- fix(toml): Warn when edition is unuset, even when MSRV is unset (rust-lang/cargo#14110)
- Add `CodeFix::apply_solution` and impl `Clone` (rust-lang/cargo#14092)
- test: migrate `cargo_alias_config&cargo_config/mod` to snapbox (rust-lang/cargo#14093)
- Simplify checking for dependency cycles (rust-lang/cargo#14089)
- test: Migrate `pub_priv.rs` to snapshot (rust-lang/cargo#14103)
- test: migrate rustdoc and rustdocflags to snapbox (rust-lang/cargo#14098)

<!--
r? ghost
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests 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.

None yet

5 participants