Skip to content

fix(core): carry over local data with long filenames - #1708

Open
ikenyal wants to merge 1 commit into
aws:mainfrom
ikenyal:fix/legacy-mock-data-long-filenames
Open

ikenyal wants to merge 1 commit into
aws:mainfrom
ikenyal:fix/legacy-mock-data-long-filenames

Conversation

@ikenyal

@ikenyal ikenyal commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The local-data carry-over added in #1607 appends .<uuid>.tmp to each destination filename while copying. A FileBucket object with a 220-byte key fits on disk, but its temporary filename is 261 bytes. On a filesystem with a 255-byte filename limit, opening the bucket after an upgrade fails with ENAMETOOLONG even though the existing data is readable.

Issue #, if available: N/A

Changes

  • Stage each copy under a short, unique directory beside the destination, without using the destination's basename. Keep the hard link that prevents a concurrent write from being overwritten, and remove the staging directory after the copy attempt.
  • Add a regression test for both the object body and its metadata, including staging cleanup. Update the existing no-overwrite test to place the new file before the first migration runs.
  • Document why the staging path stays short and adjacent to the destination, and add a patch changeset for core and the umbrella package.

Validation

  • The new 220-byte filename regression failed with ENAMETOOLONG on unmodified source and passed after the fix. All 14 migration tests passed.
  • Verified locally that FileBucket can reopen the migrated object with its body and metadata intact, and that a PGlite database can reopen and read an existing row after carry-over.
  • npm run build (with webpack for the Admin UI), npm run lint, npm run lint:deps, and the changeset checks passed.
  • npm run test:e2e:local passed, including the follow-up suites (521 application tests passed, 5 skipped).
  • npm test: all core tests passed. The only failure in the full run was a hosting file watcher timeout; that test passed when rerun on its own.

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ikenyal
ikenyal requested a review from a team as a code owner November 20, 2026 05:41

This branch has not been deployed

No deployments
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