Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Add validation for cluster label (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
anandswaminathan authored Feb 28, 2020
1 parent 15d1fa0 commit cc9917e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/manager/impl/validation/attributes_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ func validateMatchingAttributes(attributes *admin.MatchingAttributes, identifier
return admin.MatchableResource_CLUSTER_RESOURCE, nil
} else if attributes.GetExecutionQueueAttributes() != nil {
return admin.MatchableResource_EXECUTION_QUEUE, nil
} else if attributes.GetExecutionClusterLabel() != nil {
return admin.MatchableResource_EXECUTION_CLUSTER_LABEL, nil
}
return defaultMatchableResource, errors.NewFlyteAdminErrorf(codes.InvalidArgument,
"Unrecognized matching attributes type for request %s", identifier)
Expand Down

0 comments on commit cc9917e

Please sign in to comment.