Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Problem
After a dataset is published, the S3 bucket policy allows public read access (addPublicReadPolicy), and the GitHub repo is made public. However, git-annex is never configured with the public S3 URL. This means consumers who clone a published dataset cannot use git annex get to download data files without AWS credentials.
Current State
configureS3Remote()exists insrc/lib/git-annex.ts(L433-489) withpublicUrlparameter support, but is never calledaddPublicReadPolicy()inbackend/src/services/s3.tscorrectly enabless3:GetObjectforPrincipal: "*"on the dataset prefix- Publication orchestrator in
backend/src/routes/admin.tshas 13 steps but none configure git-annex for public access - The gap: S3 is publicly readable, but git-annex doesn't know about the public URL
Expected Behavior
After publication, anyone should be able to:
git clone https://github.com/nemarDatasets/nm000XXX.git
cd nm000XXX
git annex get . # downloads all data files from public S3 without credentialsImplementation
Add a publication step (after s3_lock, before generate_archive) that configures the git-annex S3 remote with publicurl. Two approaches:
Option A: GitHub Actions workflow step
Add to the generate-archive.yml workflow (or a new workflow) a step that runs:
git annex initremote nemar-s3-public type=S3 \
bucket=nemar \
fileprefix=${DATASET_ID}/objects/ \
public=yes \
publicurl=https://nemar.s3.us-east-2.amazonaws.com \
encryption=none
git push origin git-annexOption B: Direct git-annex branch manipulation via GitHub API
Update the remote.log in the git-annex branch via the GitHub API (no git-annex installation needed, runs on CF Workers).
Considerations
- Option A is simpler and more reliable (uses git-annex natively)
- Option B avoids depending on GitHub Actions but requires understanding git-annex internal file formats
- The
configureS3Remote()function in the CLI could be reused if the configuration is done client-side - Must ensure
fileprefixuses the newobjects/subdirectory layout (PR Reorganize S3 bucket to subdirectory layout #100)
Related
- PR Reorganize S3 bucket to subdirectory layout #100: Extensible S3 bucket structure (objects/, version/, archives/)
src/lib/git-annex.ts:configureS3Remote()- existing but unused functionbackend/src/services/s3.ts:addPublicReadPolicy()- already handles bucket policy
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
Add public S3 access for git-annex on publication
Add public S3 access for git-annex on publication
Add public S3 access for git-annex on publication (#102)
Reorganize AGENTS.md into a map, add a systems inventory (#1107)