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

prepareCheckCache function: Add MkdirAll() to restic-cache directory if it doesn't exist #4805

Merged
merged 1 commit into from
May 25, 2024

Conversation

plant99
Copy link
Contributor

@plant99 plant99 commented May 14, 2024

What does this PR change? What problem does it solve?

Earlier, if the specified cache dir didn't exist, restic continued check command with cache disabled.

Henceforth, it tries to create the cache directory.

Was the change previously discussed in an issue or on the forum?

It was previously discussed here: #4437

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

@plant99 plant99 marked this pull request as draft May 14, 2024 07:54
@plant99 plant99 marked this pull request as ready for review May 16, 2024 12:55
Copy link
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

Thanks for working on this issue! The code change itself is mostly fine, except for two minor issues.

However, the test case only seems to test existing behavior, but not the cache directory creating behavior added by this PR. Please fix that.

In addition, the PR must also be rebased, we don't want to merge merge commits. Ideally also squash the commits.

changelog/unreleased/issue-4437 Outdated Show resolved Hide resolved
changelog/unreleased/issue-4437 Outdated Show resolved Hide resolved
cmd/restic/cmd_check.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check_test.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check_test.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check_test.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check_test.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check_test.go Outdated Show resolved Hide resolved
cmd/restic/cmd_check_test.go Outdated Show resolved Hide resolved
@plant99
Copy link
Contributor Author

plant99 commented May 25, 2024

@MichaelEischer
Thanks for the detailed review of this PR :) , I've addressed your concerns.

Please review the following two things again:

  • the single commit message
  • the new test iteration which checks the MkdirAll code paths.

Copy link
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@MichaelEischer MichaelEischer added this pull request to the merge queue May 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 25, 2024
@MichaelEischer MichaelEischer added this pull request to the merge queue May 25, 2024
Merged via the queue into restic:master with commit 21528c9 May 25, 2024
13 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.

None yet

2 participants