Move tsc to validate changes. Run validations in parallel #12998
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.
Description
To declutter the Werft phases for the build job I've moved the
tsc
check to the "Validating changes" phase. I also changed the implementation oftypecheckWerftJobs
andpreCommitCheck
so they are properly async, which makes it possible to run them in parallel (achieved throughPromise.all
)I also had to make the actual build execution use
await
and addexec(.., { async: true })
as traces otherwise broke. I'm not a 100% certain why this is needed - my hunch is that by running the build in a promise we're allowing other code to temporarily execute on the event loop which takes care of some trace management - as the change is harmless I'm okay keeping it in this PR and then we can investigate why the traces breaks without it some other time.Related Issue(s)
No issue, just noticed this when working on other things
How to test
Here's a screenshot before/after that shows the slice has been moved to the validating phase (resulting in less clutter IMO)
And here's a screenshot of the trace before/after that shows that the slices are now running in parallel (not that there is a huge speed increase as the precommit hook takes much longer than tsc --noEmit, but nonetheless)
Release Notes
Documentation
N/A
Werft options: