Skip to content

fix(geojob): handle EXDEV when moving staged files to the target dire… - #959

Merged
rogonion merged 1 commit into
testfrom
fix/occurrence-data-and-na-misrepresentation
Nov 9, 2026
Merged

rogonion merged 1 commit into
testfrom
fix/occurrence-data-and-na-misrepresentation

Conversation

@rogonion

@rogonion rogonion commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

…ctory

In k3s the staging dir is on the container filesystem while the target (/occurrence_data) is a mounted PVC, so fs.rename() fails with EXDEV: cross-device link not permitted, and the whole atomic replacement failed.

atomicReplaceFile now uses a moveFile helper: rename() as before, but on EXDEV it copies to a temp file inside the target directory, renames there (still atomic on the target device), and unlinks the staging file. Verified the EXDEV path for real inside the dev container (/tmp -> bind-mounted repo).

…ctory

In k3s the staging dir is on the container filesystem while the target
(/occurrence_data) is a mounted PVC, so fs.rename() fails with EXDEV:
cross-device link not permitted, and the whole atomic replacement failed.

atomicReplaceFile now uses a moveFile helper: rename() as before, but on
EXDEV it copies to a temp file inside the target directory, renames there
(still atomic on the target device), and unlinks the staging file. Verified
the EXDEV path for real inside the dev container (/tmp -> bind-mounted repo).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>
@rogonion
rogonion merged commit 35c3cde into test Nov 9, 2026
6 checks passed
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