As a user, I want to see changes updated in the core schema files in S3 after updating a metadata record in DocDB, so changes are synced in s3 and docdb.
Currently, the aind_buckets_indexer.py job will check for updates to records in DocDB and update the metadata.nd.json files in S3.
We also want the individual metadata JSONs (subject, rig, etc) updated in the S3 buckets.
Acceptance criteria
[x] Given the populate_s3_with_metadata_files.py job is run, then the core fields from the metadata.nd.json get saved to json files.
[x] Given the populate_s3_with_metadata_files.py job is run and there already is a {core_schema}.json, the original contents are copied to another file as {core_schema}.old.json.
[x] Given the aind_bucket_indexer.py job is run and there were updates to a metadata record in docdb, the core schema jsons get updated in S3 as well.
[x] Given the aind_bucket_indexer.py job is run and a metadata.nd.json is found or created in S3, also ensure core jsons are copied and in sync.
Sprint Ready Checklist
[x] 1. Acceptance criteria defined
[x] 2. Team understands acceptance criteria
[x] 3. Team has defined solution / steps to satisfy acceptance criteria
[x] 4. Acceptance criteria is verifiable / testable
[x] 5. External / 3rd Party dependencies identified
Discussed with @dyf and @saskiad, we can write the original core schema jsons to:
s3://{bucket}/{s3_prefix}/original_metadata/{core_schema}.{date_stamp}.json.
User story
As a user, I want to see changes updated in the core schema files in S3 after updating a metadata record in DocDB, so changes are synced in s3 and docdb.
Currently, the
aind_buckets_indexer.py
job will check for updates to records in DocDB and update themetadata.nd.json
files in S3. We also want the individual metadata JSONs (subject, rig, etc) updated in the S3 buckets.Acceptance criteria
populate_s3_with_metadata_files.py
job is run, then the core fields from the metadata.nd.json get saved to json files.populate_s3_with_metadata_files.py
job is run and there already is a {core_schema}.json, the original contents are copied to another file as {core_schema}.old.json.aind_bucket_indexer.py
job is run and there were updates to a metadata record in docdb, the core schema jsons get updated in S3 as well.aind_bucket_indexer.py
job is run and a metadata.nd.json is found or created in S3, also ensure core jsons are copied and in sync.Sprint Ready Checklist
Notes
Add any helpful notes here.