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

Cleanup backup restore and document external deps #2964

Merged
merged 7 commits into from
Apr 5, 2023

Conversation

ncopa
Copy link
Collaborator

@ncopa ncopa commented Apr 3, 2023

Description

Fixes #2473

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist:

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@ncopa ncopa force-pushed the cleanup-backup-restore branch 4 times, most recently from b9f2ccd to ed48d89 Compare April 4, 2023 14:40
@ncopa ncopa marked this pull request as ready for review April 4, 2023 14:44
@ncopa ncopa requested a review from a team as a code owner April 4, 2023 14:44
@ncopa ncopa requested review from kke and juanluisvaladas April 4, 2023 14:44
@ncopa ncopa force-pushed the cleanup-backup-restore branch from dc4e76a to 099a1d1 Compare April 4, 2023 15:18
internal/pkg/dir/dir_test.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@ncopa ncopa force-pushed the cleanup-backup-restore branch from 099a1d1 to e662472 Compare April 4, 2023 17:09
ncopa added 7 commits April 5, 2023 11:55
Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Verify that filesystem's Backup() creates the list as expected when:
- the path is a directory with files
- the path is a single file
- the path points to something non-existing

Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Remove unnecessary dir() helper function.

The filepath.Walk() will walk the top-level path if it is a file, so we
don't need to test for IsDir().

We can catch the IsNotExist error while walking the path.

Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Signed-off-by: Natanael Copa <ncopa@mirantis.com>
ref k0sproject#2473 (comment)

Signed-off-by: Natanael Copa <ncopa@mirantis.com>
fixes k0sproject#2473

Signed-off-by: Natanael Copa <ncopa@mirantis.com>
@ncopa ncopa force-pushed the cleanup-backup-restore branch from e662472 to bf66960 Compare April 5, 2023 09:55
@ncopa ncopa merged commit d1329fd into k0sproject:main Apr 5, 2023
@ncopa ncopa deleted the cleanup-backup-restore branch April 5, 2023 10:09
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.

K0S doesn't have external dependencies properly documented
3 participants