-
Notifications
You must be signed in to change notification settings - Fork 107
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
Check for duplicate crate dependencies in CI #2986
Merged
Merged
Conversation
This file contains 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
teor2345
added
A-dependencies
Area: Dependency file updates
A-devops
Area: Pipelines, CI/CD and Dockerfiles
C-enhancement
Category: This is an improvement
P-Medium
labels
Nov 1, 2021
2 tasks
teor2345
changed the title
Check for new duplicate crate dependencies in CI
Check for duplicate crate dependencies in CI
Nov 1, 2021
`cargo deny init`
Also cleanup trailing whitespace.
Allow the current set of duplicates and sources, with references to the tickets that will fix them.
Also check for: - unexpected crate sources - outdated Cargo.lock (required for accurate duplicate and source checks)
teor2345
force-pushed
the
duplicate-dependencies-ci
branch
from
November 1, 2021 01:56
5f88b00
to
3539dc5
Compare
3 tasks
jvff
approved these changes
Nov 1, 2021
dconnolly
reviewed
Nov 1, 2021
dconnolly
reviewed
Nov 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-dependencies
Area: Dependency file updates
A-devops
Area: Pipelines, CI/CD and Dockerfiles
C-enhancement
Category: This is an improvement
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.
Motivation
When we add duplicate dependencies, Zebra compiles slower, and its binaries will be larger.
This slows down CI, and can fill up CI disks.
In some cases, duplicate dependencies can result in hard-to-diagnose bugs in Zebra.
This happens because code expects a single instance of some structs, but there are multiple instances running.
Duplicate dependencies and unexpected crate sources can also be a security risk.
Scheduling
This is unexpected work in Sprint 21, to make sure that tokio is upgraded correctly.
It should be merged before the tokio roll-up PR.
Solution
This PR detects new duplicate dependencies and new unexpected crate sources.
Current duplicates and sources are allowed. I opened separate tickets to remove them.
CI:
cargo deny check bans
step to CIcargo deny check sources
step to CIConfiguration:
deny.toml
config(so this PR doesn't actually need to change any dependencies)
Review
@jvff should review this PR.
It blocks the tokio roll-up PR.
Reviewer Checklist
deny.toml
makes senseFollow Up Work
Tickets:
rand
#2391