[testsharder] Deprecate labels
We have now migrated over to using tags.
Change-Id: I43eded4239a426f4194b907e6a525be6f874655c
diff --git a/testsharder/environment.go b/testsharder/environment.go
index 99e925a..37e44a3 100644
--- a/testsharder/environment.go
+++ b/testsharder/environment.go
@@ -24,11 +24,6 @@
// Dimensions gives the Swarming dimensions a test wishes to target.
Dimensions DimensionSet `json:"dimensions"`
- // Label is a label given to an environment on which the testsharder may filter.
- //
- // TODO(joshuaseaton): deprecate in favor of tags.
- Label string `json:"label,omitempty"`
-
// Tags are keys given to an environment on which the testsharder may filter.
Tags []string `json:"tags,omitempty"`
diff --git a/testsharder/shard.go b/testsharder/shard.go
index 1105b4b..a0a598e 100644
--- a/testsharder/shard.go
+++ b/testsharder/shard.go
@@ -34,11 +34,7 @@
envs := []Environment{}
for _, spec := range specs {
for _, env := range spec.Envs {
- envTags := env.Tags
- if env.Label != "" {
- envTags = append(envTags, env.Label)
- }
- if !stringSlicesEq(tags, envTags) {
+ if !stringSlicesEq(tags, env.Tags) {
continue
}
if mode == Restricted && env.ServiceAccount != "" {