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(proxy/http): create linkerd-http-version crate #3379

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

cratelyn
Copy link
Collaborator

this outlines the http version type into its own crate.

reëxports are added to make this a backwards compatible change, i.e. no
changes to the public api of linkerd-proxy-http are performed here.

this outlines the http version type into its own crate.

reëxports are added to make this a backwards compatible change, i.e. no
changes to the public api of `linkerd-proxy-http` are performed here.

Signed-off-by: katelyn martin <[email protected]>
this adds some brief documentation comments to the crate.

Signed-off-by: katelyn martin <[email protected]>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some brief doc comments are added, while we're here.

@@ -50,6 +48,7 @@ pub use http::{
pub use hyper::body::HttpBody;
pub use linkerd_http_box::{BoxBody, BoxRequest, BoxResponse, EraseResponse};
pub use linkerd_http_executor::TracingExecutor;
pub use linkerd_http_version::{self as version, Version};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reëxports are added to make this a backwards compatible change, i.e. no
changes to the public api of linkerd-proxy-http are performed here.

Comment on lines +45 to -47
linkerd-http-classify = { path = "../../http/classify" }
linkerd-http-executor = { path = "../../http/executor" }
linkerd-http-h2 = { path = "../../http/h2" }
linkerd-http-classify = { path = "../../http/classify" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorting, while we're here

@cratelyn cratelyn marked this pull request as ready for review November 21, 2024 19:16
@cratelyn cratelyn requested a review from a team as a code owner November 21, 2024 19:16
@cratelyn cratelyn changed the title feat(proxy/http): create linkerd-http-version crate refactor(proxy/http): create linkerd-http-version crate Nov 21, 2024
cratelyn added a commit that referenced this pull request Nov 21, 2024
this pulls out the `insert` module from `linkerd-proxy-http`.

a reëxport is added so that this does not affect the public api of the
http crate.

NB: based on #3379.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 21, 2024
NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

Signed-off-by: katelyn martin <[email protected]>
@cratelyn cratelyn enabled auto-merge (squash) November 21, 2024 20:41
@cratelyn
Copy link
Collaborator Author

❗ enabled auto merge

@cratelyn cratelyn merged commit efba099 into main Nov 21, 2024
16 checks passed
@cratelyn cratelyn deleted the kate/yoink-http-version branch November 21, 2024 20:55
cratelyn added a commit that referenced this pull request Nov 21, 2024
this pulls out the `insert` module from `linkerd-proxy-http`.

a reëxport is added so that this does not affect the public api of the
http crate.

NB: based on #3379.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 21, 2024
* refactor(proxy/http): create `linkerd-http-insert` crate

this pulls out the `insert` module from `linkerd-proxy-http`.

a reëxport is added so that this does not affect the public api of the
http crate.

NB: based on #3379.

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

* docs(http/insert): doc comments

this commit adds documentation to `linkerd-http-insert`.

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

---------

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 21, 2024
NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 22, 2024
NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 22, 2024
NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 22, 2024
…3382)

NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 25, 2024
…3382)

NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

Signed-off-by: katelyn martin <[email protected]>
cratelyn added a commit that referenced this pull request Nov 26, 2024
* refactor(proxy/http): move types to `linkerd-http-classify` (#3382)

in this case we already had a crate defining the classify traits, but
the http body and other assorted middleware were defined in
`linkerd-proxy-http`.

this commit moves those types to the `linkerd-http-classify` crate,
which astute readers may notice, is a concrete step towards simplifying
the `linkerd-proxy-http` crate's upgrade process.

one small detail worth calling out: we implement `http_body::Body`
directly, to avoid taking on a `hyper` dependency. otherwise, nothing
has changed in the `channel`, `gate`, and `insert` middleware.

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

* refactor(proxy/http): create `linkerd-http-retain` crate (#3382)

this moves the `Retain` middleware from `linkerd-proxy-http` into a new
`linkerd-http-retain` crate.

as previously, reëxports are added to make this a backwards compatible
change.

this moves another http body middleware out of the proxy's core http
crate. great news.

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

* refactor(proxy/http): create `linkerd-http-stream-timeouts` crate (#3382)

this commit outlines the stream timeout middleware, pulling it out of
`linkerd-proxy-http` and into a standalone crate.

again, reëxports are added to make this a backwards compatible change.

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

* refactor(proxy/http): create  `linkerd-http-override-authority` crate (#3382)

NB: based on #3379 and #3380.

this pull the `override_authority` submodule out of
`linkerd-http-proxy` and into a standalone crate.

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

* refactor(proxy/http): move `is_bad_request()` into `upgrade` (#3382)

this is only used in once place, so as a brief chore before we move the
upgrade submodule out into its own crate, we pull `is_bad_request()`
next to its call site.

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

* refactor(proxy/http): create `linkerd-http-upgrade` crate (#3382)

this moves the inter-related `upgrade` and `glue` submodules out of the
`linkerd-proxy-http` library and into a new standalone crate.

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

---------

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