From c501da01ebf6e82b661cb1ec05e9e925db2a40ee Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" <4903+rboyer@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:01:17 -0500 Subject: [PATCH] api: ensure empty locality field is not transmitted to Consul (#17137) --- api/catalog.go | 4 ++-- api/peering.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/catalog.go b/api/catalog.go index 8f9c6567ac..0040ca6e7a 100644 --- a/api/catalog.go +++ b/api/catalog.go @@ -78,8 +78,8 @@ type CatalogRegistration struct { Check *AgentCheck Checks HealthChecks SkipNodeUpdate bool - Partition string `json:",omitempty"` - Locality *Locality + Partition string `json:",omitempty"` + Locality *Locality `json:",omitempty"` } type CatalogDeregistration struct { diff --git a/api/peering.go b/api/peering.go index 352d224fe6..dd7780f630 100644 --- a/api/peering.go +++ b/api/peering.go @@ -47,7 +47,7 @@ type PeeringRemoteInfo struct { Partition string // Datacenter is the remote peer's datacenter. Datacenter string - Locality *Locality + Locality *Locality `json:",omitempty"` } // Locality identifies where a given entity is running.