Skip to content

Reading EventStream header values fails with unexpected event header ... with type ... #3358

@Madrigal

Description

@Madrigal

Acknowledgements

Describe the bug

While testing #3353 I noticed that we failed reading event stream headers

2026/03/23 15:58:07 Failed to end session: unexpected event header DataType with type eventstream.StringValue:

This is because we write these values as StringValue (or really any XXXValue) https://github.com/aws/aws-sdk-go-v2/blob/main/aws/protocol/eventstream/header.go#L142

But we try to read them as *StringValue https://github.com/aws/aws-sdk-go-v2/blob/main/internal/protocoltest/awsrestjson/deserializers.go#L13733

At the time of writing, no services live on the SDK (besides sagemakerruntimehttp2) reads from eventstream headers

$ rg 'hv, ok := headerValue' service
(no results)

Since we're in the middle of a refactor of schema deserializing, I'd rather hold off making changes until we roll this out and have more extensive event stream testing

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Expected to be able to read this value

Current Behavior

Error is returned

Reproduction Steps

On PR #3353

Possible Solution

This is already addressed on the new schema serialization aws/smithy-go#641

If we had to roll the change before migration, we would need to change the values here to be non-pointable https://github.com/aws/aws-sdk-go-v2/blob/main/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsEventStreamUtils.java#L2124

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

latest

Compiler and Version used

x

Operating System and version

x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions