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

fix: only delete selected pods #3378

Merged
merged 2 commits into from Aug 10, 2023
Merged

fix: only delete selected pods #3378

merged 2 commits into from Aug 10, 2023

Conversation

deboer-tim
Copy link
Collaborator

What does this PR do?

PR #2979 caused an unfortunate regression - it is missing the filter to only delete selected pods.

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

Fixes #3374.

How to test this PR?

Create at least one pod and a container. Select just the container in the Containers list and delete it from the toolbar Delete action, making sure the pod doesn't get deleted as well.

@deboer-tim deboer-tim requested review from a team and benoitf as code owners July 31, 2023 19:07
@deboer-tim deboer-tim requested review from cdrage and lstocchi and removed request for a team July 31, 2023 19:07
Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is missing a unit test

@benoitf
Copy link
Collaborator

benoitf commented Aug 4, 2023

I think once we have the component test we're good to merge

@benoitf
Copy link
Collaborator

benoitf commented Aug 10, 2023

@deboer-tim will you be able to add the tests ?

@deboer-tim
Copy link
Collaborator Author

I have a couple tests, but was having trouble cleaning up when running with existing test, will give it another shot.

PR #2979 caused an unfortunate regression - it is missing the filter to only delete
*selected* pods.

Fixes #3374.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@deboer-tim
Copy link
Collaborator Author

Found my local problem: the selection was being cached in the containerGroups store between tests. Updated branch to latest main and added tests.

Adds two tests:
- deleting a standalone container without deleting pods
- deleting a pod without deleting a standalone container

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@deboer-tim deboer-tim merged commit 35f3af6 into main Aug 10, 2023
8 checks passed
@deboer-tim deboer-tim deleted the del-pods branch August 10, 2023 16:04
@podman-desktop-bot podman-desktop-bot added this to the 1.3.0 milestone Aug 10, 2023
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.

When deleting a containers all pods are getting deleted too
3 participants