feat(FN-4157): remove composite checkout, add workflow-level checkout steps
Fixes overlap merge checkout logic by removing the composite checkout approach and replacing it with explicit workflow-specific checkout steps, with a new CI job to guard against regressions and a test hardening the temporary directory cleanup path. Fusion-Task-Id: FN-4157
This commit is contained in:
5
.github/actions/setup-node-pnpm/action.yml
vendored
5
.github/actions/setup-node-pnpm/action.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: setup-node-pnpm
|
name: setup-node-pnpm
|
||||||
description: "Checkout, install pnpm, setup Node.js, install dependencies"
|
description: "Install pnpm, setup Node.js, install dependencies"
|
||||||
inputs:
|
inputs:
|
||||||
node-version:
|
node-version:
|
||||||
description: Node.js version
|
description: Node.js version
|
||||||
@@ -12,9 +12,6 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|
||||||
|
|||||||
@@ -153,19 +153,25 @@ function assertIsolatedWorkspace(dir: string): void {
|
|||||||
|
|
||||||
const createdDirs = new Set<string>();
|
const createdDirs = new Set<string>();
|
||||||
|
|
||||||
|
function sleepSync(ms: number): void {
|
||||||
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
||||||
|
}
|
||||||
|
|
||||||
function cleanupTempDir(dir?: string): void {
|
function cleanupTempDir(dir?: string): void {
|
||||||
if (!dir) return;
|
if (!dir) return;
|
||||||
createdDirs.delete(dir);
|
createdDirs.delete(dir);
|
||||||
for (let attempt = 1; attempt <= 3; attempt += 1) {
|
for (let attempt = 1; attempt <= 5; attempt += 1) {
|
||||||
try {
|
try {
|
||||||
if (!existsSync(dir)) return;
|
if (!existsSync(dir)) return;
|
||||||
rmSync(dir, { recursive: true, force: true });
|
rmSync(dir, { recursive: true, force: true });
|
||||||
return;
|
if (!existsSync(dir)) return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (attempt === 3) {
|
if (attempt === 5) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sleepSync(attempt * 25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user