Repository navigation
fix: stage-out skips inputs stage-in symlinked to a mount (#99) - #110
Merged
Merged
Conversation
Collaborator
Author
Live verification: PASS for #99's scope (spore-host-dev, 2026-11-08)Setup.
This PR. The work dir holds no object from the mounted DB:
Control: released v0.11.0, same config. The bug reproduces, and the whole DB is republished: A separate, pre-existing bug the live run found (filed as #117). Both runs ended with exit 75 (
Cost: 2 × t4g.small for about 1 min each, plus a t4g.nano for about 2 min to build the snapshot. Everything was torn down. Leak check (us-east-1 and us-west-2, after teardown).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #99
Refs spore-host/spore-host#644 (pre-1.0 hardening).
Root cause
Stage-in (#55/#67, and #51 for local-path inputs) makes a declared
pathinput zero-copy byln -sfn-ing its stage name inside${LOCAL_DIR}to the mount. Stage-out isaws s3 sync "${LOCAL_DIR}/" "${WORKDIR_S3}", andaws s3 syncfollows symlinks by default. So the sync walked into/fsx/kraken2(etc.) and uploaded the whole reference DB into every task's work dir.Fix
Option 2 from the issue: the output sync gets
--exclude '<stage>' --exclude '<stage>/*'for each stage name that stage-in symlinked.symlinkedStageNames()uses the same two conditions asbuildInputStaging's twoln -sfnbranches: a mount-basename match, or a local absolute-path source. The mount index is factored into one helper shared by both, so the two can't drift.--no-follow-symlinks. It would also drop symlinks the task itself creates, and nf-core modules do emit symlinked outputs, so those would silently go missing.*,?,[) because AWS CLI filters are fnmatch globs.Verification
SpawnTaskHandlerTest. The two that assert the exclusion fail without the fix (checked by reverting only the sync line:109 tests completed, 2 failed).FileGenerator(follow_symlinks=True)+create_filter) on a local dir withkraken2 -> fsx/kraken2. Without the excludes it yieldskraken2/hash.k2dandreport.txt. With them it yields onlyreport.txt. A symlinked file nameddb[1].fais excluded by the escaped glob too. No AWS was reached.Not in scope (observation)
Inputs that are copied in (e.g. the 2.84 GB fastqs in the issue's listing) are still re-uploaded by the same sync, because they are regular files in
${LOCAL_DIR}. That is a separate duplication and is not addressed here.Before merge
A live run would confirm the S3 listing: one task with an
ext.fsx/ext.volumesDB, then check that its work dir holds nokraken2/objects.