test(e2e): Avoid network installs in AWS serverless tests - #24059
Merged
Merged
Conversation
Co-Authored-By: OpenAI Codex <codex@openai.com>
Contributor
size-limit report 📦
|
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
msonnb
marked this pull request as ready for review
September 4, 2026 10:38
msonnb
requested review from
a team,
Lms24,
andreiborza and
stephanie-anderson
and removed request for
a team and
stephanie-anderson
September 4, 2026 10:39
andreiborza
approved these changes
Sep 4, 2026
Comment on lines
+100
to
+107
| execFileSync( | ||
| 'pnpm', | ||
| ['install', '--offline', '--prod', '--ignore-scripts', '--no-frozen-lockfile', '--config.node-linker=hoisted'], | ||
| { | ||
| cwd: lambdaPath, | ||
| stdio: 'inherit', | ||
| }, | ||
| ); |
Contributor
There was a problem hiding this comment.
Bug: The pnpm install --offline command will fail in the CI environment because transitive registry dependencies are not pre-populated in the pnpm store.
Severity: CRITICAL
Suggested Fix
Add a CI step to pre-populate the pnpm store before the E2E tests run. This can be achieved by running pnpm fetch which will download all required packages, including transitive dependencies, into the store. This will allow the subsequent pnpm install --offline command to resolve all dependencies correctly.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: dev-packages/e2e-tests/test-applications/aws-serverless/src/stack.ts#L100-L107
Potential issue: The `pnpm install` command in `stack.ts` uses the `--offline` flag.
While direct dependencies are local, their transitive dependencies (e.g.,
`@sentry/conventions`, `@opentelemetry/api`) are from the package registry. The CI
environment does not pre-populate the pnpm store with these registry packages, as the
main project uses yarn and there is no preceding `pnpm fetch` step. Consequently, when
`pnpm install --offline` attempts to resolve these transitive dependencies, it will fail
because they are not available in the local store, causing all AWS serverless E2E tests
to fail.
Did we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment.
nah, we run pnpm install in test:build first
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AWS serverless E2E fixture installed dependencies from the registry for every generated Lambda during Playwright setup.
Root cause: slow registry access could leave npm running until the job-wide timeout. Reuse the populated pnpm store offline and use pnpm's hoisted linker, which produces a deployable Lambda node_modules layout without symlinks.