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

🐛 filter policies without removing them from the bundle #947

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Nov 14, 2023

Removing policies from the bundle on filter calls actually caused havoc because it removed potentially dependent policies from the bundle. For example: if you bundle has policy A + B, and B depends on A, and you set --policy to B, then A gets removed from the bundle and leads to errors.

We only need to remove the policy from the list of executed policies in the resolver, not from the bundle itself.

Removing policies from the bundle on filter calls actually caused havoc
because it removed potentially dependent policies from the bundle. For
example: if you bundle has policy A + B, and B depends on A, and you set
`--policy` to `B`, then A gets removed from the bundle and leads to
errors.

We only need to remove the policy from the list of executed policies in
the resolver, not from the bundle itself.

Signed-off-by: Dominik Richter <[email protected]>
@arlimus arlimus requested a review from imilchev November 14, 2023 08:54
Copy link
Member

@imilchev imilchev left a comment

Choose a reason for hiding this comment

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

Tested this! Works great! Thanks a lot 🎉

@imilchev imilchev merged commit cc48af6 into main Nov 14, 2023
@imilchev imilchev deleted the dom/policyfilter branch November 14, 2023 10:35
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants