-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add cargo audit check #10216
add cargo audit check #10216
Conversation
e835e46
to
6119235
Compare
.github/workflows/ci.yml
Outdated
- uses: baptiste0928/cargo-install@21a18ba3bf4a184d1804e8b759930d3471b1c941 | ||
with: | ||
crate: cargo-audit | ||
- run: cargo audit -D warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this as a nextest style test while we’re hashing out the justfile questions. Otherwise this is now just another example of a check that only runs in the CI and one that one will most likely not notice failing before waiting ~15 minutes of CI (especially since the CI is always "red" anyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm… OTOH I’m not sure if we should make this a required check (which adding it as a style check would enforce.) One issue with cargo audit checks is that more often than not this check will fail due to changes in the environment (advisories being published) rather than the changes to the PR code, and I’m not sure if we should stop the development project-wide when something like that happens…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI is no longer always red, since #10218 :) (it really annoyed me too) So this would probably be noticed within a 20 seconds of the job starting, considering the current time to run the action.
I agree with the issues with making this required. TBH I’m not sure either. I think it’d probably make sense to make it required, but will definitely ask on zulip before doing so.
As for the justfile story, TBH I think this will probably not be ready to land before we complete it, considering that #10201 will probably be slow to review, and I’m planning on writing the Justfile tomorrow, whether #10180 has landed or not :) (though I’m hoping it can have landed before and I can submit it in another PR, because with the current timezone difference the number of round-trips would mean I’d make a fourth day in a row working late to get #10180 to land before going OOO tomorrow evening)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approval conditional on not making this a blocking check. The specific solution there will need more discussion (file an issue to have this discussion please, so it does not get lost)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when cargo audit
fails, which command should I run to auto-resolve it?
I would strongly prefer to upgrade dependencies in separate boring PRs. If a complicated PR adds a new feature, then making it also upgrade dependencies seems counter-productive.
I hope the zulip thread I started just a bit ago is going to reach a good solution :)
It depends on the specific failure reason (described in the error message), which is the reason why the check is currently informational-only (like nightly nayduck tests were before I removed it). The goal of running it on every PR is to hopefully notice before we add vulnerable dependencies, in which case the solution is to just not do it, and pick another dependency or version of it :)
Totally agreed, the goal is definitely not to have unrelated dependency upgrades be forced into PRs. If there’s a red checkmark and you didn’t change a dependency, it’s the same kind of information as if you saw nightly nayduck tests failing on your PR. The difference is, that if you did change a dependency, then it’s probably you who made the check turn red :) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10216 +/- ##
==========================================
- Coverage 71.83% 71.82% -0.02%
==========================================
Files 707 707
Lines 141904 142111 +207
Branches 141904 142111 +207
==========================================
+ Hits 101942 102072 +130
- Misses 35248 35323 +75
- Partials 4714 4716 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thank you for pushing this through! :D |
No description provided.