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

feat!: force deleting a non-existent blob/manifest #745

Merged
merged 14 commits into from
Jan 12, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Jan 11, 2023

Resolves #722

Signed-off-by: Billy Zha jinzha1@microsoft.com

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2023

Codecov Report

Merging #745 (ce5c0d0) into main (dd279cd) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #745   +/-   ##
=======================================
  Coverage   73.46%   73.46%           
=======================================
  Files          17       17           
  Lines         588      588           
=======================================
  Hits          432      432           
  Misses        125      125           
  Partials       31       31           
Impacted Files Coverage Δ
cmd/oras/internal/option/confirmation.go 86.36% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah marked this pull request as ready for review January 11, 2023 12:11
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM with suggestions.

}

// ApplyFlags applies flags to a command flag set.
func (opts *Confirmation) ApplyFlags(fs *pflag.FlagSet) {
fs.BoolVarP(&opts.Confirmed, "force", "f", false, "do not prompt for confirmation")
fs.BoolVarP(&opts.Force, "force", "f", false, "do not prompt for confirmation")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Should we consider ignore non-existent references, never prompt over do not prompt for confirmation? /cc @FeynmanZhou

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good. Also nonexistent is a word and is already used by rm manual.

Copy link
Member

Choose a reason for hiding this comment

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

Agree with @shizhMSFT 's suggestion. I see @qweeah has incorporated it into the confirmation.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT merged commit 9db2066 into oras-project:main Jan 12, 2023
qweeah added a commit to qweeah/oras that referenced this pull request Jan 13, 2023
Resolves oras-project#722

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
Resolves oras-project#722 

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
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.

return success when force deleting a non-existent blob/manifest
4 participants