Skip to content
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

refactor(app/inbound): forward-compatible test code #3671

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

cratelyn
Copy link
Collaborator

@cratelyn cratelyn commented Feb 27, 2025

see linkerd/linkerd2#8733 for more information.

see #3559 and #3614 for more information on the ForwardCompatibleBody<B> wrapper.

this branch updates test code in linkerd-app-inbound so that it interacts with request and response bodies via an adapter that polls for frames in a manner consistent with the 1.0 api of http_body.

this allows us to limit the diff in #3504, which will only need to remove this adapter once using hyper 1.0.

see #3672 and #3673, which perform the same change for linkerd-app-outbound and linkerd-app-integration, respectively.

@cratelyn cratelyn changed the title Kate/hyper 1.x forward compatible tests app inbound refactor(app/inbound): forward-compatible test code Feb 27, 2025
@cratelyn cratelyn force-pushed the kate/hyper-1.x-forward-compatible-tests-app-inbound branch from 2e4f1be to eb496d6 Compare February 27, 2025 21:10
@cratelyn cratelyn force-pushed the kate/hyper-1.x-forward-compatible-tests-app-inbound branch from eb496d6 to 61072a5 Compare February 27, 2025 21:26
@cratelyn cratelyn marked this pull request as ready for review February 27, 2025 21:45
@cratelyn cratelyn requested a review from a team as a code owner February 27, 2025 21:45
@cratelyn cratelyn merged commit d02c377 into main Feb 28, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/hyper-1.x-forward-compatible-tests-app-inbound branch February 28, 2025 14:33
cratelyn added a commit that referenced this pull request Feb 28, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

this branch updates test code in `linkerd-app-outbound` so that it
interacts with request and response bodies via an adapter that polls for
frames in a manner consistent with the 1.0 api of `http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

see #3671 and #3673, which perform the same change for
`linkerd-app-inbound` and `linkerd-app-integration`, respectively.

---

* chore(app/outbound): `linkerd-http-body-compat` test dependency

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/outbound): use `Response::into_body()`

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/outbound): use `ForwardCompatibleBody`

see linkerd/linkerd2#8733.

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/outbound): use `ForwardCompatibleBody`

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/outbound): use `ForwardCompatibleBody`

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/outbound): use `ForwardCompatibleBody`

Signed-off-by: katelyn martin <[email protected]>

---------

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Feb 28, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

this branch updates test code in `linkerd-app-integration` so that it
interacts with request and response bodies via an adapter that polls for
frames in a manner consistent with the 1.0 api of `http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

see #3671 and #3672, which perform the same change for
`linkerd-app-inbound` and `linkerd-app-outbound`, respectively.

---

* chore(app/integration): `linkerd-http-body-compat` test dependency

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/integration): generalize `hyper::Body`

Signed-off-by: katelyn martin <[email protected]>

* refactor(app/integration): use `ForwardCompatibleBody`

Signed-off-by: katelyn martin <[email protected]>

---------

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Feb 28, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

this branch updates test code in `linkerd-app-outbound` related to
timeouts so that it interacts with request and response bodies via an
adapter that polls for frames in a manner consistent with the 1.0 api of
`http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

see #3671, #3672, and #3673, which performed the same change for
`linkerd-app-inbound`, other code in `linkerd-app-outbound`, and
`linkerd-app-integration`, respectively.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Feb 28, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

this branch updates test code in `linkerd-app-outbound` related to
timeouts so that it interacts with request and response bodies via an
adapter that polls for frames in a manner consistent with the 1.0 api of
`http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

see #3671, #3672, and #3673, which performed the same change for
`linkerd-app-inbound`, other code in `linkerd-app-outbound`, and
`linkerd-app-integration`, respectively.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Mar 4, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

`telemetry::log_stream::collect_logs` is a function responsible for
digesting a streaming body, and deserializing each chunk into a
`serde_json::Value`, until either (a) a shutdown signal is received, or
(b) the end of the body is reached.

this commit updates test code in `linkerd-app-integration` so that it
interacts with request and response bodies via an adapter that polls for
frames in a manner consistent with the 1.0 api of `http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

* linkerd/linkerd2#8733
* #3671
* #3672
* #3673
* #3676

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Mar 4, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

`telemetry::log_stream::collect_logs` is a function responsible for
digesting a streaming body, and deserializing each chunk into a
`serde_json::Value`, until either (a) a shutdown signal is received, or
(b) the end of the body is reached.

this commit updates test code in `linkerd-app-integration` so that it
interacts with request and response bodies via an adapter that polls for
frames in a manner consistent with the 1.0 api of `http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

