Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

PRD-9471 Retry every pnpm/setup download once (#6517)

Andrew Mikofalvy6cce01795b00
diff --git a/.github/scripts/cache-mode-shape.test.mjs b/.github/scripts/cache-mode-shape.test.mjs
index 779789161..db1a8546d 100644
--- a/.github/scripts/cache-mode-shape.test.mjs
+++ b/.github/scripts/cache-mode-shape.test.mjs
@@ -670,7 +670,9 @@ describe('cache-mode sweep self-tests', () => {
step.uses?.startsWith('pnpm/setup@') ? { ...step, with: { install: false } } : step,
),
}).join('\n'),
- ).toMatch(/does not set cache: false at pnpm\/setup/);
+ ).toMatch(
+ /does not set cache: false at Installing pnpm\ndoes not set cache: false at Installing pnpm \(retry after a failed download\)/,
+ );
});
test('the real signing jobs turn red at the default or at write', () => {
diff --git a/.github/workflows/desktop-build-win-linux.yml b/.github/workflows/desktop-build-win-linux.yml
index 4d91e0ab7..2667de25f 100644
--- a/.github/workflows/desktop-build-win-linux.yml
+++ b/.github/workflows/desktop-build-win-linux.yml
@@ -81,10 +81,39 @@ jobs:
node-version-file: .node-version
package-manager-cache: false
- - uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ - name: Installing pnpm
+ id: pnpm-setup
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ continue-on-error: true
+ timeout-minutes: 2
with:
install: false
cache: false
+ - name: Waiting before retrying the pnpm download
+ if: steps.pnpm-setup.outcome == 'failure'
+ shell: bash
+ run: |
+ echo "::warning::pnpm-setup-retry=started. The first pnpm/setup attempt failed or hit its 2-minute bound; its error is in the Installing pnpm step. Retrying once in 20s."
+ sleep 20
+ - name: Installing pnpm (retry after a failed download)
+ id: pnpm-setup-retry
+ if: steps.pnpm-setup.outcome == 'failure'
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ timeout-minutes: 2
+ with:
+ install: false
+ cache: false
+ - name: Recording the pnpm download retry result
+ if: ${{ !cancelled() && steps.pnpm-setup.outcome == 'failure' }}
+ shell: bash
+ env:
+ RETRY_OUTCOME: ${{ steps.pnpm-setup-retry.outcome }}
+ run: |
+ if [[ "$RETRY_OUTCOME" == success ]]; then
+ echo "::notice::pnpm-setup-retry=recovered. The first pnpm/setup attempt failed and the retry installed pnpm."
+ else
+ echo "::error::pnpm-setup-retry=exhausted retry=${RETRY_OUTCOME}. Both pnpm/setup attempts failed; their errors are in the two Installing pnpm steps."
+ fi
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -190,10 +219,39 @@ jobs:
node-version-file: .node-version
package-manager-cache: false
- - uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ - name: Installing pnpm
+ id: pnpm-setup
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ continue-on-error: true
+ timeout-minutes: 2
+ with:
+ install: false
+ cache: false
+ - name: Waiting before retrying the pnpm download
+ if: steps.pnpm-setup.outcome == 'failure'
+ shell: bash
+ run: |
+ echo "::warning::pnpm-setup-retry=started. The first pnpm/setup attempt failed or hit its 2-minute bound; its error is in the Installing pnpm step. Retrying once in 20s."
+ sleep 20
+ - name: Installing pnpm (retry after a failed download)
+ id: pnpm-setup-retry
+ if: steps.pnpm-setup.outcome == 'failure'
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ timeout-minutes: 2
with:
install: false
cache: false
+ - name: Recording the pnpm download retry result
+ if: ${{ !cancelled() && steps.pnpm-setup.outcome == 'failure' }}
+ shell: bash
+ env:
+ RETRY_OUTCOME: ${{ steps.pnpm-setup-retry.outcome }}
+ run: |
+ if [[ "$RETRY_OUTCOME" == success ]]; then
+ echo "::notice::pnpm-setup-retry=recovered. The first pnpm/setup attempt failed and the retry installed pnpm."
+ else
+ echo "::error::pnpm-setup-retry=exhausted retry=${RETRY_OUTCOME}. Both pnpm/setup attempts failed; their errors are in the two Installing pnpm steps."
+ fi
- name: Install dependencies
env:
@@ -450,10 +508,39 @@ jobs:
node-version-file: .node-version
package-manager-cache: false
- - uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ - name: Installing pnpm
+ id: pnpm-setup
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ continue-on-error: true
+ timeout-minutes: 2
with:
install: false
cache: false
+ - name: Waiting before retrying the pnpm download
+ if: steps.pnpm-setup.outcome == 'failure'
+ shell: bash
+ run: |
+ echo "::warning::pnpm-setup-retry=started. The first pnpm/setup attempt failed or hit its 2-minute bound; its error is in the Installing pnpm step. Retrying once in 20s."
+ sleep 20
+ - name: Installing pnpm (retry after a failed download)
+ id: pnpm-setup-retry
+ if: steps.pnpm-setup.outcome == 'failure'
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ timeout-minutes: 2
+ with:
+ install: false
+ cache: false
+ - name: Recording the pnpm download retry result
+ if: ${{ !cancelled() && steps.pnpm-setup.outcome == 'failure' }}
+ shell: bash
+ env:
+ RETRY_OUTCOME: ${{ steps.pnpm-setup-retry.outcome }}
+ run: |
+ if [[ "$RETRY_OUTCOME" == success ]]; then
+ echo "::notice::pnpm-setup-retry=recovered. The first pnpm/setup attempt failed and the retry installed pnpm."
+ else
+ echo "::error::pnpm-setup-retry=exhausted retry=${RETRY_OUTCOME}. Both pnpm/setup attempts failed; their errors are in the two Installing pnpm steps."
+ fi
- name: Install dependencies
env:
diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml
index 83b1af5e1..0d9324287 100644
--- a/.github/workflows/desktop-build.yml
+++ b/.github/workflows/desktop-build.yml
@@ -96,10 +96,39 @@ jobs:
node-version-file: .node-version
package-manager-cache: false
- - uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ - name: Installing pnpm
+ id: pnpm-setup
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ continue-on-error: true
+ timeout-minutes: 2
with:
install: false
cache: false
+ - name: Waiting before retrying the pnpm download
+ if: steps.pnpm-setup.outcome == 'failure'
+ shell: bash
+ run: |
+ echo "::warning::pnpm-setup-retry=started. The first pnpm/setup attempt failed or hit its 2-minute bound; its error is in the Installing pnpm step. Retrying once in 20s."
+ sleep 20
+ - name: Installing pnpm (retry after a failed download)
+ id: pnpm-setup-retry
+ if: steps.pnpm-setup.outcome == 'failure'
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ timeout-minutes: 2
+ with:
+ install: false
+ cache: false
+ - name: Recording the pnpm download retry result
+ if: ${{ !cancelled() && steps.pnpm-setup.outcome == 'failure' }}
+ shell: bash
+ env:
+ RETRY_OUTCOME: ${{ steps.pnpm-setup-retry.outcome }}
+ run: |
+ if [[ "$RETRY_OUTCOME" == success ]]; then
+ echo "::notice::pnpm-setup-retry=recovered. The first pnpm/setup attempt failed and the retry installed pnpm."
+ else
+ echo "::error::pnpm-setup-retry=exhausted retry=${RETRY_OUTCOME}. Both pnpm/setup attempts failed; their errors are in the two Installing pnpm steps."
+ fi
- name: Install dependencies
# ELECTRON_SKIP_REBUILD=0 overrides the default CI skip in
diff --git a/.github/workflows/native-config-prebuild.yml b/.github/workflows/native-config-prebuild.yml
index ee104d5b0..20eb4b542 100644
--- a/.github/workflows/native-config-prebuild.yml
+++ b/.github/workflows/native-config-prebuild.yml
@@ -87,10 +87,39 @@ jobs:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- - uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ - name: Installing pnpm
+ id: pnpm-setup
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ continue-on-error: true
+ timeout-minutes: 2
with:
install: false
cache: false
+ - name: Waiting before retrying the pnpm download
+ if: steps.pnpm-setup.outcome == 'failure'
+ shell: bash
+ run: |
+ echo "::warning::pnpm-setup-retry=started. The first pnpm/setup attempt failed or hit its 2-minute bound; its error is in the Installing pnpm step. Retrying once in 20s."
+ sleep 20
+ - name: Installing pnpm (retry after a failed download)
+ id: pnpm-setup-retry
+ if: steps.pnpm-setup.outcome == 'failure'
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ timeout-minutes: 2
+ with:
+ install: false
+ cache: false
+ - name: Recording the pnpm download retry result
+ if: ${{ !cancelled() && steps.pnpm-setup.outcome == 'failure' }}
+ shell: bash
+ env:
+ RETRY_OUTCOME: ${{ steps.pnpm-setup-retry.outcome }}
+ run: |
+ if [[ "$RETRY_OUTCOME" == success ]]; then
+ echo "::notice::pnpm-setup-retry=recovered. The first pnpm/setup attempt failed and the retry installed pnpm."
+ else
+ echo "::error::pnpm-setup-retry=exhausted retry=${RETRY_OUTCOME}. Both pnpm/setup attempts failed; their errors are in the two Installing pnpm steps."
+ fi
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0