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

Remove old images of core and engine after upgrading to latest version #1131

Closed
hemz10 opened this issue Aug 18, 2023 · 6 comments · Fixed by #1314 or #1318
Closed

Remove old images of core and engine after upgrading to latest version #1131

hemz10 opened this issue Aug 18, 2023 · 6 comments · Fixed by #1314 or #1318
Assignees
Labels

Comments

@hemz10
Copy link

hemz10 commented Aug 18, 2023

Background & motivation

Every time we update kurtosis to latest version the images of older version of engine and core remains. So there are multiple images of core and engine.
Is it possible to automatically remove older version after upgrading to latest version so that it doesn't occupy our disk space ?

Desired behaviour

To remove old images of core and engine after upgrading to latest version.

How important is this to you?

Nice to have; this feature would make using Kurtosis more enjoyable.

@github-actions github-actions bot added the nice to have Nice to have feature label Aug 18, 2023
@leeederek
Copy link
Contributor

Thank you @hemz10! I wanted to ask: what kind of friction or pain points does this current behavior have on your workflow other than it occupying unnecessary disk space?

This feature request makes a lot of sense to me,, but wanted to make sure I wasn't missing any context.

@hemz10
Copy link
Author

hemz10 commented Aug 21, 2023

Apart from that I don't see anything else that affects my workflow. I thought we could eliminate the manual work of removing old images :)

@mieubrisse
Copy link
Member

Hey @hemz10 , nice idea! What do you think if kurtosis clean removed all versions of the engine that are older than the current version of the CLI being used?

@hemz10
Copy link
Author

hemz10 commented Aug 22, 2023

Hey @mieubrisse looks like a good idea as kurtosis clean command is something we will be using very often. But will it work with dive clean command as well ?

@mieubrisse
Copy link
Member

if dive clean runs the Kurtosis clean under the hood, then yes!

@mieubrisse
Copy link
Member

Implementation notes for the Kurtosian who takes this:

  • I think we should implement this in the Clean endpoint on the Engine
  • I'd suggest that calling the Clean endpoint should remove all versioned (X.Y.Z) images of the APIC and Engine that are older than the running Engine version
  • It should NOT remove newer versions, nor should it remove unversioned (i.e. dev) versions
  • The Clean endpoint is called very often (e.g. kurtosis clean), so the image-killing should be very fast (if it's slow, that's no good - we don't want to slow down kurtosis clean in any meaningful way)

victorcolombo added a commit that referenced this issue Sep 18, 2023
## Description:
<!-- Describe this change, how it works, and the motivation behind it.
-->
`kurtosis clean -a` now removes all kurtosis images that are both:
1. Unused by any container
2. Not a dev version

## Is this change user facing?
YES
<!-- If yes, please add the "user facing" label to the PR -->
<!-- If yes, don't forget to include docs changes where relevant -->

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
Closes #1131
h4ck3rk3y pushed a commit that referenced this issue Sep 18, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.83.0](0.82.24...0.83.0)
(2023-09-18)


### ⚠ BREAKING CHANGES

* rename assert to verify
([#1295](#1295))
* print a downloaded container images summary after pulling images from
remote or locally
([#1315](#1315))

### Features

* Clean CLI command now removes unsued Kurtosis images
([#1314](#1314))
([a924f4a](a924f4a)),
closes [#1131](#1131)
* print a downloaded container images summary after pulling images from
remote or locally
([#1315](#1315))
([b822870](b822870)),
closes [#1292](#1292)


### Code Refactoring

* rename assert to verify
([#1295](#1295))
([651df40](651df40))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants