Skip to content

Conversation

@nellh
Copy link
Contributor

@nellh nellh commented Oct 11, 2024

Fixes several issues with the purge annex key implementation. git-annex does not output ok in the success case here and with force allows you to call purge on any annex key regardless of it if exists or not. Just checking the exit code here should be sufficient to make sure git-annex ran as expected.

We also need to check every S3 URL for a key, previously this would delete one versionId at a time. It's very common for a key to be exported under two versions on S3 and this will remove all copies (including those associated with another file path).

In the future we may need to filter to OpenNeuro created remotes. Need to consider this for several situations with sparse datasets where content is only held remotely.

@codecov
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.84%. Comparing base (857ca27) to head (dfe0f3b).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3172      +/-   ##
==========================================
- Coverage   44.16%   42.84%   -1.32%     
==========================================
  Files         593      549      -44     
  Lines       37809    36187    -1622     
  Branches     1132     1132              
==========================================
- Hits        16697    15506    -1191     
+ Misses      20910    20479     -431     
  Partials      202      202              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nellh nellh merged commit e85b6ea into master Oct 15, 2024
11 of 14 checks passed
@nellh nellh deleted the purge-fixes branch October 15, 2024 15:49
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.

2 participants