* linkerd/linkerd2#8733
* #3671
* #3672
* #3673
* #3676

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Mar 4, 2025
see linkerd/linkerd2#8733 for more
information.

see #3559 and
#3614 for more information
on the `ForwardCompatibleBody<B>` wrapper.

`telemetry::log_stream::collect_logs` is a function responsible for
digesting a streaming body, and deserializing each chunk into a
`serde_json::Value`, until either (a) a shutdown signal is received, or
(b) the end of the body is reached.

this commit updates test code in `linkerd-app-integration` so that it
interacts with request and response bodies via an adapter that polls for
frames in a manner consistent with the 1.0 api of `http_body`.

this allows us to limit the diff in
#3504, which will only
need to remove this adapter once using hyper 1.0.

* linkerd/linkerd2#8733
* #3671
* #3672
* #3673
* #3676

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Mar 10, 2025
note: this commit will not compile, code changes are intentionally
elided from this commit.

this commit upgrades hyper, http, tonic, prost, related dependencies,
and their assorted cargo features.

see <linkerd/linkerd2#8733>.

see also:

* #3379
* #3380
* #3382
* #3405
* hyperium/hyper#3796
* #3411
* #3421
* #3427
* #3428
* #3432
* #3433
* #3444
* #3445
* #3454
* #3455
* #3456
* #3457
* #3461
* #3459
* #3465
* #3466
* #3467
* #3468
* linkerd/linkerd2-proxy-api#421
* linkerd/linkerd2#13492
* linkerd/linkerd2#13493
* hyperium/hyper#3816
* #3472
* #3473
* #3479
* tokio-rs/tokio#7059
* #3509
* hyperium/http-body#140
* #3515
* hyperium/http-body#141
* #3530
* #3531
* #3540
* #3556
* #3558
* #3559
* #3564
* #3567
* #3573
* #3583
* hyperium/http-body#144
* #3585
* #3586
* #3597
* #3598
* #3611
* #3614
* #3615
* #3616
* #3647
* #3651
* #3653
* #3654
* #3655
* #3656
* #3657
* #3660
* #3671
* #3672
* #3673
* #3676
* hyperium/http-body#147
* #3692
* #3699
* #3700
* #3701
* #3708
* linkerd/drain-rs#36
* #3715
* #3717
* eminence/procfs#340

---

squash:

chore(deps): add hyper-util workspace dependency

chore(deps): add http-body-util workspace dependency

chore(deps): upgrade linkerd2-proxy-api

this commit represents main as of linkerd/linkerd2-proxy-api#421.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Mar 11, 2025
note: this commit will not compile, code changes are intentionally
elided from this commit.

this commit upgrades hyper, http, tonic, prost, related dependencies,
and their assorted cargo features.

see <linkerd/linkerd2#8733>.

see also:

* #3379
* #3380
* #3382
* #3405
* hyperium/hyper#3796
* #3411
* #3421
* #3427
* #3428
* #3432
* #3433
* #3444
* #3445
* #3454
* #3455
* #3456
* #3457
* #3461
* #3459
* #3465
* #3466
* #3467
* #3468
* linkerd/linkerd2-proxy-api#421
* linkerd/linkerd2#13492
* linkerd/linkerd2#13493
* hyperium/hyper#3816
* #3472
* #3473
* #3479
* tokio-rs/tokio#7059
* #3509
* hyperium/http-body#140
* #3515
* hyperium/http-body#141
* #3530
* #3531
* #3540
* #3556
* #3558
* #3559
* #3564
* #3567
* #3573
* #3583
* hyperium/http-body#144
* #3585
* #3586
* #3597
* #3598
* #3611
* #3614
* #3615
* #3616
* #3647
* #3651
* #3653
* #3654
* #3655
* #3656
* #3657
* #3660
* #3671
* #3672
* #3673
* #3676
* hyperium/http-body#147
* #3692
* #3699
* #3700
* #3701
* #3708
* linkerd/drain-rs#36
* #3715
* #3717
* eminence/procfs#340

---

squash:

chore(deps): add hyper-util workspace dependency

chore(deps): add http-body-util workspace dependency

chore(deps): upgrade linkerd2-proxy-api

this commit represents main as of linkerd/linkerd2-proxy-api#421.

Signed-off-by: katelyn martin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants