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

Do not ignore permission errors in kopia restore command #1835

Merged
merged 5 commits into from
Jan 5, 2023

Conversation

TimonOmsk
Copy link
Contributor

Change Overview

By default kopia ignores all the errors about permissions (see https://github.com/kopia/kopia/blob/master/cli/command_restore.go#L144)
It leads to hiding such errors and incorrectly restored apps without any notifications.

Pull request type

Please check the type of change your PR introduces:

  • 🌻 Feature

Test Plan

  • ⚡ Unit test

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2023

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Jan 3, 2023
Copy link
Contributor

@pchistikov pchistikov left a comment

Choose a reason for hiding this comment

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

I'd like @pavannd1 or someone else from his team to approve to make sure that they are aware of it and potential implications it can bring.
Probably we should not hardcode it in kanister but propagate --ignore-permission-errors flag value from k10 to avoid any issues for external kanister users.

pkg/kopia/command/restore.go Outdated Show resolved Hide resolved
pkg/kopia/command/snapshot.go Outdated Show resolved Hide resolved
@TimonOmsk
Copy link
Contributor Author

The only doubts I have is about using strconv in commands. Maybe it would be better to create AppendLoggableKVBool function and convert from bool to string in that function and not in command? @pavannd1 @pchistikov

@TimonOmsk TimonOmsk force-pushed the keu/dgolushko/kopia_not_ignore_perms branch from d588f4b to 2e76a4b Compare January 4, 2023 23:15
Copy link
Contributor

@pchistikov pchistikov left a comment

Choose a reason for hiding this comment

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

Looks good to me

Kanister automation moved this from In Progress to Reviewer approved Jan 5, 2023
Copy link
Contributor

@pavannd1 pavannd1 left a comment

Choose a reason for hiding this comment

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

LGTM. We can follow up with the improvement you suggested above 👍🏼

@pavannd1 pavannd1 added the kueue label Jan 5, 2023
@mergify mergify bot merged commit 4c3858a into master Jan 5, 2023
Kanister automation moved this from Reviewer approved to Done Jan 5, 2023
@mergify mergify bot deleted the keu/dgolushko/kopia_not_ignore_perms branch January 5, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants