Skip to content

feat(gridfs): MongoDB GridFS backend with native revisions and server-side find - #566

Merged
zechengz merged 6 commits into
mainfrom
feat/gridfs-backend
Jul 19, 2026
Merged

feat(gridfs): MongoDB GridFS backend with native revisions and server-side find#566
zechengz merged 6 commits into
mainfrom
feat/gridfs-backend

Conversation

@zechengz

Copy link
Copy Markdown
Contributor

Summary

  • New gridfs backend in Python and TypeScript (node), mirroring the s3 backend: GridFS filenames as slash-separated keys, trailing-slash marker docs for directories, full read/write command surface via the generic factories. Config: uri, database, bucket (default fs), key_prefix, chunk_size_bytes.
  • Revisions: writes upload a new revision and keep old ones; listings resolve latest-per-filename via one fs.files aggregation; snapshot-pinned reads fetch old revisions by file _id; mv retags filenames server-side so history moves with the file; rm deletes all revisions.
  • Server-side find: -name/-iname/-type/-size push into the fs.files query (anchored basename regex, marker-shape test, length bounds). Every pushed condition is a superset of GNU semantics and the shared keep() pass stays authoritative, so output matches every other backend.
  • Integ: gridfs + gridfs-prefix targets enrolled everywhere s3/s3-prefix run — 1101/1101 on both hosts locally; mongo:8 service added to the integ-shared job; gridfs added to the install matrix.
  • Unit tests: 27 py + 15 ts; mypy zero; ResourceName/registry guard tests updated.
  • Docs: home setup, python resource, and typescript setup pages, matrix row, nav entries, README backend lists.

Testing

  • integ battery: gridfs 1101/1101 + gridfs-prefix 1101/1101 on python and typescript hosts; s3 target re-run green after case enrollment
  • full py suite green (fuse tests are CI-only), TS core 4274 + node 1652 green, pre-commit green

…-side find

Python + TypeScript GridFS resource mirroring the s3 backend: filenames as
slash-separated keys, zero-byte trailing-slash marker docs for directories,
full read/write command surface via the generic factories.

- Writes upload a new revision and keep old ones; reads/listings resolve
  latest-per-filename via one fs.files aggregation; snapshot-pinned reads
  fetch old revisions by file _id; mv retags filenames server-side so
  history moves with the file; rm deletes all revisions.
- find pushes -name/-iname/-type/-size into the fs.files query (anchored
  basename regex, marker-shape test, length bounds); every pushed condition
  is a superset of GNU semantics and the shared keep() pass stays
  authoritative, so behavior matches the other backends exactly.
- Integ: gridfs + gridfs-prefix targets enrolled everywhere s3/s3-prefix
  run; 1101/1101 on both hosts; mongo:8 service added to integ-shared.
- Docs: setup + python resource + typescript setup pages, matrix row,
  nav entries, README backend lists.
@zechengz
zechengz disabled auto-merge July 19, 2026 08:09
@zechengz
zechengz merged commit fd10e4e into main Jul 19, 2026
38 checks passed
@zechengz
zechengz deleted the feat/gridfs-backend branch July 19, 2026 08:12
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.

1 participant