Say what the build and vet jobs covered instead of passing in silence - #130
Merged
Conversation
…#62) Two of the jobs whose contexts the parity document keeps printed nothing at all on success. A green tick from either of them reads the same whether the pattern reached the runner or reached nothing, and one of those two is green: `go build ./docs/...` warns that it matched no packages and exits 0. Each build entry now prints how many packages it compiled and refuses a run that compiled none. The vet job prints the same count and carries no zero-check, because `go vet` over a pattern that matches nothing prints "no packages to vet" and exits 1, so a check there could not fail for the reason it would name. Measured rather than supposed, with the step as written: go build ./docs/... go: warning: "./docs/..." matched no packages (exit 0) go vet ./docs/... go: warning: "./docs/..." matched no packages no packages to vet (exit 1) The step with its pattern narrowed the same way exits 1 and names what happened, and with the pattern it carries it prints "compiled 7 package(s) of the runner" and exits 0. This is one clause of #62, which asks that every job whose context is required says whether it had work to do. It does not close that issue: the required set is empty, so there is no set for the clause to be evaluated against, and the fork route it also asks for has not been walked. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refs #62
What this changes
The six build entries and the vet job print what they covered. Each build entry
prints how many packages it compiled and refuses a run that compiled none. The
vet job prints the same count and carries no zero-check, for a measured reason
given below.
What failure it prevents
Both jobs printed nothing at all on success, so their whole output was a tick.
A tick that says nothing reads the same whether the pattern reached the runner
or reached nothing, and the second case is green rather than red:
That is a pattern somebody narrows by hand, not a directory that is missing.
The toolchain already refuses the missing directory, so the guard is written
against the mistake that is actually available.
go vetanswers the same pattern differently, which is why the two steps arenot symmetric:
A zero-check in the vet job could not fail for the reason it would name, so it
is not there and the comment at the step says so.
What was run
At the commit being pushed,
37ec738e482cb7a0a2b56cc46971b07e1c0dfb83.The build step as written, with the pattern it carries and then with the
pattern narrowed to a directory holding no packages:
So the guard bites, and it bites on a step that would otherwise have been
green. The four commands the guide asks for, at this commit:
93 top-level tests executed, none skipped. No Go source changed here, so the
suite is unchanged by it and is run because the commit being pushed is what a
claim is made about.
What this does not do
This does not finish #62. That issue asks for a comparison against the required
set on the default branch, and the set is empty, so there is nothing for the
clause to be evaluated against yet. The fork route it also asks for has not
been walked.
It touches two jobs and not the rest. The other jobs whose contexts the parity
document keeps already print a count, a report or a sentence. The formatting
job is the weakest of those: it prints that every Go file the runner is built
from is formatted, without saying how many it read, and that is left as it is
rather than changed here.
It adds no refusal to the suite. The zero-check is a step in a workflow, proved
by running the step both ways above rather than by a test in the tree.
Nobody else has read this change. What stands behind it is the evidence above
rather than a second reader.