nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.75k stars 2.37k forks source link

fix(core): exponential retry on cache put fail #29017

Open mike-fam opened 1 day ago

mike-fam commented 1 day ago

Fix exponential retries so that it behaves according to the comments.

The current comments and implementation of this exponential backoff are not behaving correctly, causing issues when many (~100) parallel tasks access the same local cache on a Network Drive. I've updated it to have the correct functionality while maintaining the maximum allowable time.

Current Behavior

The current exponential backoff retry logic only allows up to 1364 ms (4 + 4² + 4³ + 4⁴ + 4⁵), while the comment allows up to 20480 ms, albeit with confusing maths.

Expected Behavior

Exponential backoff retry is run correctly with the maximum allowable time of 20480 ms

Related Issue(s)

21926

Fixes #21926

vercel[bot] commented 1 day ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **nx-dev** | ⬜️ Ignored ([Inspect](https://vercel.com/nrwl/nx-dev/2h2kXtYJwLicmjLuNzgxba6hsokL)) | [Visit Preview](https://nx-dev-git-fork-mike-fam-feature-exponential-retry-d81d76-nrwl.vercel.app) | Nov 21, 2024 5:32am |
nx-cloud[bot] commented 1 day ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit f851a1a5a963c7f6ea86eeb0229768a2e477738c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx documentation --no-dte

Sent with 💌 from NxCloud.