Repository navigation
Closed
Description
Context
The publication workflow (PR #70) orchestrator requires infrastructure setup for two steps to work in production.
1. S3 Object Lock Setup
The s3_lock step applies Governance-mode Object Lock to all objects under a dataset prefix to prevent accidental deletion after publication.
Requirements
- S3 Bucket versioning: Must be enabled (Object Lock requires versioning)
- Object Lock configuration: Must be enabled on the bucket at creation time
- Cannot be added to existing buckets; if the
nemarbucket doesn't have it, a new bucket is needed or objects must be copied to a lock-enabled bucket
- Cannot be added to existing buckets; if the
- IAM permissions: The Worker's AWS credentials need:
s3:PutObjectRetention s3:GetObjectRetention s3:GetBucketObjectLockConfiguration - Retention mode: Governance (admin can override with
s3:BypassGovernanceRetention) - Retention period: 100 years from lock time
Verification
# Check if bucket has Object Lock enabled
aws s3api get-object-lock-configuration --bucket nemar
# If not enabled, you'll get an error:
# "Object Lock configuration does not exist for this bucket"If bucket doesn't support Object Lock
Options:
- Create a new bucket with Object Lock enabled, migrate data
- Skip the s3_lock step for now (datasets still protected by repo being public + DOI)
- Use a separate lock-enabled bucket for published dataset copies
2. Zenodo API Configuration
The doi_create step creates a concept DOI on Zenodo for datasets that don't have one.
Requirements
- ZENODO_API_KEY Worker secret: Must be a valid Zenodo API token (not sandbox)
- Currently the Worker has this secret set, but the API is returning HTML instead of JSON
- This suggests the token might be a sandbox token being used against production Zenodo, or the API endpoint is wrong
Verification
# Test the Zenodo API key
curl -s https://zenodo.org/api/deposit/depositions \
-H "Authorization: Bearer $ZENODO_API_KEY" | head -50
# Should return JSON array, not HTMLCheck endpoint in code
The createDeposition function in backend/src/services/zenodo.ts should be calling:
- Production:
https://zenodo.org/api/deposit/depositions - Sandbox:
https://sandbox.zenodo.org/api/deposit/depositions
Verify the function uses the correct base URL based on the sandbox parameter.
3. Test Dataset (nm099999)
A disposable test dataset nm099999 exists in D1 and GitHub (nemarDatasets/nm099999, private) for E2E testing of the publish workflow. It has CI workflows deployed.
Checklist
- Verify S3 bucket Object Lock support (
aws s3api get-object-lock-configuration --bucket nemar) - If not supported, decide on approach (new bucket vs skip vs separate bucket)
- Add IAM permissions for Object Lock if needed
- Verify ZENODO_API_KEY is production (not sandbox) token
- Test Zenodo API endpoint returns JSON
- Run full E2E publish workflow with nm099999 after fixes
Metadata
Metadata
Assignees
Labels
No labels
Activity
neuromechanist commentedon Jan 27, 2026
This is completed based on recreating the NEMAR bucket with lock on and versioning on, and Obtaining Zenodo API keys for NEMAR Admin.