Repository navigation
Phase 2: S3 partsize for >5GB uploads (#886) - #935
Merged
neuromechanist merged 2 commits intoJul 6, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Epic #896 Phase 2 (#886). git-annex uploads of any data file >5 GB (common for raw iEEG/EEG) failed with a generic 'Failed to copy to remote'. - buildS3RemoteArgs now emits partsize (default DEFAULT_S3_PARTSIZE=1GiB, per-remote configurable via S3RemoteConfig.partsize) so git-annex uses multipart PUT instead of a single-part PUT that S3 caps at 5 GB (400 EntityTooLarge). Applies to existing remotes on next enableremote. - extractCopyError surfaces git-annex STDOUT on copy failure (the S3 error lands on stdout, not stderr), so users see the real cause not a generic msg. - buildS3RemoteArgs/DEFAULT_S3_PARTSIZE/extractCopyError exported for unit tests; export-surface pin updated (INTERNAL_WIRING) in the same commit.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR935Version: 🤖 Updated on each push. |
extractCopyError's relevant-lines branch was unbounded; a many-file copy failure (generic fail/error matches) could surface hundreds of lines to the CLI. Cap to the last 20 with an omitted-count note, matching the bounded-subprocess-error convention (github.ts, import-openneuro.ts). Added a >20-line test case.
Contributor
Author
Review (sonnet) — findings addressed in 2963f41Clean except one moderate: |
neuromechanist
merged commit Jul 6, 2026
d0dd96d
into
feature/issue-896-epic-arch-hardening
1 check passed
This branch was previously deployed
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.
Summary
nemar dataset uploadcould not upload any data file larger than 5 GB — a hard failure for essentially all raw iEEG/large-EEG datasets — with only a genericFailed to copy to remote.buildS3RemoteArgsnow emitspartsize(defaultDEFAULT_S3_PARTSIZE="1GiB", per-remote configurable viaS3RemoteConfig.partsize). Without it git-annex does a single-part PUT, which S3 caps at 5 GB (400EntityTooLarge);partsizeforces multipart. Applies to existing remotes on the nextenableremote.extractCopyErrorsurfaces git-annex stdout on copy failure — the S3 error lands on stdout, not stderr, so the oldstderr.trim() || "Failed to copy to remote"hid it. Prefers stderr, else the informative stdout lines (else its tail).Test plan
test/s3-remote-partsize.test.ts— partsize present (default 1GiB), configurable, core params intact.test/copy-error-surface.test.ts— stderr preferred; EntityTooLarge recovered from stdout; tail fallback; generic only when empty.test/git-annex-remote.test.ts(32 tests, real git-annex initremote/enableremote) passes — confirms git-annex acceptspartsize=1GiBend to end.buildS3RemoteArgs/DEFAULT_S3_PARTSIZE/extractCopyErroradded to the s3-remote/transfer lists +INTERNAL_WIRING).tsc+ Biome clean.Closes #886
Part of epic #896