-
Notifications
You must be signed in to change notification settings - Fork 10
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
[NO-TICKET] First step of migration from hyper 0.x to 1.x #682
Conversation
These features will help us migrate to 1.x, as suggested in the migration guide: https://hyper.rs/guides/1/upgrading/ .
Without this tweak, I was getting ``` Compiling hyper v0.14.28 error[E0599]: no method named `set_http1_header_read_timeout` found for struct `Conn` in the current scope --> /home/ivo.anjo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.28/src/server/conn/http1.rs:374:18 | 374 | conn.set_http1_header_read_timeout(header_read_timeout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `Conn<I, _, _>` | ::: /home/ivo.anjo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.28/src/proto/h1/conn.rs:34:1 | 34 | pub(crate) struct Conn<I, B, T> { | ------------------------------- method `set_http1_header_read_timeout` not found for this struct ``` and indeed this method is ```rust #[cfg(all(feature = "server", feature = "runtime"))] pub(crate) fn set_http1_header_read_timeout(&mut self, val: Duration) { self.state.h1_header_read_timeout = Some(val); } ```
BenchmarksComparisonBenchmark execution time: 2024-10-18 09:47:33 Comparing candidate commit 07765cf in PR branch Found 9 performance improvements and 11 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics. scenario:concentrator/add_spans_to_concentrator
scenario:credit_card/is_card_number/
scenario:credit_card/is_card_number/37828224631
scenario:credit_card/is_card_number/37828224631000521389798
scenario:credit_card/is_card_number_no_luhn/
scenario:credit_card/is_card_number_no_luhn/ 3782-8224-6310-005
scenario:credit_card/is_card_number_no_luhn/ 378282246310005
scenario:credit_card/is_card_number_no_luhn/37828224631
scenario:credit_card/is_card_number_no_luhn/378282246310005
scenario:credit_card/is_card_number_no_luhn/37828224631000521389798
scenario:sql/obfuscate_sql_string
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
BaselineOmitted due to size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #682 +/- ##
=======================================
Coverage 71.81% 71.82%
=======================================
Files 271 271
Lines 40979 40984 +5
=======================================
+ Hits 29428 29435 +7
+ Misses 11551 11549 -2
|
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.
LGTM!
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.
LGTM!
I'm going to go ahead and merge this in! Do feel free to chime in if there's any concerns :D |
What does this PR do?
This PR takes the first step to migrate libdatadog from using version 0.x of the hyper http library crate to version 1.x.
Specifically, it enables the recommended "backports" and "deprecated" features from the upgrade guide, which give us warnings and a bridge to start adopting the new APIs from 1.x.
I then did a pass and fixed every deprecation and warning I could find.
Motivation
I've started seeing issues with keeping packages up-to-date because newer versions require hyper 1.x, and the hyper 0.x-based ecosystem is getting increasingly unmaintained/abandoned.
Additional Notes
During this week's weekly meeting, I took an action item to identify what teams needed to be involved in this migration for which packages. These are:
crashtracker
,crashtracker-ffi
,profiling
,profiling-ffi
data-pipeline
ddcommon
,ddcommon-ffi
,live-debugger
ddtelemetry
remote-config
sidecar
,sidecar-ffi
trace-mini-agent
trace-utils
We'll need to move all these packages to hyper 1.x (but not for this PR! :).
How to test the change?
Hopefully our existing test coverage is enough for us to be able to validate that everything is working nicely with these small API changes.