• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / storage / 38731867030
86%

Build:
DEFAULT BRANCH: master
Ran 15 Oct 2026 12:05PM UTC
Jobs 2
Files 319
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Oct 2026 12:04PM UTC coverage: 85.718% (+0.02%) from 85.703%
38731867030

push

github

web-flow
fix: retry file backend writes when delete cleanup removes the parent directory (#1515)

## What kind of change does this PR introduce?

Bug fix.

## What is the current behavior?

In the file backend, `ensureFile` creates the parent folders and then
the file. A concurrent delete can run `cleanupEmptyDirectories` between
these steps and remove the new, still-empty folders. The upload then
fails with a 500: `ENOENT: no such file or directory, mkdir
'<root>/stub/stub'` (or `open ...`). Closes #1514.

## What is the new behavior?

`ensureFile` retries `mkdir` and `open` on ENOENT, up to 5 attempts.
When `open` succeeds, the file is in the folder, and the cleanup's
`rmdir` fails on a non-empty folder (#1301). All `ensureFile` callers
get the fix: `uploadObject`, `copyObject` and the TUS `FileStore`.

## Additional context

- New unit test in `file.test.ts`: it runs the empty-folder cleanup
right after `mkdir` and checks that the upload still succeeds. It fails
on `master` with `ENOENT ... open` and passes with this change.
- Stress check (not committed): 4 parallel upload/delete loops, 1200
uploads per run. `master`: 8 to 52 failures per run. With this change: 0
failures in 5 runs.
- `biome check`, `prettier --check` and `tsc --noEmit` pass.
- Related to #1301

---------

Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
Co-authored-by: Ferhat Elmas <elmas.ferhat@gmail.com>

7698 of 9483 branches covered (81.18%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 2 files covered. (100.0%)

13362 of 15086 relevant lines covered (88.57%)

861.11 hits per line

Jobs
ID Job ID Ran Files Coverage
1 rest-pg18 - 38731867030.1 15 Oct 2026 12:10PM UTC 299
63.72
GitHub Action Run
2 unit - 38731867030.2 15 Oct 2026 12:05PM UTC 313
67.31
GitHub Action Run
Source Files on build 38731867030
  • Tree
  • List 319
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #38731867030
  • 222c56b4 on github
  • Prev Build on master (#38715190530)
  • Next Build on master (#38744448797)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc