Split cargo-deny job into two non-matrix jobs #1670
Merged
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.
This is the WASM de-matrixification that was intentionally omitted from #1668 so it could be considered separately (see also #1668 (review)).
This PR is intended to have only one commit, 38edb2c, and the changes are really +12 -9, not +1201 -742 as currently shown. The other commits are from #1668. This is currently a draft because I recommend against merging it until #1668 is merged, and it may also be a good idea to rebase this after #1668 is merged, which will make it easy to verify that merging this will only add one commit.
What this changes
Instead of conditionally applying
continue-on-error: true
at the job level to theadvisories
job, this splitscargo-deny
into two job definitions,cargo-deny-advisories
andcargo-deny
, where neither hascontinue-on-error
butcargo-deny-advisories
is omitted as a dependency of thetests-pass
job that makes jobs effectively required for PR auto-merge. This way, when there is an unaddressed advisory, thecargo-deny-advisories
job unambiguously fails, even failing the workflow, but PRs can still auto-merge.One implication of this is that, on Dependabot security update PRs,
@dependabot merge
and@dependabot squash and merge
commands will only perform a merge ifcargo deny check advisories
reports no other outstanding advisories. This is because, when Dependabot is told to merge a PR, it only goes ahead with the merge if all checks pass (i.e. report a successful conclusion). This would be convenient for cases where, if the fix is not complete, further manual review is desired. It would otherwise be inconvenient, but then a usual PR auto-merge could be done instead (which is the more common practice here anyway).Possible alternative
The main thing I can think of that would make this change unsuitable is if we actually just want to start treating
cargo deny check advisories
failures as hard errors and have them block merging. In that case, the current organization could be kept and the conditionalcontinue-on-error
could just be removed from it.