Skip to content

fix(ci): retry yarn audit on transient network errors (WCN-865)#8975

Merged
gokulhost merged 2 commits into
masterfrom
gokuldevaraju330/wcn-865-fix-flaky-yarn-audit-ci-step-with-retry-logic
Jun 9, 2026
Merged

fix(ci): retry yarn audit on transient network errors (WCN-865)#8975
gokulhost merged 2 commits into
masterfrom
gokuldevaraju330/wcn-865-fix-flaky-yarn-audit-ci-step-with-retry-logic

Conversation

@gokulhost

Copy link
Copy Markdown
Contributor

Summary

  • improved-yarn-audit fails with ERROR: Network error occurred when querying audit registry on transient npm registry blips, blocking the release pipeline
  • Added EricCrosson/retry (via BitGo/install-github-release-binary@v2, same pattern as build-system) wrapping the audit step with --up-to 2x --every 3s
  • Also enabled --retry-on-network-failure built into improved-yarn-audit for a 1s inner retry, giving 4 total attempts before failure

Retry chain:

  1. improved-yarn-audit attempt 1 → network error → built-in 1s retry → attempt 2
  2. If still failing, EricCrosson/retry waits 3s → attempt 3 → built-in retry → attempt 4

Applies to both npmjs-release.yml and publish.yml.

Fixes: https://github.com/BitGo/BitGoJS/actions/runs/27217754057/job/80364080072
Linear: WCN-865

Test plan

  • Verify CI passes on this PR
  • Confirm improved-yarn-audit --help shows --retry-on-network-failure flag (v3.0.4 ✓)
  • Confirm EricCrosson/retry installs and retry --up-to 2x --every 3s -- <cmd> syntax is valid

🤖 Generated with Claude Code

@gokulhost gokulhost requested review from a team as code owners June 9, 2026 18:14
@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

WCN-865

gokulhost and others added 2 commits June 9, 2026 11:18
WCN-865

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
WCN-865

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gokulhost gokulhost force-pushed the gokuldevaraju330/wcn-865-fix-flaky-yarn-audit-ci-step-with-retry-logic branch from e10a655 to 49433e0 Compare June 9, 2026 18:18

@bdesoky bdesoky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@gokulhost gokulhost merged commit 5c786ef into master Jun 9, 2026
22 checks passed
- name: Install retry
uses: BitGo/install-github-release-binary@v2
with:
targets: EricCrosson/retry@v1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gokulhost this is installing an unpinned binary from a third-party repository directly into the job that is authorized to publish the SDK. Please install from the BitGo retry repository and make sure to pin the expected digest of the binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants