Skip to content

ci: pin browser-tests to ubuntu-latest (fix Playwright deps on CodeBuild)#1736

Merged
tejaskash merged 1 commit into
mainfrom
fix/browser-tests-runner-1715
Jul 10, 2026
Merged

ci: pin browser-tests to ubuntu-latest (fix Playwright deps on CodeBuild)#1736
tejaskash merged 1 commit into
mainfrom
fix/browser-tests-runner-1715

Conversation

@jesseturner21

Copy link
Copy Markdown
Contributor

Problem

Browser tests have been failing on main since #1715 (`ci: run all workflows on CodeBuild-hosted runners`).

The e2e matrix passes; only browser-tests fails, at the Install Playwright browsers step:

```
$ npx playwright install chromium --with-deps
BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu24.04-x64 as a fallback.
Installing dependencies...
sh: line 1: apt-get: command not found
Failed to install browsers
Error: Installation process exited with code: 127
```

(failing run)

Root cause

--with-deps shells out to the system package manager to install Chromium's OS-level shared libraries. On the GitHub-hosted ubuntu-latest runner that worked (apt-get present, recognized distro). #1715 moved this job onto the CodeBuild-hosted runner, whose image has no apt-get and isn't a Playwright-recognized distro — so the step exits 127 deterministically. e2e jobs are unaffected because they never touch Playwright.

Fix

Pin only browser-tests back to ubuntu-latest — a Playwright-supported OS where --with-deps works. This mirrors the pattern #1715 already uses for codeql and ci-failure-issue. All other jobs stay on CodeBuild.

Tradeoff / follow-up

browser-tests makes real AWS calls (`sts get-caller-identity` + `agentcore dev`). If ubuntu-latest shared IPs reintroduce the service WAF 403s that #1715 was avoiding, the better fix is a custom Playwright-capable CodeBuild image (deps baked in, drop `--with-deps`) rather than reverting this pin. Not reproduced under current traffic.

…ild)

#1715 moved every job onto the CodeBuild-hosted runner. The browser-tests
job runs `npx playwright install chromium --with-deps`, which shells out to
the system package manager to install Chromium's OS-level shared libraries.
The CodeBuild runner image has no apt-get and Playwright doesn't recognize
its distro, so the step deterministically fails:

    BEWARE: your OS is not officially supported by Playwright ...
    sh: line 1: apt-get: command not found
    Failed to install browsers
    Error: Installation process exited with code: 127

The e2e matrix passes because it never touches Playwright. Pin only
browser-tests back to GitHub-hosted ubuntu-latest (a Playwright-supported
OS where --with-deps works), same pattern already used for codeql and
ci-failure-issue.

Constraint: CodeBuild runner image lacks apt-get and is an unrecognized distro
Rejected: Custom Playwright CodeBuild image | larger change, needs CodeBuild project image support
Rejected: Manually install libs via yum in-job | fragile, guesses the distro
Confidence: high
Scope-risk: narrow
Directive: browser-tests makes real AWS calls (sts + `agentcore dev`); if ubuntu-latest shared IPs trip the service WAF (the 403s #1715 was avoiding), revisit with a custom Playwright-capable CodeBuild image rather than reverting this pin
Not-tested: whether ubuntu-latest reintroduces WAF 403s under current traffic
@jesseturner21 jesseturner21 requested a review from a team July 10, 2026 17:21
@github-actions github-actions Bot added the size/xs PR size: XS label Jul 10, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jul 10, 2026
@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jul 10, 2026
@tejaskash tejaskash merged commit 5f7958d into main Jul 10, 2026
29 of 30 checks passed
@tejaskash tejaskash deleted the fix/browser-tests-runner-1715 branch July 10, 2026 17:22
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.23.0.tgz

How to install

gh release download pr-1736-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.23.0.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.71% 14734 / 37099
🔵 Statements 38.98% 15705 / 40284
🔵 Functions 33.81% 2510 / 7423
🔵 Branches 33.34% 9839 / 29509
Generated in workflow #4076 for commit 8f5d8cb by the Vitest Coverage Report Action

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