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

Request IDs #2054

Merged
merged 20 commits into from Dec 22, 2022
Merged

Request IDs #2054

merged 20 commits into from Dec 22, 2022

Conversation

82marbag
Copy link
Contributor

@82marbag 82marbag commented Dec 2, 2022

Motivation and Context

Implement RFC 24: Request IDs in business logic

Testing

From the example:

This request has this client ID: None and server ID: f864ce5f-c5cd-45b0-b1ec-dde190aa8e8d
This request has this client ID: Some(ClientRequestId { id: "hello" }) and server ID: 6b690212-5f73-48cb-b13c-47c56e1cb792

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK 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.

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@github-actions
Copy link

github-actions bot commented Dec 3, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

}

pub struct ClientRequestIdProviderLayer<'a> {
possible_headers: &'a [&'a str],
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there ever a chance where we use less than 'static here?

pub struct MissingClientRequestId;

impl ClientRequestId {
pub fn new(id: Box<str>) -> Self {
Copy link
Contributor

@hlbarber hlbarber Dec 6, 2022

Choose a reason for hiding this comment

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

Perhaps lots of From implementations instead of this new - e.g. From<Box<str>>, From<String> and From<Cow<'static, str>>.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about pub fn new(id: impl Into<&str>) or something along the lines?

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@crisidev
Copy link
Contributor

CI is failing: https://github.com/awslabs/smithy-rs/actions/runs/3742073103/jobs/6352563186#step:3:1011

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Daniele Ahmed and others added 2 commits December 22, 2022 12:35
This reverts commit 19bf72b.
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@82marbag 82marbag enabled auto-merge (squash) December 22, 2022 16:24
@github-actions
Copy link

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.

@82marbag 82marbag merged commit 87e45f6 into main Dec 22, 2022
@82marbag 82marbag deleted the requestid branch December 22, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants