smithy-rs/rust-runtime/aws-smithy-http
John DiSanti 30a801a8fc
Fix subtle break of endpoint prefixes due to semver (#3318)
When we released smithy-rs release-2023-12-08, we introduced a silent
failure for endpoint prefixes, and not in the newly released version,
but in the previous releases. There is a subtle issue with semver that
causes this. This PR addresses the endpoint prefix part of this problem.
Other PRs will fix other parts that are broken by this semver issue.

The issue is that unstable (0.x) runtime crates are declaring types that
get placed into the `ConfigBag`, and these types are referenced in the
`ConfigBag` across crate boundaries. This by itself isn't a problem, but
because our stable 1.x crates depend on the unstable crates, it becomes
a problem. By releasing 1.1.0 that depends on 0.61, consumers of 1.x
pull in both 0.60 and 0.61. The generated code pulls in 0.60, and the
1.1.x crates pull in 0.61. This is fine since two semver-incompatible
crate versions can be in the dependency closure. Thus, the generated
code which is using 0.60 is placing a 0.60 type in the `ConfigBag`, and
the runtime crates that pull the type out of the `ConfigBag` are
expecting a 0.61 version of it. This leads to the type not existing upon
lookup, which then causes the silent break.

This PR fixes this by moving the `EndpointPrefix` type and its
associated methods into `aws-smithy-runtime-api`, a stable crate. The
`aws-smithy-http` unstable crate is updated to point to the new stable
version so that a patch release of that crate will solve the issue for
old versions going forward as well.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-01-12 20:03:16 +00:00
..
fuzz Fix `SPDX-License-Identifier` in header comments (#1377) 2022-05-09 09:50:46 -05:00
proptest-regressions Fix label & query URI encoding (#953) 2021-12-09 11:57:05 -05:00
src Fix subtle break of endpoint prefixes due to semver (#3318) 2024-01-12 20:03:16 +00:00
Cargo.toml Scrape doc examples (#3334) 2023-12-20 18:11:43 +00:00
LICENSE Prefix Smithy runtime crates with `aws-` (#788) 2021-10-20 10:21:15 -07:00
README.md Fix repo org move issues (#3166) 2023-11-10 18:51:04 +00:00
additional-ci Remove excess cargo test passes from additional-ci (#1595) 2022-07-28 20:40:49 +00:00
external-types.toml Fix repo org move issues (#3166) 2023-11-10 18:51:04 +00:00

README.md

aws-smithy-http

Core HTTP primitives for service clients generated by smithy-rs including:

  • HTTP Body implementation
  • Endpoint support
  • HTTP header deserialization
  • Event streams
  • ByteStream: (supported on crate feature rt-tokio only) a misuse-resistant abstraction for streaming binary data

This crate is part of the AWS SDK for Rust and the smithy-rs code generator. In most cases, it should not be used directly.