From a090256297691bd8bf467ab48cf74c2bc368ef61 Mon Sep 17 00:00:00 2001 From: Roey Berman Date: Fri, 14 Apr 2023 11:31:43 -0700 Subject: [PATCH] Remove version_set_id from CompatibleVersionSet (#1089) --- internal/worker_version_sets.go | 6 ++---- internal/worker_version_sets_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/internal/worker_version_sets.go b/internal/worker_version_sets.go index d30be15b0..47d2d0c28 100644 --- a/internal/worker_version_sets.go +++ b/internal/worker_version_sets.go @@ -99,8 +99,7 @@ func (s *WorkerBuildIDVersionSets) Default() string { // CompatibleVersionSet represents a set of worker build ids which are compatible with each other. type CompatibleVersionSet struct { - versionSetId string - BuildIDs []string + BuildIDs []string } func workerVersionSetsFromProtoResponse(response *workflowservice.GetWorkerBuildIdCompatibilityResponse) *WorkerBuildIDVersionSets { @@ -119,8 +118,7 @@ func workerVersionSetsFromProto(sets []*taskqueuepb.CompatibleVersionSet) []*Com result := make([]*CompatibleVersionSet, len(sets)) for i, s := range sets { result[i] = &CompatibleVersionSet{ - versionSetId: s.GetVersionSetId(), - BuildIDs: s.GetBuildIds(), + BuildIDs: s.GetBuildIds(), } } return result diff --git a/internal/worker_version_sets_test.go b/internal/worker_version_sets_test.go index 8764d6c6f..a8a0f10fa 100644 --- a/internal/worker_version_sets_test.go +++ b/internal/worker_version_sets_test.go @@ -45,14 +45,14 @@ func Test_WorkerVersionSets_fromProtoResponse(t *testing.T) { name: "normal sets", response: &workflowservice.GetWorkerBuildIdCompatibilityResponse{ MajorVersionSets: []*taskqueuepb.CompatibleVersionSet{ - {BuildIds: []string{"1.0", "1.1"}, VersionSetId: "1"}, - {BuildIds: []string{"2.0"}, VersionSetId: "2"}, + {BuildIds: []string{"1.0", "1.1"}}, + {BuildIds: []string{"2.0"}}, }, }, want: &WorkerBuildIDVersionSets{ Sets: []*CompatibleVersionSet{ - {BuildIDs: []string{"1.0", "1.1"}, versionSetId: "1"}, - {BuildIDs: []string{"2.0"}, versionSetId: "2"}, + {BuildIDs: []string{"1.0", "1.1"}}, + {BuildIDs: []string{"2.0"}}, }, }, },