Skip to content

Import: keep serving when DATA_DIR is unreadable - #84

Merged
Luen merged 1 commit into
mainfrom
import-unreadable-data-dir
Nov 2, 2026
Merged

Luen merged 1 commit into
mainfrom
import-unreadable-data-dir

Conversation

@Luen

@Luen Luen commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #83.

What

  • listWorkbooks(dir, onError) now skips any folder or file it can't list or stat (EACCES, ENOTDIR…) and reports it, instead of throwing.
  • runImport logs each unreadable path on the Data quality page as an error. The message says how to fix it: make the folder readable by uid 65532 with chmod -R o+rX. The site keeps serving and shows the usual "No spreadsheets found" banner.
  • importHash includes the unreadable paths, so once the permissions are fixed the next check (within a minute) rebuilds, with no restart needed.
  • IMPORTER_VERSION is bumped to 3, and DEPLOY.md troubleshooting now covers the case.

Checks

  • pnpm lint, pnpm check and pnpm test pass (40 tests). The new unreadable.test.ts simulates an unreadable folder with ENOTDIR, which behaves the same on every OS.
  • The real-data test still imports 3,133 captures.

🤖 Generated with Claude Code

listWorkbooks() now skips folders and files it can't read and reports them,
so an EACCES on the mounted data folder shows up on the Data quality page
instead of failing every request. Unreadable paths are part of the
fingerprint, so fixing the permissions triggers a rebuild without a restart.

Fixes #83

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Luen
Luen merged commit 942a01f into main Nov 2, 2026
5 checks passed
@Luen
Luen deleted the import-unreadable-data-dir branch November 2, 2026 23:16
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.

Import: an unreadable DATA_DIR takes the whole site down

1 participant