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

Workflow for deleted packets #94

Merged
merged 7 commits into from
Aug 29, 2023
Merged

Workflow for deleted packets #94

merged 7 commits into from
Aug 29, 2023

Conversation

richfitz
Copy link
Member

As prompted by @pwinskill, this PR tidies up how users can delete from their archive without causing any major problems. The core feature introduced here is that we now throw (perhaps too) informative error messages when pulling in a dependency fails because of an inconsistency between the metadata store and the packets on disk. This error tries to explain the situation and prompts for a resolution. I've then outlined this in the introduction vignette in a section "Deleting things from the archive" which we'll be able to point people at when this question comes up in future.

Merge after #92, as it contains those commits and depends on that functionality.

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ff8029e) 100.00% compared to head (52745bc) 100.00%.

❗ Current head 52745bc differs from pull request most recent head 1a05fa7. Consider uploading reports for the commit 1a05fa7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #94   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           38        38           
  Lines         3147      3165   +18     
=========================================
+ Hits          3147      3165   +18     
Files Changed Coverage Δ
R/outpack_helpers.R 100.00% <100.00%> (ø)
R/outpack_packet.R 100.00% <100.00%> (ø)
R/outpack_root.R 100.00% <100.00%> (ø)
R/util.R 100.00% <100.00%> (ø)

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

@richfitz richfitz marked this pull request as ready for review August 25, 2023 14:56
@richfitz richfitz requested a review from r-ash August 25, 2023 14:56
Copy link
Contributor

@r-ash r-ash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great too!

cmd <- sprintf(
'orderly2::orderly_validate_archive("%s", action = "orphan")', id)
cli::cli_abort(
c("Unable to copy files, due to corrupt packet {id}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatted about this corrupt does look a bit scary! But hard to think of something much better. "invalid" is not quite accurate. If we could detect accurately it is corrupted because they have deleted something I think it would be good to indicate that in this message to link this message up with the action the user will have taken to get them in this state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this to use either "locally modified" or "deleted" in place of "corrupt" which should be friendlier and also hint at the true problem (see 1a05fa7)

@richfitz richfitz merged commit 95ed042 into main Aug 29, 2023
7 checks passed
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