Repository navigation
Fix S3 initremote false-fallback to enableremote (#396) - #397
Merged
Merged
Conversation
Tighten the configureS3Remote fallback so it only fires on git-annex's
actual duplicate-remote wording ("There is already a special remote
named X"), not on any S3 stderr containing the substring "already
exists". Substring matching previously matched bucket-level errors
like BucketAlreadyOwnedByYou and triggered a doomed enableremote for
a remote that was never registered, masking the real S3 error as
"git-annex: there is no available git remote named nemar-s3".
Also rewrite annexRemoteExists to probe with `git annex info <name>
--json` directly instead of fuzzy-matching repository descriptions
in the full info dump.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR397Version: 🤖 Updated on each push. |
- Tighten annexRemoteExists to require info.remote === name; rejects the 'here' alias, bare UUIDs, and annexed-file path collisions that git annex info accepts as valid lookups. - Extract initOrEnableSpecialRemote so the duplicate-detect-and-fallback flow is generic and end-to-end testable with type=directory remotes (no S3 credentials needed). - Surface raw stderr or exit code when initremote fails and filterAnnexInfoMessages strips everything, so users no longer see a bare 'Failed to configure S3 remote' with no context. - Add tests for the here/UUID/file-collision false positives, the new end-to-end fallback path, and a multi-line stderr regex fixture. - Assert init exit codes inside newAnnexRepo so missing git-annex fails the suite cleanly instead of producing confusing assertions.
Contributor
Author
Review fixes (commit 6a375b5)Ran Critical
Important
Nice-to-have
Not addressed (deliberately)
Tests: 14/14 pass on the new file ( |
This was referenced Apr 30, 2026
neuromechanist
added a commit
that referenced
this pull request
Sep 21, 2026
A lot of its state moved on 2026-09-20 and 2026-09-21. #387 and #397 merged, #399 landed the Python 3.12 floor and the Pyodide-bounded dependency floors, #402 corrected #399, and #403 is open to merge develop into the epic branch. Records the correction rather than quietly restating the conclusion: only compiled floors are a ceiling in the browser, because the test is whether the package publishes a pure-Python wheel and not whether Pyodide bundles it. The earlier claim that threadpoolctl>=3.6.0 was a live broken install was wrong. Also records the integration bug #403 exposed, since it is the argument for not letting the epic branch drift again: MemmapData.__array_function__ returned NotImplemented for everything except copyto and put, and defining that method opts a type into numpy's dispatch protocol where NotImplemented raises rather than falling back. Develop's #351 test covers that path and the epic branch never had it. Notes that the case for holding #386 is weaker now that the epic branch is no longer behind, and carries #400 and #401 as open.
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
Closes #396.
configureS3Remotefallback so it only fires on git-annex's actual duplicate-remote wording (There is already a special remote named "X"), not on any stderr substring"already exists". The old loose match could be triggered by S3 bucket-level errors (BucketAlreadyOwnedByYou,BucketAlreadyExists) and cascade into a doomedenableremotefor a remote that was never registered, surfacing asgit-annex: there is no available git remote named nemar-s3.annexRemoteExistswith a directgit annex info <name> --jsonprobe.Why this matters
This is what is breaking the OpenNeuro onboard workflow at
nemarDatasets/.github/workflows/onboard-openneuro.yml. Most recent failure: https://github.com/nemarDatasets/.github/actions/runs/25174599561/job/73803153849Test plan
bun test test/git-annex-remote.test.ts(7 new tests, all pass)bun run typecheckbun run lint(no new warnings)git annex info <name> --jsonreturnssuccess:truewith auuidonly for registered special remotesThere is already a special remote named "X". (Use enableremote to enable an existing special remote.)and that the new regex matches itnemar admin import-openneuro ds003825 --localafter cleanup to confirm S3 setup succeeds (or surfaces the real S3 error)Out of scope
The publish/request endpoint also blocks the OpenNeuro onboard workflow when BIDS CI has not finished or is failing (PR #274 gating). Tracking separately; this PR only fixes the S3 remote setup step.