From f74aedada056299fec2306e10e94028b2d5f6e7b 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 8f9c6567a..0040ca6e7 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 352d224fe..dd7780f63 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.