Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version_set_id from CompatibleVersionSet #1089

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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