Repository navigation
Fix S3 initremote failure on upload resume - #337
Merged
neuromechanist merged 3 commits intoApr 1, 2026
Merged
neuromechanist merged 3 commits into
neuromechanist merged 3 commits into
Conversation
- Pre-set annex-ignore on origin to prevent false failures - Check if remote exists before initremote to avoid conflicts - Pass full S3 config params to enableremote fallback - Filter informational stderr messages from error detection Fixes #336
- Fix silent success: always fail on non-zero exit code, use filtered stderr for message only (not for deciding failure) - Extract enableS3RemoteWithConfig helper to deduplicate logic - Make annexRemoteExists log warnings instead of silent catch - Narrow parenthesized filter to specific safe patterns only - Check git config return value and warn on failure - Guard catch with instanceof Error, add context prefix - Log residual stderr warnings even on initremote success - Fix misleading comments per review feedback
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR337Version: 🤖 Updated on each push. |
Contributor
Author
PR Review SummaryRan 4 review agents (code-reviewer, silent-failure-hunter, comment-analyzer, code-simplifier). All findings addressed in e72dd8e. Critical (2 found, 2 fixed)
High (2 found, 2 fixed)
Important (1 found, 1 fixed)
Comments (4 found, 4 fixed)
Medium (2 found, 2 fixed)
Strengths noted
|
neuromechanist
added a commit
that referenced
this pull request
Apr 17, 2026
Brings to dev from main: - Maintenance mode middleware (#342) - MAINTENANCE_MODE=read-only flip (prod only; dev [env.dev.vars] stays off) - Upload resume fix (#335) - S3 initremote fix on resume (#337) - PR-merge workflow, HED detection, bulk CI deploy (#338) - npm publish fixes (Node 20, npm@11, OIDC) - GitHub Release auto-tag
1 of 3 tasks
neuromechanist
deleted the
336-s3-initremote-fails-on-resume-bucket-annex-uuid-conflict-after-failed-upload
branch
April 28, 2026 01:23
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
Fixes #336.
nemar dataset uploadfails when re-running after a previous failed upload becauseconfigureS3Remote()cannot handle an already-existing git-annex special remote.Three root causes fixed:
annex-ignore false failure: git-annex prints "Remote origin not usable by git-annex; setting annex-ignore" to stderr when it encounters the GitHub origin remote. This warning caused non-zero exit codes, making
initremoteappear to fail even when it might have succeeded. Fix: pre-setremote.origin.annex-ignore = truebefore calling initremote.enableremote missing S3 params: When
initremotefailed with "already exists", the fallbackenableremotecall only passed the remote name, not the bucket/region/prefix/credentials. This meant the remote could not reconnect. Fix: pass full S3 config params toenableremote.No pre-check for existing remote: Always tried
initremotefirst, which fails if the remote exists from a prior attempt. Fix: checkgit annex info --jsonfor existing remote before choosing initremote vs enableremote.Changed files
src/lib/git-annex.ts- RewriteconfigureS3Remote()with three helper functions:filterAnnexInfoMessages()- strips informational stderr linesbuildS3RemoteArgs()- shared config params for init/enableannexRemoteExists()- checks git-annex branch for existing remoteTest plan
bun run build)