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

Bump lambda_http dependency of aws-smithy-http-server to 0.8.0 #2685

Merged
merged 3 commits into from
May 10, 2023

Conversation

david-perez
Copy link
Contributor

@david-perez david-perez commented May 9, 2023

This patch also removes the unneeded dependency on lambda_runtime by
aws-smithy-http-server-python.

This patch also refactors LambdaHandler's convert_event to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.

This patch also bumps aws-smithy-http-server dependency on mime to 0.3.4.

cargo +nightly-2022-11-16 minimal-versions check --all-features otherwise
fails when using 0.3.0, because we require impl fmt::Display for mime::FromStrError, which was first introduced in 0.3.4.

As to why minimal-versions is now picking mime 0.3.0 with this patch, it's
because in lambda_http 0.7.3, they had mime = "0.3.16",
and in lambda_http 0.8.0, they've now relaxed that to mime = "0.3".

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This patch also removes the unneeded dependency on `lambda_runtime` by
`aws-smithy-http-server-python`.

This patch also refactors `LambdaHandler`'s `convert_event` to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.
@david-perez david-perez added next-release fixes / updates that need to be merged prior to release breaking-change This will require a breaking change server Rust server SDK labels May 9, 2023
@david-perez david-perez requested review from a team as code owners May 9, 2023 15:38
@david-perez david-perez requested a review from unexge May 9, 2023 15:38
@github-actions
Copy link

github-actions bot commented May 9, 2023

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • Server Test Python (ignoring whitespace)
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

`cargo +nightly-2022-11-16 minimal-versions check --all-features`
otherwise fails when using 0.3.0, because we require `impl fmt::Display
for mime::FromStrError`, which was first introduced in 0.3.4.
@david-perez
Copy link
Contributor Author

In CI, cargo +nightly-2022-11-16 minimal-versions check --all-features on aws-smithy-http-server fails with:

Checking mime v0.3.0
...
error[E0599]: the method `as_display` exists for reference `&FromStrError`, but its trait bounds were not satisfied
  --> aws-smithy-http-server/src/rejection.rs:18:13
   |
18 |     #[error("invalid `Content-Type` header value mime type: {0}")]
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&FromStrError` due to unsatisfied trait bounds
   |
  ::: /opt/cargo/registry/src/github.com-1ecc6299db9ec823/mime-0.3.0/src/lib.rs:72:1
   |
72 | pub struct FromStrError {
   | ----------------------- doesn't satisfy `FromStrError: std::fmt::Display`
   |
   = note: the following trait bounds were not satisfied:
           `FromStrError: std::fmt::Display`
           which is required by `&FromStrError: DisplayAsDisplay`

Indeed, we require mime::FromStrError: std::fmt::Display, but said trait was first implemented in this commit, which first made its way out in mime 0.3.4. As to why minimal-versions is now picking mime 0.3.0 with this patch, it's because in lambda_http 0.7.3, they had mime = "0.3.16", and in lambda_http 0.8.0, they've now relaxed that to mime = "0.3".

I'll go ahead and bump the dependency of aws-smithy-http-server on mime to 0.3.4 and update the PR description.

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • Server Test Python (ignoring whitespace)
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@david-perez david-perez added this pull request to the merge queue May 10, 2023
Merged via the queue into main with commit 04db5e3 May 10, 2023
@david-perez david-perez deleted the davidpz/bump-lambda-runtime-deps-to-0.8.0 branch May 10, 2023 10:06
david-perez added a commit that referenced this pull request May 10, 2023
…0.8.0 (#2685)"

This reverts commit 04db5e3.

This is a breaking change that needs to wait to be merged in until the
next breaking release.
david-perez added a commit that referenced this pull request May 10, 2023
…0.8.0 (#2685)" (#2690)

This reverts commit 04db5e3.

This is a breaking change that needs to wait to be merged in until the
next breaking release.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 10, 2023
…2685)

This patch also removes the unneeded dependency on `lambda_runtime` by
`aws-smithy-http-server-python`.

This patch also refactors `LambdaHandler`'s `convert_event` to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.

This patch also bumps `aws-smithy-http-server` dependency on `mime` to
0.3.4.

`cargo +nightly-2022-11-16 minimal-versions check --all-features`
otherwise
fails when using 0.3.0, because we require `impl fmt::Display for
mime::FromStrError`, which was first introduced in 0.3.4.

As to why `minimal-versions` is now picking `mime` 0.3.0 with this
patch, it's
because in `lambda_http` 0.7.3, they had [`mime =

