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

Move aws_smithy_http::operation::error::BuildError into aws-smithy-types #3032

Merged
merged 10 commits into from
Oct 12, 2023

Conversation

ysaito1001
Copy link
Contributor

@ysaito1001 ysaito1001 commented Oct 5, 2023

Motivation and Context

Takes care of the first part of #3054 (the remaining part is denoted as TODO(runtimeCratesVersioningCleanup) and until that's done the issue will not be closed).

Description

This PR moves from aws-smithy-http::operation::error::{BuildError, SerializationError} to aws-smithy-types::error::operation::{BuildError, SerializationError}.

Within the origin crate, we leave "breadcrumbs" (i.e. reexports) for existing customers of the items above so they are not broken by the move. The breadcrumps will be removed by the part two of the issue.

As part of the move, aws_smithy_http::endpoint::EndpointPrefix::new now returns its crate::endpoint::error::InvalidEndpointError instead of crate::operation::error::BuildError for two reasons:

  • BuildError is now in a stable crate and for an InvalidUri variant to be created, it needed to take a http::uri::InvalidUri from a unstable crate, which we cannot expose in public API.
  • The new error is more closely related to the endpoint business.

Testing

Relied on the tests in CI.

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.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

@jdisanti do you think this makes more sense in aws-smithy-runtime-api? I guess we need to define a litmus test of what goes where.

@ysaito1001
Copy link
Contributor Author

do you think this makes more sense in aws-smithy-runtime-api

Yeah, that distinction is blurry to me. For things like BuildError in particular, I don't have a guiding principle of which crate is a better home.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@ysaito1001 ysaito1001 marked this pull request as ready for review October 10, 2023 19:43
@ysaito1001 ysaito1001 requested review from a team as code owners October 10, 2023 19:43
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

CHANGELOG.next.toml Outdated Show resolved Hide resolved
rust-runtime/aws-smithy-http/src/endpoint/error.rs Outdated Show resolved Hide resolved
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@ysaito1001 ysaito1001 added this pull request to the merge queue Oct 12, 2023
Merged via the queue into main with commit 8439f2a Oct 12, 2023
39 of 41 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/move-operation-build-error-to-smithy-types branch October 12, 2023 22:15
github-merge-queue bot pushed a commit that referenced this pull request Oct 19, 2023
…3070)

## Motivation and Context
Completes #3054 (a follow-up on #3032)

## Description
#3032 moved `BuildError` from `aws_smithy_http::operation::error` to
`aws_smithy_types::error::operation`. That PR also left "breadcrumbs",
so that customers could still consume `BuldError` from `aws_smithy_http`
after the move.

This PR turns breadcrumbs into deprecation messages (via
`#[deprecated(...)]`) and updates existing places that used to use moved
types from `aws_smithy_http` to `aws_smithy_types`.

## Testing
Relied on tests in CI.

## Checklist
- [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._

---------

Co-authored-by: Russell Cohen <rcoh@amazon.com>
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.

4 participants