Fix missing check
output by allowing disabled workunits to re-enable themselves (cherrypick of #14854, #14856, #14934)
#14942
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix missing
check
output by allowing disabled workunits to re-enable themselves (#14934)#13483 broke the rendering of
EngineAwareReturnType
implementations which relied on starting a workunit atLevel::TRACE
, and then escalating its level to something visible (usuallyINFO
or greater) when it completed.check
outputs for the JVM were strongly affected (see #14867), since they relied on the fact thatFallibleClasspathEntry
escalates toERROR
to render compile errors.To resolve this, we roll back a portion of #13483. Rather than not recording the workunit at all, we instead record it in the
WorkunitStore
as "disabled", which is signaled by a workunit not having anyWorkunitMetadata
. This has some of the efficiency benefits of #13483 (because we continue to skip heap allocating the metadata's fields), but allows a workunit to escalate itself from disabled to enabled as it completes by specifying a non-disabled level inRunningWorkunit::update_metadata
.The recording of "disabled" workunits is additionally necessary for #14680, because otherwise workunits which were not actually recorded would break the tracking of multiple parents: when adding a new parent to a workunit, you need an existing
SpanId
corresponding to the work that you are adding a parent to (or else you might accidentally depend on a parent arbitrarily far up the stack).Fixes #14867.
[ci skip-build-wheels]