Skip to content

Release v0.8.8: fix S3 initremote false-fallback - #398

Merged
neuromechanist merged 4 commits into
mainfrom
dev
Apr 30, 2026
Merged

neuromechanist merged 4 commits into
mainfrom
dev

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Patch release. Fixes the OpenNeuro onboarding workflow at nemarDatasets/.github/workflows/onboard-openneuro.yml (recent failure: https://github.com/nemarDatasets/.github/actions/runs/25174599561/job/73803153849).

  • Tighten configureS3Remote so the enableremote fallback fires only on git-annex's exact "There is already a special remote named X" message instead of any stderr containing the substring "already exists". The loose match was triggered by S3 bucket-conflict messages (BucketAlreadyOwnedByYou, BucketAlreadyExists) and cascaded into a doomed enableremote, surfacing as git-annex: there is no available git remote named nemar-s3.
  • Rewrite annexRemoteExists to probe with git annex info <name> --json and require info.remote === name. Rejects the here alias, bare UUIDs, and annexed-file path collisions that git annex info accepts.
  • Extract initOrEnableSpecialRemote so the duplicate-detect-and-fallback flow is testable end-to-end with type=directory remotes.
  • Surface raw stderr or exit code on initremote failure when filterAnnexInfoMessages strips everything, so users no longer see a bare "Failed to configure S3 remote".

Closes #396.

Test plan

nemar-bot and others added 4 commits April 29, 2026 22:24
* Fix S3 initremote false-fallback to enableremote (#396)

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.

* Address PR review findings (#397)

- 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.
@neuromechanist
neuromechanist merged commit 8df1221 into main Apr 30, 2026
18 checks passed

This branch was previously deployed

2 inactive deployments
development — 80a30727 Deployed Apr 30, 2026 by neuromechanist via deploy-dev #209
npm — 80a30727 Deployed Apr 30, 2026 by neuromechanist via publish #697
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.

Fix S3 initremote false-fallback to enableremote on bucket-level errors

1 participant