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

cmd/pkg: Apply operation #63

Merged
merged 10 commits into from
May 21, 2023
Merged

cmd/pkg: Apply operation #63

merged 10 commits into from
May 21, 2023

Conversation

matbme
Copy link
Member

@matbme matbme commented May 15, 2023

This PR adds the abroot pkg apply operation to apply package changes based on the current image.

This operation assumes that the base image used to build the current root is available either locally or on the remote (which we shouldn't have to pull from but are able to if necessary). This means that we need to make sure we always keep around the current image, as well as the previous root image if it isn't the same.

Another option would be to use the image ABRoot builds when running the upgrade, but we would need to make sure that any package that was removed from packages.add or packages.remove gets removed/reinstalled.

@mirkobrombin what's your input on this? It's important to keep in mind that each image is over 4GB, so we should keep as few images as possible

This commit adds the `abroot pkg apply` operation to apply package
changes based on the current image.
@matbme matbme requested a review from mirkobrombin May 15, 2023 00:44
@matbme matbme marked this pull request as draft May 15, 2023 00:44
@mirkobrombin
Copy link
Member

mirkobrombin commented May 15, 2023

Newest images should be around 2GB now, make sure to pull the new one or reset the storage in your next test.

Personally I'm fine with using the pulled one instead of the locally built, since that could already include some changes which we can remove easily since added and removed packages are stored in different files, but at cost of big layers, since adding then removing will still add bytes to the layer

@matbme
Copy link
Member Author

matbme commented May 15, 2023

Newest images should be around 2GB now

I'm pretty sure 2GB is their compressed size. They are still taking 4GB in storage on a fresh install.

image

@mirkobrombin
Copy link
Member

makes sense

matbme added 8 commits May 15, 2023 21:57
This commit implements the new storage handling system. The apply
command will now create a new ABRoot image based on the previous image,
that is, without pulling a new image from the registry, and apply
package changes from packages.unstaged.
@matbme
Copy link
Member Author

matbme commented May 20, 2023

The new container storage logic is implemented. ABRoot should now automatically remove old images and use new build images for apply operations. @mirkobrombin could you take a look again?

@matbme matbme marked this pull request as ready for review May 20, 2023 23:08
@matbme matbme requested a review from mirkobrombin May 20, 2023 23:17
@matbme matbme merged commit b71f595 into v2 May 21, 2023
@matbme matbme deleted the pkg-apply branch June 7, 2023 20:11
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.

2 participants