From 80fb2eb421921f5d82a08681b71dab6b17663849 Mon Sep 17 00:00:00 2001 From: Kristine Kunapuli Date: Thu, 24 Oct 2024 13:23:55 -0400 Subject: [PATCH] chore: improve messaging when workspace configs conflict with global constraints --- master/internal/configpolicy/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/master/internal/configpolicy/utils.go b/master/internal/configpolicy/utils.go index 0afbe9c04d6..0b503e84e31 100644 --- a/master/internal/configpolicy/utils.go +++ b/master/internal/configpolicy/utils.go @@ -151,7 +151,8 @@ func ValidateExperimentConfig( // Verify the workspace invariant config doesn't conflict with global constraints. if err := checkConstraintConflicts(globalConstraints, cp.InvariantConfig.RawResources.RawMaxSlots, cp.InvariantConfig.RawResources.RawSlotsPerTrial, cp.InvariantConfig.RawResources.RawPriority); err != nil { - return status.Errorf(codes.InvalidArgument, fmt.Sprintf(InvalidExperimentConfigPolicyErr+": %s.", err)) + return status.Errorf(codes.InvalidArgument, fmt.Sprintf(InvalidExperimentConfigPolicyErr+ + ": workspace invariant_config conflicts with global constraints: %s.", err)) } } }