Skip to content

chore: Update Smithy to 1.59.0 #937

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

Merged
merged 6 commits into from
Jun 20, 2025
Merged

chore: Update Smithy to 1.59.0 #937

merged 6 commits into from
Jun 20, 2025

Conversation

jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Jun 17, 2025

Description of changes

Updates the SDK to Smithy 1.59.0 (latest version.)

  • Fixes a bug where protocol test expectations render incorrectly
  • Changes behavior so that a prefix header will not overwrite a header with the same name

Companion aws-sdk-swift PR: awslabs/aws-sdk-swift#1957

Scope

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

}
let lhsHeaders = lhs.access { $0 }.sorted()
let rhsHeaders = rhs.access { $0 }.sorted()
return lhsHeaders == rhsHeaders
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored to avoid simultaneously holding two locks.

writer.writeInline("nil")
return
}

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 were incorrectly rendering the expected value when a collection or aggregate shape when it is supposed to be absent (i.e. "null" in the Smithy node tree for expected value.) This if-else handles that case.

// Don't write a prefix header over a specific header that was also written to this request.
// See the HttpEmptyPrefixHeadersRequestClient protocol tests on the REST protocols.
writer.write("guard !items.exists(name: \"$paramName\\(prefixHeaderMapKey)\") else { continue }")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New protocol tests specify that specific headers bound to names can overwrite prefix headers. This guard creates that behavior.

"let endpointParamsBlock = { [config] (context: \$N) in",
"}",
SmithyTypes.Context,
) {
Copy link
Contributor Author

@jbelkins jbelkins Jun 17, 2025

Choose a reason for hiding this comment

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

Reformat

@jbelkins jbelkins marked this pull request as ready for review June 17, 2025 21:34
@jbelkins jbelkins requested a review from sichanyoo June 17, 2025 22:01
@jbelkins jbelkins merged commit dcd85fd into main Jun 20, 2025
33 checks passed
@jbelkins jbelkins deleted the jbe/smithy_1_59_0 branch June 20, 2025 20:49
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.

2 participants