Skip to content

[instrumentation-aws-sdk] TAV failing for bedrock v3.798.0 #2806

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

Closed
pichlermarc opened this issue Apr 29, 2025 · 6 comments · Fixed by #2810
Closed

[instrumentation-aws-sdk] TAV failing for bedrock v3.798.0 #2806

pichlermarc opened this issue Apr 29, 2025 · 6 comments · Fixed by #2810
Labels
bug Something isn't working pkg:instrumentation-aws-sdk priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies

Comments

@pichlermarc
Copy link
Member

Description

Tests are failing on main for @aws-sdk/[email protected] (see release notes), this is blocking releases and PRs in this repo.

Additional details

All tests are failing with the same exception:

2025-04-29T12:36:47.2763188Z   1) Bedrock
2025-04-29T12:36:47.2763737Z        Converse
2025-04-29T12:36:47.2764137Z          adds genai conventions:
2025-04-29T12:36:47.2764923Z      UnrecognizedClientException: The security token included in the request is invalid.
2025-04-29T12:36:47.2766562Z       at throwDefaultError (/home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@smithy/smithy-client/dist-cjs/index.js:867:20)
2025-04-29T12:36:47.2768580Z       at /home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@smithy/smithy-client/dist-cjs/index.js:876:5
2025-04-29T12:36:47.2770526Z       at de_CommandError (/home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js:1537:14)
2025-04-29T12:36:47.2771961Z       at processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-04-29T12:36:47.2773753Z       at async /home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20
2025-04-29T12:36:47.2775488Z       at async /home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@smithy/core/dist-cjs/index.js:193:18
2025-04-29T12:36:47.2777178Z       at async /home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
2025-04-29T12:36:47.2779043Z       at async /home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:33:22

Links to workflow runs:

@pichlermarc pichlermarc added bug Something isn't working priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies pkg:instrumentation-aws-sdk labels Apr 29, 2025
@pichlermarc
Copy link
Member Author

cc @jj22ee (component owner)
likely related PR: #2777

@jj22ee
Copy link
Contributor

jj22ee commented May 1, 2025

Looks like AWS SDK isn't mocked properly in this new Bedrock version.

Looking into it. cc @ezhang6811

@jj22ee
Copy link
Contributor

jj22ee commented May 1, 2025

It's this change in particular: aws/aws-sdk-js-v3@3c9a894

  • Looks like aws-sdk-js-v3 v3.798.0 updated Bedrock runtime to use NodeHttpHandler -> NodeHttp2Handler
  • Bedrock Runtime tests rely on Nock,, which doesn't have any http2 support - HTTP2 support nock/nock#1625

One thing we could do is manually configure the Bedrock Runtime client to use NodeHttpHandler in tests so Nock will work (tested locally), similarly to what is done for Kinesis client test. Not sure of an alternative solution apart from running the tests for <v3.798.0 @anuraaga any thoughts/concerns?

@trentm
Copy link
Contributor

trentm commented May 1, 2025

One thing we could do is manually configure the Bedrock Runtime client to use NodeHttpHandler in tests so Nock will work (tested locally), similarly to what is done for Kinesis client test.

Doing this sounds good to me.

@jj22ee
Copy link
Contributor

jj22ee commented May 1, 2025

Use NodeHttpHandler: #2810

@trentm
Copy link
Contributor

trentm commented May 2, 2025

Should be fixed by #2810

@trentm trentm closed this as completed May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:instrumentation-aws-sdk priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies
Projects
None yet
3 participants