Skip to content

Conversation

@vcjana
Copy link
Contributor

@vcjana vcjana commented Oct 22, 2025

Motivation and Context

Track S3 Express bucket credential usage in User-Agent metrics to provide visibility into S3 Express adoption and usage patterns.

Description

This PR adds tracking for S3 Express bucket credentials by embedding the S3ExpressBucket feature in credentials resolved through the S3 Express identity provider. The feature is reported as metric code J in the User-Agent header.

Testing

  • Unit tests verify the feature is correctly embedded in S3 Express credentials
  • Integration tests verify metric J appears in User-Agent for S3 Express bucket operations
  • Integration tests verify metric J does NOT appear when S3 Express auth is disabled or for regular buckets

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.

Track S3 Express bucket credential usage with metric code 'J' in User-Agent headers.
@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

@github-actions
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.

…ore deleted assertions per reviewer feedback
@vcjana vcjana force-pushed the s3-express-metrics branch from 5df5bbb to 26d6199 Compare October 23, 2025 23:19
@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.

Copy link
Contributor

@ysaito1001 ysaito1001 left a comment

Choose a reason for hiding this comment

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

Awesome you came up with a unit test for DefaultS3ExpressIdentityProvider to verify embedding of the feature! Left comments for removing non-essential tests and simplifying test_identity_provider_embeds_s3express_feature.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

vcjana and others added 5 commits October 24, 2025 16:00
)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->

Adds ability to define custom validation exceptions per RFC:

-
https://github.com/smithy-lang/smithy-rs/blob/custom-validation-rfc/design/src/rfcs/rfc0047_custom_validation.md

## Description
<!--- Describe your changes in detail -->

Adds ability to use the following traits:
- @validationException
- @validationMessage
- @validationFieldList
- @validationFieldName
- @validationFieldMessage

to define a custom validation exception for a service or operation.

Updated Smithy validation ensures:
- The custom validation exception shape also has @error trait
- The custom validation exception shape has exactly one member with the
@validationMessage trait
- Default constructibility if it contains constrained shapes
- At most one custom validation exception is defined
- `smithy.framework#ValidationException` is not used in an operation or
service is a custom validation exception is defined
- Operations with constrained input have exactly one of the default
validation exception or a custom validation exception attached to their
errors.

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

- For unit testing, the following were added/updated:
-
`codegen-server-traits/src/test/kotlin/software/amazon/smithy/rust/codegen/server/traits/ValidationExceptionTraitTest.kt`
-
`codegen-server-traits/src/test/kotlin/software/amazon/smithy/rust/codegen/server/traits/ValidationMessageTraitTest.kt`
-
`codegen-server-traits/src/test/kotlin/software/amazon/smithy/rust/codegen/server/traits/ValidationFieldListTraitTest.kt`
-
`codegen-server-traits/src/test/kotlin/software/amazon/smithy/rust/codegen/server/traits/ValidationFieldNameTraitTest.kt`
-
`codegen-server-traits/src/test/kotlin/software/amazon/smithy/rust/codegen/server/traits/ValidationFieldMessageTraitTest.kt`
-
`codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ValidateUnsupportedConstraintsAreNotUsedTest.kt`
-
`codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/CustomValidationExceptionDecoratorTest.kt`
-
`codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/validators/CustomValidationExceptionValidatorTest.kt`
- For integration testing
- serverIntegrationTests in
`codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/CustomValidationExceptionDecoratorTest.kt`
- For e2e integration testing
-
`codegen-server-test/custom-test-models/custom-validation-exception.smithy`
    - `codegen-server-test/build.gradle.kts`
- For regression testing
- The existing e2e integration tests in `codegen-server-tests` use
common models in `codegen-core/common-test-models`, which use the
default `smithy.framework#ValidationException`

Ran with `export RUSTFLAGS="-D warnings -A clippy::redundant_closure -A
non_local_definitions"` until fixed in server runtime crates. See
#4122.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@vcjana vcjana closed this Oct 27, 2025
@vcjana vcjana reopened this Oct 27, 2025
@vcjana
Copy link
Contributor Author

vcjana commented Oct 27, 2025

Closing in favor of #4365

@vcjana vcjana closed this Oct 27, 2025
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.

3 participants