Say whether the dependency review had anything to review (#62) - #133
Merged
Conversation
A green tick from the dependency-review job had two causes and reported them identically. A manifest changed and carried no advisory, and no manifest changed at all, both arrive as success with an empty group. On #129, which changed no manifest, the job printed that group and no sentence saying which of the two it was, so a reader is told the dependencies were reviewed when nothing was submitted for review. The job now says what it was handed, before the action runs so that the sentence reaches the log whichever way the review goes. It lists the files this repository declares a dependency graph in, compares the merge commit against the base the change would land on, and prints which of the two cases the run is. The pathspecs are one array read by both commands, so the set it reports and the set it compares cannot drift apart. The checkout takes two commits rather than one, which is what makes the first parent of the merge commit available to compare against. Nothing else in the job reads history. 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.
One clause of #62 asks that every job whose context the parity document keeps
prints whether it had work to do. The
dependency-reviewjob did not, and thisis that clause for that job. It closes nothing: the rest of #62 is a comparison
against a required set that does not exist yet, and a fork route that has not
been walked.
What was wrong
Success from that job reports two different things with one tick. Either a
manifest changed and carried no advisory, or no manifest changed at all and
there was nothing to compare. The second is the ordinary case on this board,
and on #129, which changed no manifest, the job printed an empty group and no
sentence saying which of the two it was:
A reader is then told the dependencies were reviewed when nothing was submitted
for review.
What this does
A step before the action, because the action decides advisories and this says
what it was handed. It lists the files this repository declares a dependency
graph in, compares the merge commit against the base the change would land on,
and prints which of the two cases the run is. It runs before rather than after
so the sentence reaches the log whichever way the review goes.
The pathspecs are one array read by both commands, so the set the step reports
and the set it compares cannot drift apart. They match at any depth, so a
second module arriving under this root is read rather than missed.
The checkout takes two commits rather than one. That is what makes the first
parent of the merge commit available to compare against, and nothing else in
the job reads history.
What this does not do
It does not make the action itself say anything. Whether a manifest carried an
advisory is still the action's answer alone, and this step cannot see inside it.
It reads the manifests git tracks rather than every ecosystem the action
understands. This repository carries one module and no other manifest, which
the first command below prints, so today the two sets are the same. They would
not be on a tree that gained a manifest in another ecosystem.
What I ran
Both branches of the new step, against real commit pairs in this repository
rather than against invented ones. The empty case, over the two most recent
commits on the default branch:
The non-empty case, over the commit that created the module:
The gate the contributing guide names, at 6af5f87:
The check-name comparison, since this touches a workflow file, with the
ruleset's answer of no required context fed to it:
No job is added and no check name changes, so the declared set is the same 25.
Reading
No second person has read this change. The ruleset on the default branch
requires no approving review, so the evidence above stands in place of one
rather than beside one:
The part of this that no local command can prove is the comparison against the
first parent, because a merge commit only exists on the platform. This pull
request is the first run of it, and its own
dependency-reviewlog is theevidence.
An earlier version of this body quoted a different file list for #129. It was
not what the command prints, and the list above is.