"0.3.16"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/99dba6447253ac87cf3cefeb2ba130b50514f9df/lambda-http/Cargo.toml#L35-L35),
and in `lambda_http` 0.8.0, they've now relaxed that to [`mime =

"0.3"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/393d6447bea0502e1f939d197f4facc228e6e007/lambda-http/Cargo.toml#L36).


## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 18, 2023
…2685)

This patch also removes the unneeded dependency on `lambda_runtime` by
`aws-smithy-http-server-python`.

This patch also refactors `LambdaHandler`'s `convert_event` to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.

This patch also bumps `aws-smithy-http-server` dependency on `mime` to
0.3.4.

`cargo +nightly-2022-11-16 minimal-versions check --all-features`
otherwise
fails when using 0.3.0, because we require `impl fmt::Display for
mime::FromStrError`, which was first introduced in 0.3.4.

As to why `minimal-versions` is now picking `mime` 0.3.0 with this
patch, it's
because in `lambda_http` 0.7.3, they had [`mime =

"0.3.16"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/99dba6447253ac87cf3cefeb2ba130b50514f9df/lambda-http/Cargo.toml#L35-L35),
and in `lambda_http` 0.8.0, they've now relaxed that to [`mime =

"0.3"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/393d6447bea0502e1f939d197f4facc228e6e007/lambda-http/Cargo.toml#L36).


## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 18, 2023
…0.8.0 (#2685)" (#2690)

This reverts commit 04db5e3.

This is a breaking change that needs to wait to be merged in until the
next breaking release.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 22, 2023
…2685)

This patch also removes the unneeded dependency on `lambda_runtime` by
`aws-smithy-http-server-python`.

This patch also refactors `LambdaHandler`'s `convert_event` to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.

This patch also bumps `aws-smithy-http-server` dependency on `mime` to
0.3.4.

`cargo +nightly-2022-11-16 minimal-versions check --all-features`
otherwise
fails when using 0.3.0, because we require `impl fmt::Display for
mime::FromStrError`, which was first introduced in 0.3.4.

As to why `minimal-versions` is now picking `mime` 0.3.0 with this
patch, it's
because in `lambda_http` 0.7.3, they had [`mime =

"0.3.16"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/99dba6447253ac87cf3cefeb2ba130b50514f9df/lambda-http/Cargo.toml#L35-L35),
and in `lambda_http` 0.8.0, they've now relaxed that to [`mime =

"0.3"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/393d6447bea0502e1f939d197f4facc228e6e007/lambda-http/Cargo.toml#L36).


## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 22, 2023
…0.8.0 (#2685)" (#2690)

This reverts commit 04db5e3.

This is a breaking change that needs to wait to be merged in until the
next breaking release.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 22, 2023
…2685)

This patch also removes the unneeded dependency on `lambda_runtime` by
`aws-smithy-http-server-python`.

This patch also refactors `LambdaHandler`'s `convert_event` to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.

This patch also bumps `aws-smithy-http-server` dependency on `mime` to
0.3.4.

`cargo +nightly-2022-11-16 minimal-versions check --all-features`
otherwise
fails when using 0.3.0, because we require `impl fmt::Display for
mime::FromStrError`, which was first introduced in 0.3.4.

As to why `minimal-versions` is now picking `mime` 0.3.0 with this
patch, it's
because in `lambda_http` 0.7.3, they had [`mime =

"0.3.16"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/99dba6447253ac87cf3cefeb2ba130b50514f9df/lambda-http/Cargo.toml#L35-L35),
and in `lambda_http` 0.8.0, they've now relaxed that to [`mime =

"0.3"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/393d6447bea0502e1f939d197f4facc228e6e007/lambda-http/Cargo.toml#L36).


## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 22, 2023
…0.8.0 (#2685)" (#2690)

This reverts commit 04db5e3.

This is a breaking change that needs to wait to be merged in until the
next breaking release.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
david-perez added a commit that referenced this pull request May 30, 2023
…2685) (#2691)

This is #2685 again, which was
merged
prematurely and reverted in
#2690.

This time we won't merge it until it's due time.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This will require a breaking change next-release fixes / updates that need to be merged prior to release server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants