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

Use logical AND on chained label! filters #20280

Closed
wants to merge 1 commit into from

Conversation

jakecorrenti
Copy link
Member

Fixes the filter matching for chained negated labels (label!) on containers and volumes. When pruning with chained label! filters, the filters will be ANDed instead of ORed.

Fixes #17413

Does this PR introduce a user-facing change?

action required: Uses logical AND on chained label! filters instead of logical OR for containers, networks, and volumes.

Fixes the filter matching for chained negated labels (label!) on
containers and volumes. When pruning with chained label! filters, the
filters will be ANDed instead of ORed.

Fixes containers#17413

Signed-off-by: Jake Correnti <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jakecorrenti
Once this PR has been reviewed and has the lgtm label, please assign edsantiago for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mheon
Copy link
Member

mheon commented Oct 5, 2023

Probably need to update manpages to reflect this, it's not fully intuitive it would be different

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Is this how docker behaves? Seems like the linked bug links to a open docker bug so I assume our current version is compatible with docker with I think is more describable.

I am not sure this has an easy answer but a change like this can easily break users and as far as I can tell there is exactly one user asking for this so I would vote for keeping the current behaviour and not break.

@jakecorrenti
Copy link
Member Author

@rhatdan what are your thoughts on this?

@rhatdan
Copy link
Member

rhatdan commented Oct 7, 2023

I think we should match what Docker does.

I would figure users want to see CONTENT which did not container Labels (ABC and XYZ)

@jakecorrenti
Copy link
Member Author

Is the best course of action here to close in favor of maintaining docker compatibility?

@rhatdan
Copy link
Member

rhatdan commented Oct 10, 2023

What is the difference? What are you trying to achieve?

@jakecorrenti
Copy link
Member Author

What is the difference? What are you trying to achieve?

I just wanted to confirm that is what the consensus was. Looking back at your previous comment I suppose I don't really follow when you say the user wants to see content which doesn't contain the labels

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jan 16, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-action-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Multiple "label!" filters for prune are ORed unlike all other filter combos which are ANDed.
4 participants