awslabs / awslabs/agentcore-samples

Customer support sample installs test tools in the runtime image

Open Beginner friendly
#2,011 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.4k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
30

Description

## Problem

`05-blueprints/customer-support-agent-with-agentcore/pyproject.toml` declares `pytest` and `pytest-asyncio` in `[project].dependencies`.

The sample's production Dockerfile runs:

```dockerfile
RUN uv pip install -r pyproject.toml
```

As a result, both test tools and their runtime-only transitive dependencies are installed in the production agent image even though application code does not import them.

A Python 3.13 production resolution currently contains 82 packages, including `pytest`, `pytest-asyncio`, `iniconfig`, and `pluggy`.

## Proposed change

Move both direct test dependencies into the existing `[dependency-groups].dev` group and regenerate `uv.lock`. This keeps them available to contributors while excluding them from the Docker installation boundary.

The resulting production resolution contains 78 packages, with exactly those four packages removed and no additions. The development environment still installs both test tools.

Contributor guide

Open the contributing guide

Research direction

Start with 05-blueprints/customer-support-agent-with-agentcore/pyproject.toml and the sample's production Dockerfile, then inspect uv.lock and the dependency groups. Move pytest and pytest-asyncio into the existing dev group and regenerate the lockfile; done means the production resolution drops to 78 packages, removes the four named packages, and the development environment still installs both test tools.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, devops
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.