Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a rake task for getting a csv of debug info for a list of druids ... and update the replication errors wiki #2225

Open
ndushay opened this issue Apr 18, 2023 · 0 comments
Labels
replication_failure failure to replicate specific object(s), whether due to cloud provider hiccup or bug in our code

Comments

@ndushay
Copy link
Contributor

ndushay commented Apr 18, 2023

https://github.com/sul-dlss/preservation_catalog/wiki/Replication-errors refers to this rails console command:

druids = ZipPart.unreplicated.joins(zipped_moab_version: :preserved_object).pluck(:druid).uniq 
debug_infos = Audit::ReplicationSupport.zip_part_debug_info(druids)
# Wait for it to complete ...
CSV.open('debug_info.csv', 'wb') {|csv| debug_infos.each {|debug_info| csv << debug_info }}

Having a rake task for this implies it is more easily used and is also maintained code because of tests.

Note that issue #2224 is about doing a rake task for the first line above.

The actions for this ticket are

  • to make a rake task
  • have test code for the code part
  • add header line with column names to the CSV created
    druid,preserved object version,zipped moab version,endpoint,zip part status,zip part suffix,zipped moab parts count,zip part size,zip part md5,zip part id,zip part created at,zip part updated at,zip part s3 key,zip part endpoint status,zip part endpoint md5
    
  • do a PR for the above
  • update the wiki https://github.com/sul-dlss/preservation_catalog/wiki/Replication-errors to use the rake task instead of the rails console command.
@ndushay ndushay added the replication_failure failure to replicate specific object(s), whether due to cloud provider hiccup or bug in our code label Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
replication_failure failure to replicate specific object(s), whether due to cloud provider hiccup or bug in our code
Projects
None yet
Development

No branches or pull requests

1 participant