File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
services/datalad/datalad_service/tasks Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -96,13 +96,24 @@ async def export_backup_and_drop(dataset_path):
9696 """
9797 Export dataset to S3 backup, verify s3-PUBLIC, and drop local data.
9898 """
99+ dataset_id = os .path .basename (dataset_path )
100+ public_dataset = is_public_dataset (dataset_id )
99101 repo = pygit2 .Repository (dataset_path )
100102 update_s3_sibling (dataset_path )
101103 tags = sorted (git_tag (repo ), key = lambda tag : tag .name )
102104 if tags :
103105 await s3_backup_push (dataset_path )
104106 for tag in tags :
107+ logger .info (f'Exporting/dropping tag { dataset_id } @{ tag .name } ' )
108+ # Private datasets need to export each tag for this step
109+ if not public_dataset :
110+ await s3_export (dataset_path , get_s3_remote (), tag .name )
105111 await fsck_and_drop (dataset_path , tag .name )
112+ logger .info (f'Exporting/dropping tag { dataset_id } @{ tag .name } complete' )
113+ if not public_dataset :
114+ logger .info (f'Setting access tag for { dataset_id } ' )
115+ await set_s3_access_tag (dataset_id , 'private' )
116+ logger .info (f'{ dataset_id } export_backup_and_drop complete' )
106117
107118
108119@broker .task
You can’t perform that action at this time.
0 commit comments