Skip to content

Commit f88256d

Browse files
committed
test: use TEST_TMPDIR as fallback for E2E temporary directory
Use Bazel's TEST_TMPDIR when E2E_TEMP is not set so that E2E projects and package caches are created on the main disk inside the Bazel test sandbox rather than /tmp (which is a quota-limited tmpfs on ubuntu-26.04). This also allows reverting E2E CI jobs back to ubuntu-latest.
1 parent 47bc9c3 commit f88256d

4 files changed

Lines changed: 12 additions & 26 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ jobs:
8181
node: [22, 24, 26]
8282
subset: [esbuild, webpack]
8383
shard: [0, 1, 2, 3, 4, 5]
84-
# Pin to ubuntu-24.04 because on ubuntu-26.04 /tmp is mounted as a tmpfs with a 7.8GB quota,
85-
# causing disk quota exceeded (EDQUOT) errors during E2E package extraction.
86-
# See: https://github.com/actions/runner-images/issues/14777
87-
runs-on: ubuntu-24.04
84+
runs-on: ubuntu-latest
8885
steps:
8986
- name: Initialize environment
9087
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@c0b8d59ecb851e0dd1808f3d00846d5f2c0c8d47 # main
@@ -164,10 +161,7 @@ jobs:
164161
node: [22]
165162
subset: [yarn, pnpm, bun]
166163
shard: [0, 1, 2]
167-
# Pin to ubuntu-24.04 because on ubuntu-26.04 /tmp is mounted as a tmpfs with a 7.8GB quota,
168-
# causing disk quota exceeded (EDQUOT) errors during E2E package extraction.
169-
# See: https://github.com/actions/runner-images/issues/14777
170-
runs-on: ubuntu-24.04
164+
runs-on: ubuntu-latest
171165
steps:
172166
- name: Initialize environment
173167
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@c0b8d59ecb851e0dd1808f3d00846d5f2c0c8d47 # main
@@ -191,10 +185,7 @@ jobs:
191185
node: [22]
192186
subset: [esbuild, webpack]
193187
shard: [0, 1, 2, 3, 4, 5]
194-
# Pin to ubuntu-24.04 because on ubuntu-26.04 /tmp is mounted as a tmpfs with a 7.8GB quota,
195-
# causing disk quota exceeded (EDQUOT) errors during E2E package extraction.
196-
# See: https://github.com/actions/runner-images/issues/14777
197-
runs-on: ubuntu-24.04
188+
runs-on: ubuntu-latest
198189
steps:
199190
- name: Initialize environment
200191
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@c0b8d59ecb851e0dd1808f3d00846d5f2c0c8d47 # main

‎.github/workflows/pr.yml‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,7 @@ jobs:
111111
node: [22]
112112
subset: [esbuild, webpack]
113113
shard: [0, 1, 2, 3, 4, 5]
114-
# Pin to ubuntu-24.04 because on ubuntu-26.04 /tmp is mounted as a tmpfs with a 7.8GB quota,
115-
# causing disk quota exceeded (EDQUOT) errors during E2E package extraction.
116-
# See: https://github.com/actions/runner-images/issues/14777
117-
runs-on: ubuntu-24.04
114+
runs-on: ubuntu-latest
118115
steps:
119116
- name: Initialize environment
120117
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@c0b8d59ecb851e0dd1808f3d00846d5f2c0c8d47 # main
@@ -183,10 +180,7 @@ jobs:
183180
node: [22]
184181
subset: [yarn, pnpm, bun]
185182
shard: [0, 1, 2]
186-
# Pin to ubuntu-24.04 because on ubuntu-26.04 /tmp is mounted as a tmpfs with a 7.8GB quota,
187-
# causing disk quota exceeded (EDQUOT) errors during E2E package extraction.
188-
# See: https://github.com/actions/runner-images/issues/14777
189-
runs-on: ubuntu-24.04
183+
runs-on: ubuntu-latest
190184
steps:
191185
- name: Initialize environment
192186
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@c0b8d59ecb851e0dd1808f3d00846d5f2c0c8d47 # main
@@ -208,10 +202,7 @@ jobs:
208202
node: [22]
209203
subset: [esbuild, webpack]
210204
shard: [0, 1, 2, 3, 4, 5]
211-
# Pin to ubuntu-24.04 because on ubuntu-26.04 /tmp is mounted as a tmpfs with a 7.8GB quota,
212-
# causing disk quota exceeded (EDQUOT) errors during E2E package extraction.
213-
# See: https://github.com/actions/runner-images/issues/14777
214-
runs-on: ubuntu-24.04
205+
runs-on: ubuntu-latest
215206
steps:
216207
- name: Initialize environment
217208
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@c0b8d59ecb851e0dd1808f3d00846d5f2c0c8d47 # main

‎tests/e2e/utils/utils.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export function expectToFail(fn: () => Promise<any>, errorMessage?: string): Pro
1919
}
2020

2121
export async function mktempd(prefix: string, tempRoot?: string): Promise<string> {
22-
return realpath(await mkdtemp(path.join(tempRoot ?? tmpdir(), prefix)));
22+
return realpath(
23+
await mkdtemp(
24+
path.join(tempRoot ?? process.env.E2E_TEMP ?? process.env.TEST_TMPDIR ?? tmpdir(), prefix),
25+
),
26+
);
2327
}
2428

2529
export async function mockHome(cb: (home: string) => Promise<void>): Promise<void> {

‎tests/e2e_runner.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ process.env.CHROME_PATH = path.resolve(process.env.CHROME_PATH!);
217217
process.env.CHROMEDRIVER_BIN = path.resolve(process.env.CHROMEDRIVER_BIN!);
218218

219219
(async () => {
220-
const tempRoot = await mktempd('angular-cli-e2e-', process.env.E2E_TEMP);
220+
const tempRoot = await mktempd('angular-cli-e2e-');
221221
setGlobalVariable('tmp-root', tempRoot);
222222

223223
process.on('SIGINT', deleteTemporaryRoot);

0 commit comments

Comments
 (0)