Skip to content

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Sep 24, 2025

Issue

smithy-lang/smithy-typescript#1600
preparatory compatibility fixes for Schemas

Description

Updates client integ tests to use the correct body payload types.

Checklist

  • If the PR is a feature, add integration tests (*.integ.spec.ts).
  • If you wrote E2E tests, are they resilient to concurrent I/O?
  • If adding new public functions, did you add the @public tag and enable doc generation on the package?

@kuhe kuhe requested a review from a team as a code owner September 24, 2025 14:36
userId: "user",
contentType: "text/plain; charset=utf-8",
inputStream: "hello world!",
inputStream: Readable.from(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

rather than always being set to UNSIGNED-PAYLOAD because the operation is modeled as having a data stream, in schema-serde the sigv4 signer sets a sha256 hash if the input is buffered (string or Buffer) and UNSIGNED-PAYLOAD only when it is a stream.

return await client.putObject({
Path: "foo.avi",
Body: "binary body",
Body: Readable.from(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as LexRuntime

@kuhe kuhe force-pushed the chore/client-payload-tests branch from 42185fb to 67f755f Compare September 24, 2025 14:49
body: {
*[Symbol.asyncIterator]() {
// see https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html
yield new Uint8Array([
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These bytes are the actual event stream whereas the previous XML was from a generated structural example and not what is actually sent.

@kuhe kuhe merged commit f7eb085 into main Sep 24, 2025
7 checks passed
@kuhe kuhe deleted the chore/client-payload-tests branch September 24, 2025 17:47
Copy link

github-actions bot commented Oct 9, 2025

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants