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

x test error_index_generator triggers 'nested groups are not supported by GHA' check #113798

Closed
oli-obk opened this issue Jul 17, 2023 · 5 comments · Fixed by #113800
Closed

x test error_index_generator triggers 'nested groups are not supported by GHA' check #113798

oli-obk opened this issue Jul 17, 2023 · 5 comments · Fixed by #113800
Assignees
Labels
C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Milestone

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Jul 17, 2023

Command

x test error_index_generator

Output

Testing stage1 error-index (x86_64-unknown-linux-gnu)
Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu)
thread 'main' panicked at 'nested groups are not supported by GHA!', tool.rs:486:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This is a regression from #113514.

@oli-obk oli-obk added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Jul 17, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 17, 2023
@jyn514
Copy link
Member

jyn514 commented Jul 17, 2023

in general the fix for this is usually to add let rustdoc = builder.rustdoc_cmd before the builder.msg line so that they don't overlap

@jyn514
Copy link
Member

jyn514 commented Jul 17, 2023

we might want to consider changing DryRun::SelfCheck to bypass the type-based cache so it catches ordering bugs like this

cc @Mark-Simulacrum

@jyn514 jyn514 added this to the 1.73.0 milestone Jul 17, 2023
@jyn514 jyn514 added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 17, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 17, 2023
@Mark-Simulacrum
Copy link
Member

I don't understand how dry run is relevant here, isn't this a problem in all cases? Dry run and real should have roughly the same ensure graph to the extent possible and our tests rely on that...

It also seems like based on the linked PR here this assertion is always guaranteed to show up at runtime pretty much constantly anytime someone accidentally adds additional nesting with a group? I could see that the right fix is to track the group and end + restart it so that there's no nesting and instead a linear non-nested list of groups...

@jyn514
Copy link
Member

jyn514 commented Jul 17, 2023

dry-run and real have the same problems, yes. my idea was to do extra checks in dry-run so that x test without arguments would have caught this - the reason it only gets triggered with the error_index_generator filter is because normally, an earlier Step will happen to call ensure(tool::Rustdoc), so the dynamic GHA check never gets run.

this assertion is always guaranteed to show up at runtime pretty much constantly anytime someone accidentally adds additional nesting with a group

correct. i was hoping that the check was eager enough they'd notice immediately and fix it in order to make CI pass, but this issue shows that it's non-trivial to do so because of the way it depends on the cache. this is how dry-run gets involved - when it's enabled, bypassing the cache is cheap and we can just do it unconditionally, which would have caught this bug before it got merged.

I could see that the right fix is to track the group and end + restart it so that there's no nesting and instead a linear non-nested list of groups...

hmm, that might handle our current cases ok, but it's not correct in general - consider something like

let _guard = builder.msg("test rustdoc");
run_cargo_test(compiler, "-p librustdoc"); // takes e.g. 60 seconds
builder.ensure(RustdocUi); // builds rustdoc internally

that will split up the single message before and after, which doesn't seem quite right, although i suppose it might be better than panicking?

::group::test rustdoc
// 60 seconds
::endgroup
::group::build rustdoc
::endgroup
::group::test rustdoc
// takes non-trivial time to run tests/rustdoc-ui suite
::endgroup

@Mark-Simulacrum
Copy link
Member

Ah, I see. I'm not convinced that we'd not stop catching other problems and/or introduce them by changing dry run.

The split example you suggest feels right to me - in some sense more right - it means we are putting things in finest granularity groups. It also matches what we do for metrics emission, I believe...

I will say that I don't really understand the value in the grouping, so perhaps that would change my thinking there....

At minimum, we might consider not panicking outside of GHA workloads, since the grouping doesn't matter then?

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 20, 2023
Avoid another gha group nesting

fixes rust-lang#113798 (`x test error_index_generator` did not work locally anymore)

r? `@jyn514`
@bors bors closed this as completed in 6102785 Jul 20, 2023
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants