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

[backport] gateway2: allow child policies to always set fields unset on the parent #10550

Merged

Conversation

shashankram
Copy link

Backports c5bc099 from main

When merging parent-child policies, the merging should allow child policies to augment parent policies such that fields unset on the parent can be set by the child. There is a bug when using policy override capability with route delegation that disallows this when the annotation specifies non-wildcard fields, such that even if a field is unset by the parent only the fields specified in the override annotation are merged in - which is incorrect because the annotation only applies to fields that are being overriden (set by the parent). This change fixes the bug.

Testing done:
Adds tests that otherwise fail without the code change to the plugin.

  • Unit test
  • Translator test

When merging parent-child policies, the merging should allow child
policies to augment parent policies such that fields unset on the
parent can be set by the child. There is a bug when using policy
override capability with route delegation that disallows this when
the annotation specifies non-wildcard fields, such that even if
a field is unset by the parent only the fields specified in the
override annotation are merged in - which is incorrect because
the annotation only applies to fields that are being overriden
(set by the parent). This change fixes the bug.

Testing done:
Adds tests that otherwise fail without the code change to the plugin.
- Unit test
- Translator test
@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/solo-projects/issues/7601

@soloio-bulldozer soloio-bulldozer bot merged commit f0be1ac into v1.18.x Jan 7, 2025
19 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the shashankram/policy-prefixrewrite__bk-1.18 branch January 7, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants