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

Design/Implement runtime crates versioning strategy #3019

Closed
8 tasks done
rcoh opened this issue Oct 3, 2023 · 7 comments
Closed
8 tasks done

Design/Implement runtime crates versioning strategy #3019

rcoh opened this issue Oct 3, 2023 · 7 comments
Assignees

Comments

@rcoh
Copy link
Collaborator

rcoh commented Oct 3, 2023

The Rust SDK needs to have several 1.0 crates—All publicly visible types will be contained with 1.x crates. Other crates will remain at 0.x.

The following crates will go 1.0:

  • aws-smithy-types & aws-types
  • aws-smithy-runtime-api
  • aws-smithy-async
  • aws-credential-types
  • aws-config: Not re-exported but will be used directly by customers. A 2.0 could be released without causing major breakage.

All other runtime crates will remain 0.*, including aws-runtime

The following actions need to be taken:

Here is the current breakdown:

allowed_external_types = [
        # OK
        "aws_smithy_types::*",
        "aws_credential_types::*",
        "aws_types::*",
        "aws_smithy_runtime_api::*",
        "aws_smithy_async::*",

        # TODO: Move
        "aws_http::request_id::RequestId", # move to aws-types

        # move to aws_smithy_types
        "aws_smithy_http::result::CreateUnhandledError",
        "aws_smithy_http::result::SdkError",
        # Note: this means SdkBody moves to aws-smithy-types—`http` feature?
        "aws_smithy_http::byte_stream::*",
        "aws_smithy_http::body::SdkBody",
        "aws_smithy_http::operation::error::BuildError",

        # `set_invocation_id_generator` — consider making pub(crate) or moving trait to AwsTypes
        "aws_runtime::invocation_id::SharedInvocationIdGenerator",
        "aws_runtime::invocation_id::InvocationIdGenerator",

        # pending move to runtime-api?
        "aws_smithy_client::http_connector::HttpConnector",

        # delete?
        "aws_smithy_http::endpoint::ResolveEndpoint",
        "aws_smithy_http::endpoint::SharedEndpointResolver",

        # new crate: aws-smithy-event-stream?`
        "aws_smithy_http::event_stream::receiver::Receiver",


        # pending HTTP refactor
        "http::*"
]
@rcoh rcoh self-assigned this Oct 3, 2023
@Velfi
Copy link
Contributor

Velfi commented Oct 3, 2023

When we move SdkBody we should rename it too. I think having Sdk in the name feels wrong for a smithy thing.

@Velfi
Copy link
Contributor

Velfi commented Oct 3, 2023

HttpConnector is being renamed as part of John's PR.

@rcoh
Copy link
Collaborator Author

rcoh commented Oct 3, 2023

When we move SdkBody we should rename it too. I think having Sdk in the name feels wrong for a smithy thing.

yeah that seems reasonable—although the smithy clients are SDKs in a generic sense so maybe it's not as much of an issue?

@Velfi
Copy link
Contributor

Velfi commented Oct 3, 2023

also related: #3016

@jdisanti
Copy link
Collaborator

jdisanti commented Oct 3, 2023

HttpConnector is being renamed as part of #3011.

Not renamed. HttpClient is something new, and HttpConnector is still around.

@jdisanti
Copy link
Collaborator

jdisanti commented Oct 3, 2023

        # delete?
        "aws_smithy_http::endpoint::ResolveEndpoint",
        "aws_smithy_http::endpoint::SharedEndpointResolver",

Yes. These are the old middleware endpoint resolvers that can be deleted soon.

        # pending move to runtime-api?
        "aws_smithy_client::http_connector::HttpConnector",

This is dead code that will be deleted.

Delete or convert aws_smithy_http::ResolveEndpoint into a inlinable (medium change)

I believe it's already replaced by aws-smithy-runtime. If not, then it should be.

"aws_smithy_http::result::SdkError",
"aws_smithy_http::body::SdkBody",

Are we happy with the Sdk- prefix on these names?

        # new crate: aws-smithy-event-stream?`
        "aws_smithy_http::event_stream::receiver::Receiver",

Why not aws-smithy-runtime-api? Or even aws-smithy-types since this is a part of generated outputs.

        # `set_invocation_id_generator` — consider making pub(crate) or moving trait to AwsTypes
        "aws_runtime::invocation_id::SharedInvocationIdGenerator",
        "aws_runtime::invocation_id::InvocationIdGenerator",

These should go into aws-runtime-api.

@ysaito1001
Copy link
Contributor

ysaito1001 commented Oct 4, 2023

Move SdkBody and bytestream into aws-smithy-types

One implementation wrinkle seems to be impl http_body::Body for SdkBody, where http_body::Body (from a pre-1.0 crate) is used in public API.

EDIT
As #3026 shows, hyper::Body has been exposed to impl From<hyper::Body> for SdkBody and impl From<hyper::Body> for ByteStream. Both the server and the client depend on that, which seems to prevent SdyBody and ByteStream from being moved as-is to smithy-types because of this dependency on hyper::Body.

@goabv goabv changed the title Design runtime crates versioning strategy Design/Implement runtime crates versioning strategy Oct 4, 2023
@jdisanti jdisanti moved this to In Progress in AWS Rust SDK Public Roadmap Oct 5, 2023
github-merge-queue bot pushed a commit that referenced this issue Oct 30, 2023
## Motivation and Context
- #3019

## Description
Prune / split out allow external types

## Testing
- CI

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@github-project-automation github-project-automation bot moved this from In Progress to Done in AWS Rust SDK Public Roadmap Nov 18, 2023
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

No branches or pull requests

4 participants