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

Properly prune previous containers when rebasing #4138

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

cgwalters
Copy link
Member

@cgwalters cgwalters commented Nov 10, 2022

Depends:


daemon: Query container image commit

If a container image reference is pruned, we must not error
out when computing the status. The deployment roots will hold
a strong reference to the deployed commit, so query via the commit
digest to find metadata about the pulled container image.


When rebasing, prune previous container by default

When using rpm-ostree rebase on ostree branch names, by
default we prune the previous branch/ref to avoid leaking
space (i.e. requiring the user/admin to manually prune it).
We do have the --skip-purge option to suppress this behavior.

When we added the container bits, we ignored this at the time.
But we really need to do this by default, for the same reasons
around avoiding space leakage.


Closes: #4136

@openshift-ci
Copy link

openshift-ci bot commented Nov 10, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cgwalters
Copy link
Member Author

Rebased this one on #4140

If a container image reference is pruned, we must not error
out when computing the status.  The deployment roots will hold
a strong reference to the deployed commit, so query via the commit
digest to find metadata about the pulled container image.
@cgwalters cgwalters force-pushed the container-purge-rebase branch from a54b4e9 to 17bc89c Compare November 13, 2022 15:05
When using `rpm-ostree rebase` on ostree branch names, by
default we prune the previous branch/ref to avoid leaking
space (i.e. requiring the user/admin to manually prune it).
We do have the `--skip-purge` option to suppress this behavior.

When we added the container bits, we ignored this at the time.
But we really need to do this by default, for the same reasons
around avoiding space leakage.
@cgwalters cgwalters force-pushed the container-purge-rebase branch from 17bc89c to 904e111 Compare November 13, 2022 16:19
@cgwalters cgwalters marked this pull request as ready for review November 13, 2022 16:34
@cgwalters
Copy link
Member Author

OK, this one is rebased 🏄 and should be good to go!

@lucab lucab enabled auto-merge November 15, 2022 10:46
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.

rebasing does not prune previous container image
2 participants