Skip to content

fix(ci): pass filesystem env vars to e2e-tests-full vitest step#1470

Merged
jariy17 merged 1 commit into
mainfrom
fix/e2e-tests-full-filesystem-env
Jun 5, 2026
Merged

fix(ci): pass filesystem env vars to e2e-tests-full vitest step#1470
jariy17 merged 1 commit into
mainfrom
fix/e2e-tests-full-filesystem-env

Conversation

@jariy17
Copy link
Copy Markdown
Contributor

@jariy17 jariy17 commented Jun 5, 2026

Description

strands-bedrock-byo-filesystem.test.ts fails on the E2E Tests (Full Suite) workflow (e2e-tests-full.yml) at the agentcore create step:

AssertionError: Create failed: (node:4489) Warning: NodeVersionSupportWarning: ...

The assertion message only includes stderr (a Node-version deprecation warning); the actual JSON error went to stdout which the test does not print on failure.

Root cause

The Secrets Manager step (aws-actions/aws-secretsmanager-get-secrets@v2) retrieves these env vars at job scope:

  • E2E_EFS_ACCESS_POINT_ARN
  • E2E_S3_ACCESS_POINT_ARN
  • E2E_FILESYSTEM_SUBNET_ID
  • E2E_FILESYSTEM_SECURITY_GROUP_ID

But the Run E2E tests step's env: block doesn't pass them through, so the vitest subprocess never sees them. GitHub Actions does not auto-inherit job-level env vars into step subprocesses — they have to be listed explicitly in each step's env: block.

The PR workflow (e2e-tests.yml) already does this correctly. This PR brings e2e-tests-full.yml in line.

Diff

# .github/workflows/e2e-tests-full.yml — Run E2E tests step env:
   ANTHROPIC_API_KEY: ${{ env.E2E_ANTHROPIC_API_KEY }}
   OPENAI_API_KEY: ${{ env.E2E_OPENAI_API_KEY }}
   GEMINI_API_KEY: ${{ env.E2E_GEMINI_API_KEY }}
+  E2E_EFS_ACCESS_POINT_ARN: ${{ env.E2E_EFS_ACCESS_POINT_ARN }}
+  E2E_S3_ACCESS_POINT_ARN: ${{ env.E2E_S3_ACCESS_POINT_ARN }}
+  E2E_FILESYSTEM_SUBNET_ID: ${{ env.E2E_FILESYSTEM_SUBNET_ID }}
+  E2E_FILESYSTEM_SECURITY_GROUP_ID: ${{ env.E2E_FILESYSTEM_SECURITY_GROUP_ID }}
   CDK_TARBALL: ${{ env.CDK_TARBALL }}

Type of Change

  • CI / test infrastructure fix

Why now

CI run 27041082542 (post-merge of #1465 + #1468) had (main, 5/6) and (npm, 5/6) red because of this. The byo-filesystem test surfaces the missing env vars before any other test would, since other tests don't depend on them. PR is a 4-line additive change to one file.

Verification

  • Inspected e2e-tests.yml for the same step pattern — confirmed it already passes these 4 vars
  • Inspected the test source's requiredEnvVars — matches exactly the 4 env vars added here
  • Will be confirmed when the next e2e-tests-full.yml run picks up these changes

Checklist

  • My changes generate no new warnings

The Secrets Manager step retrieves E2E_EFS_ACCESS_POINT_ARN,
E2E_S3_ACCESS_POINT_ARN, E2E_FILESYSTEM_SUBNET_ID, and
E2E_FILESYSTEM_SECURITY_GROUP_ID at job scope, but the "Run E2E tests"
step's env: block does not propagate them to the vitest subprocess.
GitHub Actions does not auto-inherit job-level env vars into step
subprocesses, so strands-bedrock-byo-filesystem.test.ts saw undefined
values and failed at agentcore create.

Symptom on run 27041082542: shards (main, 5/6) and (npm, 5/6) failed
with "Create failed:" — only stderr (a Node version warning) was in the
assertion message; the actual JSON error went to stdout which the test
did not print.

The PR-trigger workflow (e2e-tests.yml) already passes these env vars in
its Run E2E tests env: block. This change brings e2e-tests-full.yml in
line so the byo-filesystem test has the inputs it needs.
@jariy17 jariy17 requested a review from a team June 5, 2026 22:34
@github-actions github-actions Bot added the size/xs PR size: XS label Jun 5, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 5, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jun 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Package Tarball

aws-agentcore-0.17.0.tgz

How to install

gh release download pr-1470-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.17.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 Jun 5, 2026
Copy link
Copy Markdown

@agentcore-cli-automation agentcore-cli-automation left a comment

Choose a reason for hiding this comment

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

Verified the fix:

  • The 4 added env vars exactly match the requiredEnvVars in e2e-tests/strands-bedrock-byo-filesystem.test.ts (lines 24-29).
  • e2e-tests.yml already uses this exact same pattern for both the GA and preview/harness test steps, so this brings e2e-tests-full.yml in line.
  • Diagnosis is correct: aws-secretsmanager-get-secrets@v2 writes to job-level env via $GITHUB_ENV, but step-level env: blocks must explicitly forward vars into the subprocess — they aren't auto-inherited by spawned children.
  • Minimal, additive, single-file change. LGTM.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 36.35% 11615 / 31945
🔵 Statements 35.67% 12342 / 34593
🔵 Functions 31% 1947 / 6280
🔵 Branches 30.14% 7460 / 24746
Generated in workflow #3534 for commit a21280f by the Vitest Coverage Report Action

@jariy17 jariy17 merged commit a4c75ec into main Jun 5, 2026
41 of 43 checks passed
@jariy17 jariy17 deleted the fix/e2e-tests-full-filesystem-env branch June 5, 2026 22:48
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.

3 participants