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 path scoped annotation on service resources #984

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

jcmoraisjr
Copy link
Owner

Backend scoped annotations apply just once per service resource, and have the most precedence. With this behavior in mind, service annotations were being applied along with the annotation mapper creation. This works nice with backend scoped annotations.

Path scoped, however, has the ability to apply distinct values to the same backend. When path scoped annotations are applied via a service resource, only the first path is being applied, along with annotation mapper creation. This update ensures that the service annotations are applied on every pathlink that points to it. This change will spread service annotations over all referenced pathlinks, however this doesn't end up with duplicated configurations because the config builder already deduplicates configurations on the same key, with the same value, to the same backend. Warning on annotation conflict isn't a problem as well, a conflict is only warned on distinct values.

Backend scoped annotations apply just once per service resource, and
have the most precedence. With this behavior in mind, service
annotations were being applied along with the annotation mapper
creation. This works nice with backend scoped annotations.

Path scoped, however, has the ability to apply distinct values to the
same backend. When path scoped annotations are applied via a service
resource, only the first path is being applied, along with annotation
mapper creation. This update ensures that the service annotations are
applied on every pathlink that points to it. This change will spread
service annotations over all referenced pathlinks, however this doesn't
end up with duplicated configurations because the config builder already
deduplicates configurations on the same key, with the same value, to the
same backend. Warning on annotation conflict isn't a problem as well, a
conflict is only warned on distinct values.
@jcmoraisjr
Copy link
Owner Author

#979

@jcmoraisjr jcmoraisjr merged commit 731a96f into master Feb 9, 2023
@jcmoraisjr jcmoraisjr deleted the jm-svc-path-scoped-keys branch February 9, 2023 01:52
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.

1 participant