Skip to content

fix(fs): ignore ETIMEDOUT in scandir on network mounts - #1217

Merged
BYK merged 1 commit into
mainfrom
seer/fix/cli-1zb-scandir-errors
Jul 31, 2026
Merged

fix(fs): ignore ETIMEDOUT in scandir on network mounts#1217
BYK merged 1 commit into
mainfrom
seer/fix/cli-1zb-scandir-errors

Conversation

@sentry

@sentry sentry Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Previously, ETIMEDOUT errors encountered during readdir operations on network or cloud-mounted filesystems (e.g., CloudStorage, Ubuntu server mounts) were being reported to Sentry. While the filesystem scan itself gracefully recovers from these transient errors by returning an empty list and continuing, the isIgnorableFileError() function did not include ETIMEDOUT in its allow-list. This led to noisy, spurious error reports in Sentry.

This change updates src/lib/dsn/fs-utils.ts to add ETIMEDOUT to the list of ignorable file system error codes. This ensures that transient connection timeouts during filesystem scans are no longer captured by Sentry, reducing noise without altering the scan's behavior.

Fixes CLI-1ZB

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions github-actions Bot added the risk: high PR risk score: high label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1217/

Built to branch gh-pages at 2026-07-31 19:24 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 5334 uncovered lines.
✅ Project coverage is 81.82%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    81.81%    81.82%    +0.01%
==========================================
  Files          423       423         —
  Lines        29343     29343         —
  Branches     19118     19119        +1
==========================================
+ Hits         24006     24009        +3
- Misses        5337      5334        -3
- Partials      1989      1988        -1

Generated by Codecov Action

@sentry sentry Bot changed the title fix(fs-utils): ignore ETIMEDOUT and EINVAL during scandir fix(fs): ignore ETIMEDOUT in scandir on network mounts Jul 10, 2026
@BYK BYK added the jared Trigger the Jared agent to work on stuff label Jul 31, 2026
ETIMEDOUT errors during readdir on network/cloud-mounted filesystems
(CloudStorage, remote server mounts) were reported to Sentry as noise.
The scan already recovers gracefully by returning an empty list, so add
ETIMEDOUT to isIgnorableFileError's allow-list.

Fixes CLI-1ZB
@jared-outpost
jared-outpost Bot force-pushed the seer/fix/cli-1zb-scandir-errors branch from cf72228 to a1fb373 Compare July 31, 2026 19:23
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: high PR risk score: high labels Jul 31, 2026
@jared-outpost

jared-outpost Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Rebuilt this branch on current main — it had diverged with no common ancestor (created before the pnpm-workspace restructure at #1254), so it couldn't be rebased normally and showed as conflicting.

Verified the bug still exists: isIgnorableFileError in packages/cli/src/lib/dsn/fs-utils.ts handles ENOENT/EACCES/EPERM/EISDIR/ENOTDIR/EINVAL/ELOOP but not ETIMEDOUT. Re-applied the one-line allow-list addition at the file's current location and added an ETIMEDOUT case to fs-utils.test.ts. Lint, typecheck, and the fs-utils tests pass locally; PR is now mergeable.

@BYK
BYK merged commit 04b9a62 into main Jul 31, 2026
31 checks passed
@BYK
BYK deleted the seer/fix/cli-1zb-scandir-errors branch July 31, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jared Trigger the Jared agent to work on stuff risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant