Skip to content

Commit

Permalink
Remove version_set_id from CompatibleVersionSet (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergundy authored Apr 14, 2023
1 parent eaa3802 commit a090256
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions internal/worker_version_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions internal/worker_version_sets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}},
},
},
},
Expand Down

0 comments on commit a090256

Please sign in to comment.