Skip to content

fix(e2e): use uv run for import test Python scripts#845

Merged
jesseturner21 merged 3 commits intomainfrom
fix/unpin-boto3-e2e
Apr 14, 2026
Merged

fix(e2e): use uv run for import test Python scripts#845
jesseturner21 merged 3 commits intomainfrom
fix/unpin-boto3-e2e

Conversation

@jesseturner21
Copy link
Copy Markdown
Contributor

Summary

  • Replaces bare python3 calls with uv run --with boto3 python3 in the import e2e tests
  • Removes the pip install boto3 step from the full e2e workflow (no longer needed)
  • Root cause: CI runners have an ancient system boto3 at /usr/lib/python3/dist-packages/ that doesn't include bedrock-agentcore-control. pip install boto3 installs to user site-packages which the spawned python3 child process ignores. uv run --with boto3 creates an isolated env with the correct version.
  • Supersedes fix(ci): unpin boto3 in e2e workflow #841 which only unpinned the version but didn't fix the real issue

Test plan

  • Reproduced failure locally: uv run --with 'boto3==1.38.0' python3 -c "import boto3; boto3.client('bedrock-agentcore-control')"UnknownServiceError
  • Verified fix locally: uv run --with boto3 python3 -c "import boto3; boto3.client('bedrock-agentcore-control')" → success
  • Full import e2e test suite passes locally (5/5 tests, 366s)
  • Verify full e2e suite passes in CI

The pinned boto3==1.38.0 did not include the bedrock-agentcore-control
service model, causing import-resources e2e tests to fail with
UnknownServiceError. Using latest boto3 ensures new AWS services are
always available.
The import e2e tests call python3 directly to run setup scripts that
use boto3. On CI runners, the system-installed boto3 is too old to
include the bedrock-agentcore-control service model. pip install boto3
installs to user site-packages which the child process doesn't pick up.

Switch to uv run --with boto3 python3 so the scripts always get a
current boto3 in an isolated environment. Remove the now-unnecessary
pip install step from the workflow.
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.8.0.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-845-tarball/aws-agentcore-0.8.0.tgz

@github-actions github-actions Bot added size/xs PR size: XS and removed size/xs PR size: XS labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.55% 7056 / 15836
🔵 Statements 44.03% 7486 / 17001
🔵 Functions 42.04% 1264 / 3006
🔵 Branches 43.49% 4734 / 10884
Generated in workflow #1771 for commit 2d06cfb by the Vitest Coverage Report Action

@jesseturner21 jesseturner21 merged commit 5962711 into main Apr 14, 2026
23 checks passed
@jesseturner21 jesseturner21 deleted the fix/unpin-boto3-e2e branch April 14, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants