From e36b21802191d5893d6ab496e257d42216c1ca6b Mon Sep 17 00:00:00 2001 From: Alex Tymchuk Date: Wed, 27 Sep 2023 14:39:46 +0000 Subject: [PATCH] PMM-12375 make version nullable --- managed/models/service_model.go | 2 +- managed/services/agents/service_info_broker.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/managed/models/service_model.go b/managed/models/service_model.go index 9021ae117c..0378272296 100644 --- a/managed/models/service_model.go +++ b/managed/models/service_model.go @@ -58,7 +58,7 @@ type Service struct { ReplicationSet string `reform:"replication_set"` CustomLabels []byte `reform:"custom_labels"` ExternalGroup string `reform:"external_group"` - Version string `reform:"version"` + Version *string `reform:"version"` CreatedAt time.Time `reform:"created_at"` UpdatedAt time.Time `reform:"updated_at"` diff --git a/managed/services/agents/service_info_broker.go b/managed/services/agents/service_info_broker.go index 88c497b038..bf2df5e19d 100644 --- a/managed/services/agents/service_info_broker.go +++ b/managed/services/agents/service_info_broker.go @@ -212,7 +212,7 @@ func updateServiceVersion(ctx context.Context, q *reform.Querier, resp agentpb.A } l.Debugf("Updating service version: %s.", version) - service.Version = version + service.Version = &version if err := q.Update(service); err != nil { return errors.Wrap(err, "failed to update service version") }