Don't panic if CryptoProvider already installed #1391
Don't panic if CryptoProvider already installed #1391dd-mergequeue[bot] merged 3 commits intomainfrom
Conversation
…ovider already installed
BenchmarksComparisonBenchmark execution time: 2025-12-10 10:24:24 Comparing candidate commit 3444059 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1391 +/- ##
==========================================
+ Coverage 71.12% 71.14% +0.01%
==========================================
Files 403 403
Lines 64084 64134 +50
==========================================
+ Hits 45581 45626 +45
- Misses 18503 18508 +5
🚀 New features to boost your workflow:
|
…rbitrarily installed CryptoProvider
ca60487 to
ff90dbc
Compare
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-apple-darwin
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-apple-darwin
x86_64-unknown-linux-gnu
|
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
What does this PR do?
rustls'
install_defaultreturns aResult<(), Arc<CryptoProvider>>, theErrcase being the currently installed Crypto Provider. Currently, if for one reason or another,ensure_crypto_provider_initializedis called when a CryptoProvider is already installed, it will always panic.This PR aims to panic if only necessary (ie, the installed crypto provider is not compatible with what's needed)
Motivation
AFAIK, no crashes related to this were reported in the real world, but this popped up in an antithesis report, and seems like a problem worth fixing.
Additional Notes
I also change the
LazyLock<()>to aOnce,LazyLockis aOncewith a value and we hold no value into it.How to test the change?
Future antithesis reports with similar scenarios should no longer contain this panic.