Skip to content

[DO NOT MERGE] test(e2e): Run the e2e suites in parallel, deploy the LangChain Box template in CI, and drop duplicate Python deploys - #2959

Draft
mquang-amazon wants to merge 10 commits into
box-integrationfrom
box/e2e-macos-box
Draft

mquang-amazon wants to merge 10 commits into
box-integrationfrom
box/e2e-macos-box

Conversation

@mquang-amazon

@mquang-amazon mquang-amazon commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

The macOS and Linux-arm64 e2e jobs ran every test file one suite after another: with all tags, about 72 minutes, past the one-hour session of the e2e credentials, so their last tests failed with an expired token. This PR runs the e2e suites in parallel and trims the tests that repeat others.

Parallel suites. Vitest runs the describe suites of one file one after another, and separate files at the same time.

  • e2eTest/project/templates.test.ts is now one file per suite group: runtimeTemplates.test.ts (non-Box runtime templates), boxTemplates.test.ts (the Box deploy flow and Box dev), boxEgress.test.ts (both egress suites), and boxScenarios.test.ts. Their shared helpers, constants and agents are in templates-test-support.ts. Every suite, test and tag is the same.
  • withDevPort takes a lock directory in the temporary folder, not an in-memory queue, so the dev tests of separate files (separate Vitest workers) still take turns on box's fixed ingress ports. The egress-under-dev test now takes the lock too.
  • vitest.e2e.config.ts: maxWorkers 8, and 3 on macOS, whose runner has three CPUs that box sandboxes, installs and dev servers need (with 8, box dev on macOS timed out). Each file runs at most three concurrent tests (maxConcurrency: 3), so a run stays under CloudFormation's rate limit: with five, a run's own deploys got Throttling: Rate exceeded past the CDK's retries. A run with four macOS workers and five concurrent runtime template tests was faster on macOS (30–45 min), but got that throttling in us-east-2, so this PR keeps three and three.

Fewer duplicate deploys. The CodeZip Box template deploys on Python 3.10, the oldest the CodeZip Runtime supports, beside 3.14, its default, which the Box tests cover. It no longer deploys on 3.11, 3.12 and 3.13.

LangChain Box deploy in CI. CI left out the deploy of agent-python-langchain-box, because its runtime log holds OpenTelemetry's Failed to detach context at ERROR level. The log check now ignores that line (RUNTIME_LOG_NOISE), and the template deploys in CI. Every other ERROR, blocked by egress control and AccessDenied line still fails the test.

Tests
Before 45 (LangChain Box deploy left out in CI)
After 43 (+ LangChain Box deploy, − Python 3.11, 3.12, 3.13)

Related Issue

Closes #

Documentation PR

No documentation change. .github/workflows/e2e-test.yml names the new support file in a comment.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): End-to-end tests.

Testing

How have you tested the change?

  • I ran bun test: no change to unit tests or shipped code.

  • I ran the relevant end-to-end tests with bun run test:e2e, in CI with all tags and l3Ref=box-integration:

    Job Before (46073540729) After (46196540878)
    macOS 72 min, credentials expired 63 min, 43 passed
    Linux-arm64 73 min, credentials expired 35 min, 44 passed
    Linux 21 min 34 min, 24 passed
    Windows 39 min 39 min, the harness beforeAll timeout that also fails on box-integration

    That run is this head's configuration. The runs with four macOS workers and five concurrent runtime template tests, in us-east-1, us-west-2 and us-east-2 (https://github.com/aws/agentcore-cli/actions/runs/46347755757, https://github.com/aws/agentcore-cli/actions/runs/46347847381, https://github.com/aws/agentcore-cli/actions/runs/46347850153), took 30–45 min on macOS and 17–33 min elsewhere, but two us-east-2 tests failed with Throttling: Rate exceeded; their other failures were the Windows harness timeout and a 429 Too Many Requests from public ECR on the Linux container template's image pull. So the last commit reverts to three and three.

  • I ran bun run typecheck

  • I ran bun run lint:check

  • I ran bun run format:check

  • I ran bun run audit

  • I ran bun run secrets:check

  • I ran bun run build

  • If I modified src/assets/, I updated affected snapshots: no change to src/assets/.

  • If I re-recorded fixtures or golden files, every change beyond account identifiers is explained by this PR: none re-recorded.

  • This PR does not change command.md (the release workflow regenerates it)

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

@mquang-amazon
mquang-amazon requested a review from a team November 30, 2026 03:34
@codecov-commenter

codecov-commenter commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.94%. Comparing base (aaa29b1) to head (5c3000f).

Additional details and impacted files
@@               Coverage Diff                @@
##           box-integration    #2959   +/-   ##
================================================
  Coverage            96.94%   96.94%           
================================================
  Files                  780      780           
  Lines                70806    70848   +42     
================================================
+ Hits                 68645    68687   +42     
  Misses                2161     2161           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mquang-amazon
mquang-amazon marked this pull request as draft November 30, 2026 19:25
@mquang-amazon mquang-amazon changed the title test(e2e): Run the e2e suites in parallel, deploy the LangChain Box template in CI, and drop duplicate Python deploys [DO NOT MERGE] test(e2e): Run the e2e suites in parallel, deploy the LangChain Box template in CI, and drop duplicate Python deploys Nov 30, 2026
@mquang-amazon

Copy link
Copy Markdown
Contributor Author

Marked do not merge for now: this branch is about to get a commit that brings back the agentcore create model flags (--model-provider, --model-id, --api-key, --api-base) and a tui e2e suite, only to run the create wizard's model choices in e2e. That commit is not meant to merge and will be reverted before this PR is ready again.

…lags, and test them under a tui tag"

This reverts commit 558f49e.
…flags, and test them under a tui tag"

This reverts commit b131c17.
…el provider with a test key, and expect the provider to refuse it

This branch has not been deployed

No deployments
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.

2 participants