fix(ci): rebuild stale sticky dependency snapshots (#113142)

This commit is contained in:
Peter Steinberger
2026-07-23 13:59:22 -07:00
committed by GitHub
parent 03c9b22762
commit 8a2b2b35f5
2 changed files with 14 additions and 0 deletions

View File

@@ -387,6 +387,12 @@ runs:
append_pnpm_option_arg PNPM_CONFIG_NETWORK_CONCURRENCY network-concurrency
append_pnpm_option_arg PNPM_CONFIG_STORE_DIR store-dir
append_pnpm_option_arg PNPM_CONFIG_VIRTUAL_STORE_DIR virtual-store-dir
if [ "$STICKY_DISK" = "true" ] && [ "$STICKY_WRITER" = "true" ] &&
[ "$sticky_snapshot_matches" != "true" ]; then
# A mounted stale tree can make a normal frozen install report "Already up to date".
# Only the canonical writer may rebuild the shared modules directory in place.
install_args+=(--force)
fi
run_pnpm_install() {
if [ "$STICKY_DISK" = "true" ]; then
# Pnpm can keep retrying optional platform tarballs after the

View File

@@ -2161,6 +2161,14 @@ describe("ci workflow guards", () => {
);
expect(installStep.run).toContain("timeout --signal=TERM --kill-after=15s 4m");
expect(installStep.run).toContain('pnpm "${install_args[@]}" --config.fetch-retries=0');
const forceStickyWriterInstall =
'if [ "$STICKY_DISK" = "true" ] && [ "$STICKY_WRITER" = "true" ] &&\n' +
' [ "$sticky_snapshot_matches" != "true" ]; then';
expect(installStep.run).toContain(forceStickyWriterInstall);
expect(installStep.run).toContain("install_args+=(--force)");
expect(installStep.run.indexOf(forceStickyWriterInstall)).toBeLessThan(
installStep.run.indexOf("run_pnpm_install()"),
);
expect(installStep.run).toContain("install_attempts=2");
expect(installStep.run).toContain("install_attempts=3");
expect(installStep.run).toContain(