-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 issue with persisting proxy-defaults #20481
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This resolves an issue introduced in #19829 where the proxy-defaults configuration entry with an HTTP protocol cannot be updated after it has been persisted once and a router exists. This occurs because the protocol field is not properly pre-computed before being passed into validation functions.
hashi-derek
added
backport/1.15
This release series is no longer active on CE. Use backport/ent/1.15.
backport/1.16
This release series is no longer active on CE. Use backport/ent/1.16.
backport/1.17
This release series is no longer active on CE. Use backport/ent/1.17.
backport/1.18
labels
Feb 5, 2024
DanStough
approved these changes
Feb 5, 2024
curtbushko
approved these changes
Feb 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Backport failed @hashi-derek. Run: https://github.com/hashicorp/consul/actions/runs/7791374634 |
hashi-derek
added
backport/1.15
This release series is no longer active on CE. Use backport/ent/1.15.
and removed
backport/1.15
This release series is no longer active on CE. Use backport/ent/1.15.
labels
Feb 5, 2024
This was referenced Feb 5, 2024
This was referenced Sep 27, 2024
Open
Open
Open
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.15
This release series is no longer active on CE. Use backport/ent/1.15.
backport/1.16
This release series is no longer active on CE. Use backport/ent/1.16.
backport/1.17
This release series is no longer active on CE. Use backport/ent/1.17.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This resolves an issue introduced in #19829 where the proxy-defaults configuration entry with an HTTP protocol cannot be updated after it has been persisted once and a router exists. This occurs because the protocol field is not properly pre-computed before being passed into validation functions and will result in a protocol mis-match error message (the new proxy-defaults will have an assumed protocol of
tcp
which will conflict with the router's need forhttp
).This PR hoists the protocol computing logic into the Normalize function of the config entry, which will ensure that it is properly populated prior to the validation function executing.