-
Notifications
You must be signed in to change notification settings - Fork 42
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
Ensure that a process-level crypto provider exists #822
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThis pull request introduces a new dependency to the Possibly related PRs
Suggested reviewers
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
plane/Cargo.toml (1)
36-36
: LGTM! Consider using a caret version requirement.The addition of the
rustls
dependency is appropriate and aligns with the PR objectives to establish a process-levelCryptoProvider
. This change is consistent with the project's use of other security-related crates.Consider using a caret (
^
) version requirement for more flexible dependency management:-rustls = "0.23.14" +rustls = "^0.23.14"This allows for compatible updates within the 0.23.x range, potentially including bug fixes and minor improvements.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (2)
- plane/Cargo.toml (1 hunks)
- plane/src/main.rs (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
plane/src/main.rs (1)
89-90
: Approve the crypto provider installation with suggestions for improvementThe addition of
rustls::crypto::ring::default_provider().install_default();
addresses the PR objective of establishing a process-levelCryptoProvider
. This should resolve the issue with certificate loading timing and allow tests to pass.However, there are a couple of points to consider:
Error handling: The result of the installation is currently ignored. Consider adding error handling to catch and log any potential issues during the installation process.
Logging: It might be beneficial to add a log statement indicating that the crypto provider has been successfully installed.
Here's a suggested improvement:
match rustls::crypto::ring::default_provider().install_default() { Ok(_) => tracing::info!("Default crypto provider installed successfully"), Err(e) => tracing::error!("Failed to install default crypto provider: {}", e), }To verify the impact of this change, please run the following script:
This script will run the test suite and check for any panics or errors related to the crypto provider in the logs. Please review the results to ensure that the tests are passing and there are no unhandled errors.
rustls
requires a process-levelCryptoProvider
be setup. We already do this indynamic-proxy
, which is why those tests pass, but we do not do it in Plane itself so it sometimes fails.