-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix Recovery only upgrades #1988
Fix Recovery only upgrades #1988
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1988 +/- ##
=======================================
Coverage 72.54% 72.55%
=======================================
Files 76 76
Lines 8896 8902 +6
=======================================
+ Hits 6454 6459 +5
- Misses 1909 1910 +1
Partials 533 533 ☔ View full report in Codecov by Sentry. |
Back to draft since this seems to be breaking the btrfs install. |
@@ -294,16 +294,16 @@ func UnmountFileSystemImage(c v1.Config, img *v1.Image) error { | |||
// CreateFileSystemImage creates the image file for the given image. An root tree path | |||
// can be used to determine the image size and the preload flag can be used to create an image | |||
// including the root tree data. | |||
func CreateFileSystemImage(c v1.Config, img *v1.Image, rootDir string, preload bool) error { | |||
c.Logger.Infof("Creating image %s", img.File) | |||
func CreateFileSystemImage(c v1.Config, img *v1.Image, rootDir string, preload bool, excludes ...string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if do we have a need to actually bring this excluding paths up that far. Do we have any call of CreateImageFromTree
where we don't set it to the defaults or were this could have an undesired effect? Probably the same applies for CreateFileSystemImage
.
I mean probably it is just enough adding the default excludes inside CreateFileSystemImage
and on CreateImageFromTree
and there is no need to map this change that far up. I think having it ported all way up males sense if we make use of it at action level, otherwise probably we can keep it minimal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I didn't want to sneak it in because I was afraid it could have unexpected effects.
This is also used by the build-disk, however I agree it should not have any undesired effect.
I think we can hardcode this in CreateImageFromTree, since we need to pass the exclusion list to CreateFileSystemImage and later utils.SyncData.
273d9b4
to
224bfb3
Compare
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
This reverts commit 37a4c4e.
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
0f41d1e
to
5969c0e
Compare
Did a full re-test after latest fixes and rebasing:
Seems to all work good now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good 👍
@@ -696,7 +696,12 @@ var _ = Describe("Utils", Label("utils"), func() { | |||
Expect(err).ShouldNot(HaveOccurred()) | |||
Expect(size).To(Equal(int64(3072))) | |||
}) | |||
It("Returns the expected size of a test folder", func() { | |||
It("Returns the size of a test folder when skipping subdirectories", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, loving this sort of tests. They are super useful in case someday in the future we change some apparently simple utility.
Part of rancher/elemental#1218