Skip to content

feat: print a warning if network requests are slow#10025

Merged
zkochan merged 5 commits intomainfrom
slow-network-warn
Sep 28, 2025
Merged

feat: print a warning if network requests are slow#10025
zkochan merged 5 commits intomainfrom
slow-network-warn

Conversation

@zkochan
Copy link
Copy Markdown
Member

@zkochan zkochan commented Sep 26, 2025

No description provided.

@zkochan zkochan requested a review from Copilot September 27, 2025 22:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds network performance monitoring to pnpm by implementing warnings for slow network requests, including both metadata fetches and tarball downloads.

Key changes:

  • Add configuration options for warning thresholds (fetchWarnTimeoutMs and fetchMinSpeedKiBps)
  • Implement timing measurements and speed calculations for network operations
  • Display warning messages when requests exceed time thresholds or fall below speed minimums

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
store/store-connection-manager/src/createNewStoreController.ts Pass through new fetch warning configuration options
resolving/npm-resolver/src/index.ts Update resolver to use renamed fetch function and pass warning timeout configuration
resolving/npm-resolver/src/fetch.ts Rename function and add timing measurement with warning for slow metadata requests
pkg-manager/client/src/index.ts Add fetchMinSpeedKiBps option to client interface
fetching/tarball-fetcher/src/remoteTarballFetcher.ts Add speed monitoring and warnings for slow tarball downloads
fetching/tarball-fetcher/src/index.ts Wire through speed configuration options
config/config/src/types.ts Define new configuration option types
config/config/src/index.ts Set default values for warning thresholds
config/config/src/Config.ts Add new options to Config interface

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zkochan zkochan requested a review from Copilot September 27, 2025 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zkochan zkochan requested a review from a team September 27, 2025 22:54
@zkochan zkochan merged commit fb4da0c into main Sep 28, 2025
9 of 13 checks passed
@zkochan zkochan deleted the slow-network-warn branch September 28, 2025 09:19
vaernion pushed a commit to Arbeidstilsynet/brevgen2 that referenced this pull request Dec 3, 2025
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm)) | [`10.17.1` -> `10.18.0`](https://renovatebot.com/diffs/npm/pnpm/10.17.1/10.18.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/10.17.1/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.17.1/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>pnpm/pnpm (pnpm)</summary>

### [`v10.18.0`](https://github.com/pnpm/pnpm/blob/HEAD/pnpm/CHANGELOG.md#10180)

[Compare Source](pnpm/pnpm@v10.17.1...v10.18.0)

##### Minor Changes

- Added network performance monitoring to pnpm by implementing warnings for slow network requests, including both metadata fetches and tarball downloads.

  Added configuration options for warning thresholds: `fetchWarnTimeoutMs` and `fetchMinSpeedKiBps`.
  Warning messages are displayed when requests exceed time thresholds or fall below speed minimums

  Related PR: [#&#8203;10025](pnpm/pnpm#10025).

##### Patch Changes

- Retry filesystem operations on EAGAIN errors [#&#8203;9959](pnpm/pnpm#9959).
- Outdated command respects `minimumReleaseAge` configuration [#&#8203;10030](pnpm/pnpm#10030).
- Correctly apply the `cleanupUnusedCatalogs` configuration when removing dependent packages.
- Don't fail with a meaningless error when `scriptShell` is set to `false` [#&#8203;8748](pnpm/pnpm#8748).
- `pnpm dlx` should not fail when `minimumReleaseAge` is set [#&#8203;10037](pnpm/pnpm#10037).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or PR is renamed to start with "rebase!".

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Related work items: #30372
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.

2 participants