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

update AWS runtime crates for request compression #3632

Conversation

Velfi
Copy link
Contributor

@Velfi Velfi commented May 8, 2024

This PR includes all the changes necessary for AWS runtime crates to support request compression.


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

@Velfi Velfi requested a review from a team as a code owner May 8, 2024 17:15
Copy link

github-actions bot commented May 8, 2024

A new generated diff is ready to view.

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

A new doc preview is ready to view.


#[tokio::test]
#[traced_test]
async fn environment_priority() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe EnvConfigValue itself has already been tested that way, but maybe we should also add a test making sure a value is correctly loaded from a profile config when disabling is only specified in a shared config file, but not set in the environment variable?


#[tokio::test]
#[traced_test]
async fn environment_priority() {
Copy link
Contributor

Choose a reason for hiding this comment

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

The above comment regarding testing against a shared config file also applies here?

@@ -473,7 +473,7 @@ mod tests {
use crate::sensitive_command::CommandWithSensitiveArgs;
use serde::Deserialize;

#[cfg(feature = "test-utils")]
#[cfg(feature = "test-util")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just a name change without any programmatic effects?

Copy link
Contributor

Choose a reason for hiding this comment

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

Beyond the name change, the aws-config crate doesn't seem to have a test-util(s) feature listed in Cargo.toml at all so I'm not sure how this is working. Does it transitively work with the test-util feature present in some of the other crates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We never added these features to the cargo.toml so I'm pretty sure they were never usable. I changed the name to bring it in line with the other crates. I'm also going to add the feature to the Cargo.toml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to transfer this change to a separate PR because it's causing some test failures.

Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

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

Looks good to me! Just a few clarifying questions as I get up to speed

@@ -41,6 +41,25 @@ pub(crate) fn parse_bool(value: &str) -> Result<bool, InvalidBooleanValue> {
}
}

#[derive(Debug)]
pub(crate) struct InvalidUintValue {
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume we only enforce non_exhaustive if a struct is public outside of its containing crate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. If it's not public then we don't have to worry about forwards compatibility.

@@ -473,7 +473,7 @@ mod tests {
use crate::sensitive_command::CommandWithSensitiveArgs;
use serde::Deserialize;

#[cfg(feature = "test-utils")]
#[cfg(feature = "test-util")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Beyond the name change, the aws-config crate doesn't seem to have a test-util(s) feature listed in Cargo.toml at all so I'm not sure how this is working. Does it transitively work with the test-util feature present in some of the other crates?

/// 2. The profile key `disable_request_compression=true/false`
///
/// If invalid values are found, the provider will return None and an error will be logged.
pub async fn disable_request_compression_provider(
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems odd to me these end up being public to the world but that seems to be the pattern here. I would have thought pub crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was doing it to match the other providers but I don't mind making them pub(crate). We can always undo that later if we decide to.

Copy link

A new generated diff is ready to view.

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

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

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

A new doc preview is ready to view.

@Velfi Velfi merged commit e9a7625 into zhessler/request-compression May 10, 2024
44 checks passed
@Velfi Velfi deleted the zhessler/request-compression-aws-runtime-crate branch May 10, 2024 18:44
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