Skip to content

api: ensure empty locality field is not transmitted to Consul#17137

Merged
rboyer merged 3 commits intomainfrom
fix-api-compat-locality
Apr 26, 2023
Merged

api: ensure empty locality field is not transmitted to Consul#17137
rboyer merged 3 commits intomainfrom
fix-api-compat-locality

Conversation

@rboyer
Copy link
Member

@rboyer rboyer commented Apr 25, 2023

Description

When the current api client is used for two endpoints (catalog register, peering) it sends a stray {... "Locality": "", ...} to a Consul server because the field is not marked omitempty.

If this lands on an older Consul server or client it will reject the request completely because of the unknown field.

Regressed in : #16581

@rboyer rboyer self-assigned this Apr 25, 2023
@github-actions github-actions bot added the theme/api Relating to the HTTP API interface label Apr 25, 2023
@rboyer rboyer added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test pr/no-backport labels Apr 25, 2023
@rboyer rboyer merged commit c501da0 into main Apr 26, 2023
@rboyer rboyer deleted the fix-api-compat-locality branch April 26, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-backport pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test theme/api Relating to the HTTP API interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants