Skip to content

Add generated Lex Runtime V2 client with integration tests#51

Open
Alan4506 wants to merge 8 commits into
awslabs:developfrom
Alan4506:feat/lex-runtime-v2-client
Open

Add generated Lex Runtime V2 client with integration tests#51
Alan4506 wants to merge 8 commits into
awslabs:developfrom
Alan4506:feat/lex-runtime-v2-client

Conversation

@Alan4506
Copy link
Copy Markdown
Contributor

@Alan4506 Alan4506 commented Apr 3, 2026

Description of changes:

This PR adds support for the Lex Runtime V2 service by adding the latest Smithy model and code-generating a new client package (aws-sdk-lex-runtime-v2). It also adds integration tests covering the following patterns:

  • Non-streaming operation using recognize_text
  • Bidirectional streaming operation using start_conversation (TEXT mode)

A setup script at tests/setup_resources.py creates the required AWS resources (IAM role, Lex V2 bot, en_US locale with a Greeting intent and closing response).

This branch will be rebased once the release automation publishes the client.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Alan4506 Alan4506 requested a review from a team as a code owner April 3, 2026 19:31
Comment thread clients/aws-sdk-lex-runtime-v2/CHANGELOG.md
Comment thread clients/aws-sdk-lex-runtime-v2/README.md Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/setup_resources.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/setup_resources.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/__init__.py
Comment thread clients/aws-sdk-lex-runtime-v2/pyproject.toml Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/__init__.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/test_non_streaming.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/test_bidirectional_streaming.py Outdated
Copy link
Copy Markdown
Contributor

@SamRemis SamRemis left a comment

Choose a reason for hiding this comment

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

Left a few comments - Antonio was very thorough and got most of them.

To make sure I understand - are we expecting this to be the workflow:

  1. A different PR adds the changelog entry and the models
  2. We release the client via internal infrastructure
  3. After confirming that this PR contains only the changes for the integ tests, we merge this PR so these get run for future releases automatically

Is that all correct?

Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/__init__.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/test_bidirectional_streaming.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/setup_resources.py Outdated
Comment thread clients/aws-sdk-lex-runtime-v2/tests/test_protocol.py
@Alan4506
Copy link
Copy Markdown
Contributor Author

Alan4506 commented Apr 15, 2026

Left a few comments - Antonio was very thorough and got most of them.

To make sure I understand - are we expecting this to be the workflow:

  1. A different PR adds the changelog entry and the models
  2. We release the client via internal infrastructure
  3. After confirming that this PR contains only the changes for the integ tests, we merge this PR so these get run for future releases automatically

Is that all correct?

  1. A different PR will be made to add the model, but as the comment says, the changelog entry might be handled by the release automation, so we won't add changelog entry in that different PR.
  2. Yes, we will release the client via internal infrastructure
  3. The PR may not only contain only the changes for the integ tests. After the client is released, in @jonathan343's opinion, there shouldn't be much difference between the this PR and upstream, except the integration tests, so the merge should be fine. But worst case if the merge conflict does happen, we can update this PR to only have the integ tests, or just create a new PR to only have the integ tests. But for now I'll just regenerate the client using the latest release to make sure all dependencies are up-to-date for testing, so that it is easier for reviewers to review the tests.

Comment thread clients/aws-sdk-lex-runtime-v2/tests/integration/conftest.py Outdated
@Alan4506 Alan4506 force-pushed the feat/lex-runtime-v2-client branch from 0344db7 to b094bed Compare May 8, 2026 21:22

# Tags applied to all resources so orphaned resources from interrupted
# test runs can be discovered and cleaned up.
_TAGS = [{"Key": "Purpose", "Value": "IntegTest"}]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Non-blocking]

Since the idea behind this is to have a single tag that can be applied to as many integ test related resources as possible, this would be better suited for smithy-aws-core and we can import it.

Since that would require a PR to smithy-aws-core and a publish, can we just make a backlog item for that and come back?

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