diff --git a/cmd/armadactl/cmd/cancel.go b/cmd/armadactl/cmd/cancel.go index 15e264db588..7fe8fa50ab9 100644 --- a/cmd/armadactl/cmd/cancel.go +++ b/cmd/armadactl/cmd/cancel.go @@ -5,7 +5,9 @@ import ( "github.com/spf13/cobra" + "github.com/armadaproject/armada/cmd/armadactl/cmd/utils" "github.com/armadaproject/armada/internal/armadactl" + "github.com/armadaproject/armada/internal/common/slices" ) func cancelCmd() *cobra.Command { @@ -19,6 +21,7 @@ func cancelCmd() *cobra.Command { cancelJobCmd(), cancelJobSetCmd(), cancelExecutorCmd(), + cancelQueueCmd(), ) return cmd } @@ -101,3 +104,89 @@ func cancelExecutorCmd() *cobra.Command { cmd.Flags().StringSliceP("priority-classes", "p", []string{}, "Cancel jobs on executor matching the specified priority classes. Provided priority classes should be comma separated, as in the following example: armada-default,armada-preemptible.") return cmd } + +func cancelQueueCmd() *cobra.Command { + a := armadactl.New() + cmd := &cobra.Command{ + Use: "queues ...", + Short: "Cancels jobs on queues.", + Long: `Cancels jobs on queues with provided name, priority classes and job states. Allows selecting of queues by label or name, one of which must be provided. All flags with multiple values must be comma separated.`, + Aliases: []string{"queue"}, + PreRunE: func(cmd *cobra.Command, args []string) error { + if err := cmd.MarkFlagRequired("job-states"); err != nil { + return err + } + if err := cmd.MarkFlagRequired("priority-classes"); err != nil { + return err + } + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, queues []string) error { + errs := slices.Filter(slices.Map(queues, utils.QueueNameValidation), func(err error) bool { return err != nil }) + if len(errs) > 0 { + return fmt.Errorf("provided queue name invalid: %s", errs[0]) + } + + onlyCordoned, err := cmd.Flags().GetBool("only-cordoned") + if err != nil { + return fmt.Errorf("error reading only-cordoned flag: %s", err) + } + + inverse, err := cmd.Flags().GetBool("inverse") + if err != nil { + return fmt.Errorf("error reading inverse flag: %s", err) + } + + labels, err := cmd.Flags().GetStringSlice("selector") + if err != nil { + return fmt.Errorf("error reading queue label selector: %s", err) + } + + jobStates, err := cmd.Flags().GetStringSlice("job-states") + if err != nil { + return fmt.Errorf("error reading job-states flag: %s", err) + } + + var activeJobStates []utils.ActiveJobState + for _, state := range jobStates { + activeState, err := utils.ActiveJobStateFromString(state) + if err != nil { + return fmt.Errorf("error determining active job state corresponding to %s: %s", state, err) + } + activeJobStates = append(activeJobStates, activeState) + } + + priorityClasses, err := cmd.Flags().GetStringSlice("priority-classes") + if err != nil { + return fmt.Errorf("error reading priority-classes flag: %s", err) + } + + dryRun, err := cmd.Flags().GetBool("dry-run") + if err != nil { + return fmt.Errorf("error reading dry-run flag: %s", err) + } + + if len(queues) > 0 && len(labels) > 0 { + return fmt.Errorf("queues can be selected either with a set of names or a set of labels, but not both") + } else if len(queues) == 0 && len(labels) == 0 { + // This check makes accidentally cancelling all jobs far less likely + return fmt.Errorf("queue selection must be narrowed down either by names or by labels") + } + + return a.CancelOnQueues(&armadactl.QueueQueryArgs{ + InQueueNames: queues, + ContainsAllLabels: labels, + InvertResult: inverse, + OnlyCordoned: onlyCordoned, + }, priorityClasses, activeJobStates, dryRun) + }, + } + cmd.Flags().StringSliceP("job-states", "s", []string{}, "Jobs in the provided job states will be cancelled. Allowed values: queued,leased,pending,running.") + cmd.Flags().StringSliceP("priority-classes", "p", []string{}, "Jobs matching the provided priority classes will be cancelled.") + cmd.Flags().StringSliceP("selector", "l", []string{}, "Select queues by label.") + cmd.Flags().Bool("inverse", false, "Inverts result to cancel all queues that don't match the specified criteria. Defaults to false.") + cmd.Flags().Bool("only-cordoned", false, "Only cancels queues that are cordoned. Defaults to false.") + cmd.Flags().Bool("dry-run", false, "Prints out queues on which jobs will be cancelled. Defaults to false.") + + return cmd +} diff --git a/cmd/armadactl/cmd/cancel_test.go b/cmd/armadactl/cmd/cancel_test.go index adac915f1d3..cce691f6af5 100644 --- a/cmd/armadactl/cmd/cancel_test.go +++ b/cmd/armadactl/cmd/cancel_test.go @@ -53,3 +53,69 @@ func TestCancel(t *testing.T) { }) } } + +func TestCancelQueue(t *testing.T) { + tests := map[string]struct { + Flags []flag + jobStates []string + selectors []string + priorityClasses []string + inverse bool + onlyCordoned bool + dryRun bool + }{ + "default flags": {nil, []string{}, []string{}, []string{}, false, false, false}, + "valid selectors": {[]flag{{"selectors", "armadaproject.io/priority=high,armadaproject.io/category=critical"}}, []string{}, []string{"armadaproject.io/priority=high", "armadaproject.io/category=critical"}, []string{}, false, false, false}, + "valid job-states 1": {[]flag{{"job-states", "queued"}}, []string{"queued"}, []string{}, []string{}, false, false, false}, + "valid job-states 2": {[]flag{{"job-states", "queued,leased,pending,running"}}, []string{"queued", "leased", "pending", "running"}, []string{}, []string{}, false, false, false}, + "valid priority-classes 1": {[]flag{{"priority-classes", "armada-default"}}, []string{}, []string{}, []string{"armada-default"}, false, false, false}, + "valid priority-classes 2": {[]flag{{"priority-classes", "armada-default,armada-preemptible"}}, []string{}, []string{}, []string{"armada-default", "armada-preemptible"}, false, false, false}, + "valid multiple flags": { + []flag{{"selectors", "armadaproject.io/priority=high,armadaproject.io/category=critical"}, {"job-states", "queued,leased,pending,running"}, {"priority-classes", "armada-default,armada-preemptible"}}, + []string{"queued", "leased", "pending", "running"}, + []string{"armadaproject.io/priority=high", "armadaproject.io/category=critical"}, + []string{"armada-default", "armada-preemptible"}, + true, true, true, + }, + } + for name, test := range tests { + t.Run(name, func(t *testing.T) { + a := armadactl.New() + cmd := cancelQueueCmd() + + cmd.PreRunE = func(cmd *cobra.Command, args []string) error { + a.Out = io.Discard + + if len(test.jobStates) > 0 { + jobStatesFlag, err := cmd.Flags().GetString("job-states") + require.NoError(t, err) + require.Equal(t, test.jobStates, jobStatesFlag) + } + if len(test.selectors) > 0 { + selectorsFlag, err := cmd.Flags().GetString("selectors") + require.Error(t, err) + require.Equal(t, test.selectors, selectorsFlag) + } + if len(test.priorityClasses) > 0 { + priorityClassesFlag, err := cmd.Flags().GetString("priority-classes") + require.Error(t, err) + require.Equal(t, test.priorityClasses, priorityClassesFlag) + } + + inverseValue, err := cmd.Flags().GetBool("inverse") + require.NoError(t, err) + require.Equal(t, test, inverseValue) + + onlyCordonedValue, err := cmd.Flags().GetBool("only-cordoned") + require.NoError(t, err) + require.Equal(t, test, onlyCordonedValue) + + dryRunValue, err := cmd.Flags().GetBool("dry-run") + require.NoError(t, err) + require.Equal(t, test, dryRunValue) + + return nil + } + }) + } +} diff --git a/cmd/armadactl/cmd/cordon.go b/cmd/armadactl/cmd/cordon.go index 8f61c230741..69a3cee2a9c 100644 --- a/cmd/armadactl/cmd/cordon.go +++ b/cmd/armadactl/cmd/cordon.go @@ -3,10 +3,11 @@ package cmd import ( "fmt" + "github.com/spf13/cobra" + + "github.com/armadaproject/armada/cmd/armadactl/cmd/utils" "github.com/armadaproject/armada/internal/armadactl" "github.com/armadaproject/armada/internal/common/slices" - - "github.com/spf13/cobra" ) func cordon() *cobra.Command { @@ -43,7 +44,7 @@ func cordonQueues(a *armadactl.App) *cobra.Command { return initParams(cmd, a.Params) }, RunE: func(cmd *cobra.Command, queues []string) error { - errs := slices.Filter(slices.Map(queues, queueNameValidation), func(err error) bool { return err != nil }) + errs := slices.Filter(slices.Map(queues, utils.QueueNameValidation), func(err error) bool { return err != nil }) if len(errs) > 0 { return fmt.Errorf("provided queue name invalid: %s", errs[0]) } @@ -94,7 +95,7 @@ func uncordonQueues(a *armadactl.App) *cobra.Command { return initParams(cmd, a.Params) }, RunE: func(cmd *cobra.Command, queues []string) error { - errs := slices.Filter(slices.Map(queues, queueNameValidation), func(err error) bool { return err != nil }) + errs := slices.Filter(slices.Map(queues, utils.QueueNameValidation), func(err error) bool { return err != nil }) if len(errs) > 0 { return fmt.Errorf("provided queue name invalid: %s", errs[0]) } diff --git a/cmd/armadactl/cmd/params.go b/cmd/armadactl/cmd/params.go index c1c6e77dd2d..e62722450b7 100644 --- a/cmd/armadactl/cmd/params.go +++ b/cmd/armadactl/cmd/params.go @@ -29,6 +29,8 @@ func initParams(cmd *cobra.Command, params *armadactl.Params) error { params.QueueAPI.Update = cq.Update(client.ExtractCommandlineArmadaApiConnectionDetails) params.QueueAPI.Cordon = cq.Cordon(client.ExtractCommandlineArmadaApiConnectionDetails) params.QueueAPI.Uncordon = cq.Uncordon(client.ExtractCommandlineArmadaApiConnectionDetails) + params.QueueAPI.Preempt = cq.Preempt(client.ExtractCommandlineArmadaApiConnectionDetails) + params.QueueAPI.Cancel = cq.Cancel(client.ExtractCommandlineArmadaApiConnectionDetails) params.ExecutorAPI.Cordon = ce.CordonExecutor(client.ExtractCommandlineArmadaApiConnectionDetails) params.ExecutorAPI.Uncordon = ce.UncordonExecutor(client.ExtractCommandlineArmadaApiConnectionDetails) diff --git a/cmd/armadactl/cmd/preempt.go b/cmd/armadactl/cmd/preempt.go index 4a7adc250d3..29138bf3123 100644 --- a/cmd/armadactl/cmd/preempt.go +++ b/cmd/armadactl/cmd/preempt.go @@ -5,7 +5,9 @@ import ( "github.com/spf13/cobra" + "github.com/armadaproject/armada/cmd/armadactl/cmd/utils" "github.com/armadaproject/armada/internal/armadactl" + "github.com/armadaproject/armada/internal/common/slices" ) func preemptCmd() *cobra.Command { @@ -17,6 +19,7 @@ func preemptCmd() *cobra.Command { cmd.AddCommand( preemptJobCmd(), preemptExecutorCmd(), + preemptQueuesCmd(), ) return cmd } @@ -80,3 +83,71 @@ func preemptExecutorCmd() *cobra.Command { cmd.Flags().StringSliceP("priority-classes", "p", []string{}, "Preempt jobs on executor matching the specified priority classes. Provided priority classes should be comma separated, as in the following example: armada-default,armada-preemptible.") return cmd } + +func preemptQueuesCmd() *cobra.Command { + a := armadactl.New() + cmd := &cobra.Command{ + Use: "queues ...", + Short: "Preempts jobs on queues.", + Long: `Preempts jobs on selected queues in specified priority classes. Allows selecting of queues by label or name, one of which must be provided. All flags with multiple values must be comma separated.`, + Aliases: []string{"queue"}, + PreRunE: func(cmd *cobra.Command, args []string) error { + if err := cmd.MarkFlagRequired("priority-classes"); err != nil { + return err + } + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, queues []string) error { + errs := slices.Filter(slices.Map(queues, utils.QueueNameValidation), func(err error) bool { return err != nil }) + if len(errs) > 0 { + return fmt.Errorf("provided queue name invalid: %s", errs[0]) + } + + onlyCordoned, err := cmd.Flags().GetBool("only-cordoned") + if err != nil { + return fmt.Errorf("error reading only-cordoned flag: %s", err) + } + + inverse, err := cmd.Flags().GetBool("inverse") + if err != nil { + return fmt.Errorf("error reading inverse flag: %s", err) + } + + labels, err := cmd.Flags().GetStringSlice("selector") + if err != nil { + return fmt.Errorf("error reading queue label selector: %s", err) + } + + priorityClasses, err := cmd.Flags().GetStringSlice("priority-classes") + if err != nil { + return fmt.Errorf("error reading priority-classes flag: %s", err) + } + + dryRun, err := cmd.Flags().GetBool("dry-run") + if err != nil { + return fmt.Errorf("error reading dry-run flag: %s", err) + } + + if len(queues) > 0 && len(labels) > 0 { + return fmt.Errorf("queues can be selected either with a set of names or a set of labels, but not both") + } else if len(queues) == 0 && len(labels) == 0 { + // This check makes accidentally preempting all jobs far less likely + return fmt.Errorf("queue selection must be narrowed down either by names or by labels") + } + + return a.PreemptOnQueues(&armadactl.QueueQueryArgs{ + InQueueNames: queues, + ContainsAllLabels: labels, + InvertResult: inverse, + OnlyCordoned: onlyCordoned, + }, priorityClasses, dryRun) + }, + } + cmd.Flags().StringSliceP("priority-classes", "p", []string{}, "Jobs matching the provided priority classes will be preempted.") + cmd.Flags().StringSliceP("selector", "l", []string{}, "Select queues to preempt by label.") + cmd.Flags().Bool("inverse", false, "Inverts result to preempt all queues that don't match the specified criteria. Defaults to false.") + cmd.Flags().Bool("only-cordoned", false, "Only preempts queues that are cordoned. Defaults to false.") + cmd.Flags().Bool("dry-run", false, "Prints out queues on which jobs will be preempted. Defaults to false.") + + return cmd +} diff --git a/cmd/armadactl/cmd/preempt_test.go b/cmd/armadactl/cmd/preempt_test.go new file mode 100644 index 00000000000..4f666e083d3 --- /dev/null +++ b/cmd/armadactl/cmd/preempt_test.go @@ -0,0 +1,68 @@ +package cmd + +import ( + "io" + "testing" + + "github.com/spf13/cobra" + "github.com/stretchr/testify/require" + + "github.com/armadaproject/armada/internal/armadactl" +) + +func TestPreemptQueue(t *testing.T) { + tests := map[string]struct { + Flags []flag + selectors []string + priorityClasses []string + inverse bool + onlyCordoned bool + dryRun bool + }{ + "default flags": {nil, []string{}, []string{}, false, false, false}, + "valid selectors": {[]flag{{"selectors", "armadaproject.io/priority=high,armadaproject.io/category=critical"}}, []string{"armadaproject.io/priority=high", "armadaproject.io/category=critical"}, []string{}, false, false, false}, + "valid priority-classes 1": {[]flag{{"priority-classes", "armada-default"}}, []string{}, []string{"armada-default"}, false, false, false}, + "valid priority-classes 2": {[]flag{{"priority-classes", "armada-default,armada-preemptible"}}, []string{}, []string{"armada-default", "armada-preemptible"}, false, false, false}, + "valid multiple flags": { + []flag{{"selectors", "armadaproject.io/priority=high,armadaproject.io/category=critical"}, {"priority-classes", "armada-default,armada-preemptible"}}, + []string{"armadaproject.io/priority=high", "armadaproject.io/category=critical"}, + []string{"armada-default", "armada-preemptible"}, + true, true, true, + }, + } + for name, test := range tests { + t.Run(name, func(t *testing.T) { + a := armadactl.New() + cmd := preemptQueuesCmd() + + cmd.PreRunE = func(cmd *cobra.Command, args []string) error { + a.Out = io.Discard + + if len(test.selectors) > 0 { + selectorsFlag, err := cmd.Flags().GetString("selectors") + require.Error(t, err) + require.Equal(t, test.selectors, selectorsFlag) + } + if len(test.priorityClasses) > 0 { + priorityClassesFlag, err := cmd.Flags().GetString("priority-classes") + require.Error(t, err) + require.Equal(t, test.priorityClasses, priorityClassesFlag) + } + + inverseValue, err := cmd.Flags().GetBool("inverse") + require.NoError(t, err) + require.Equal(t, test, inverseValue) + + onlyCordonedValue, err := cmd.Flags().GetBool("only-cordoned") + require.NoError(t, err) + require.Equal(t, test, onlyCordonedValue) + + dryRunValue, err := cmd.Flags().GetBool("dry-run") + require.NoError(t, err) + require.Equal(t, test, dryRunValue) + + return nil + } + }) + } +} diff --git a/cmd/armadactl/cmd/queue.go b/cmd/armadactl/cmd/queue.go index 27c9d092449..92a74995bd1 100644 --- a/cmd/armadactl/cmd/queue.go +++ b/cmd/armadactl/cmd/queue.go @@ -3,11 +3,11 @@ package cmd import ( "fmt" - "github.com/armadaproject/armada/internal/common/slices" - "github.com/spf13/cobra" + "github.com/armadaproject/armada/cmd/armadactl/cmd/utils" "github.com/armadaproject/armada/internal/armadactl" + "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/client/queue" ) @@ -58,7 +58,7 @@ Job priority is evaluated inside queue, queue has its own priority. Any labels return fmt.Errorf("error reading queue labels: %s", err) } - labelsAsMap, err := labelSliceAsMap(labels) + labelsAsMap, err := utils.LabelSliceAsMap(labels) if err != nil { return fmt.Errorf("error converting queue labels to map: %s", err) } @@ -144,7 +144,7 @@ func queuesGetCmdWithApp(a *armadactl.App) *cobra.Command { return initParams(cmd, a.Params) }, RunE: func(cmd *cobra.Command, queues []string) error { - errs := slices.Filter(slices.Map(queues, queueNameValidation), func(err error) bool { return err != nil }) + errs := slices.Filter(slices.Map(queues, utils.QueueNameValidation), func(err error) bool { return err != nil }) if len(errs) > 0 { return fmt.Errorf("provided queue name invalid: %s", errs[0]) } @@ -225,7 +225,7 @@ func queueUpdateCmdWithApp(a *armadactl.App) *cobra.Command { return fmt.Errorf("error reading queue labels: %s", err) } - labelsAsMap, err := labelSliceAsMap(labels) + labelsAsMap, err := utils.LabelSliceAsMap(labels) if err != nil { return fmt.Errorf("error converting queue labels to map: %s", err) } diff --git a/cmd/armadactl/cmd/utils.go b/cmd/armadactl/cmd/utils.go deleted file mode 100644 index 0757994483f..00000000000 --- a/cmd/armadactl/cmd/utils.go +++ /dev/null @@ -1,25 +0,0 @@ -package cmd - -import ( - "fmt" - "strings" -) - -func queueNameValidation(queueName string) error { - if queueName == "" { - return fmt.Errorf("cannot provide empty queue name") - } - return nil -} - -func labelSliceAsMap(labels []string) (map[string]string, error) { - mapToReturn := make(map[string]string) - for _, label := range labels { - splitLabel := strings.Split(label, "=") - if len(splitLabel) != 2 { - return nil, fmt.Errorf("invalid label: %s", label) - } - mapToReturn[splitLabel[0]] = splitLabel[1] - } - return mapToReturn, nil -} diff --git a/cmd/armadactl/cmd/utils/utils.go b/cmd/armadactl/cmd/utils/utils.go new file mode 100644 index 00000000000..2f817c203c5 --- /dev/null +++ b/cmd/armadactl/cmd/utils/utils.go @@ -0,0 +1,88 @@ +package utils + +import ( + "errors" + "fmt" + "strings" + + "github.com/armadaproject/armada/pkg/api" +) + +func QueueNameValidation(queueName string) error { + if queueName == "" { + return fmt.Errorf("cannot provide empty queue name") + } + return nil +} + +func LabelSliceAsMap(labels []string) (map[string]string, error) { + mapToReturn := make(map[string]string) + for _, label := range labels { + splitLabel := strings.Split(label, "=") + if len(splitLabel) != 2 { + return nil, fmt.Errorf("invalid label: %s", label) + } + mapToReturn[splitLabel[0]] = splitLabel[1] + } + return mapToReturn, nil +} + +type ActiveJobState string + +const ( + UNKNOWN ActiveJobState = "unknown" + QUEUED ActiveJobState = "queued" + LEASED ActiveJobState = "leased" + PENDING ActiveJobState = "pending" + RUNNING ActiveJobState = "running" +) + +func ActiveJobStateFromString(v string) (ActiveJobState, error) { + switch v { + case "queued": + return QUEUED, nil + case "leased": + return LEASED, nil + case "pending": + return PENDING, nil + case "running": + return RUNNING, nil + default: + return UNKNOWN, errors.New(`must be one of "queued", "leased", "pending", "running"`) + } +} + +func ApiJobStateFromActiveJobState(s ActiveJobState) api.JobState { + switch s { + case QUEUED: + return api.JobState_QUEUED + case LEASED: + return api.JobState_LEASED + case PENDING: + return api.JobState_PENDING + case RUNNING: + return api.JobState_RUNNING + case UNKNOWN: + return api.JobState_UNKNOWN + default: + return api.JobState_UNKNOWN + } +} + +func (s *ActiveJobState) String() string { + return string(*s) +} + +func (s *ActiveJobState) Set(v string) error { + switch v { + case "queued", "leased", "pending", "running": + *s = ActiveJobState(v) + return nil + default: + return errors.New(`must be one of "queued", "leased", "pending", "running"`) + } +} + +func (s *ActiveJobState) Type() string { + return "ActiveJobState" +} diff --git a/internal/armadactl/app.go b/internal/armadactl/app.go index ef87562ac9e..4b6a45c1bc0 100644 --- a/internal/armadactl/app.go +++ b/internal/armadactl/app.go @@ -56,6 +56,8 @@ type QueueAPI struct { Update queue.UpdateAPI Cordon queue.CordonAPI Uncordon queue.UncordonAPI + Cancel queue.CancelAPI + Preempt queue.PreemptAPI } type ExecutorAPI struct { diff --git a/internal/armadactl/cancel.go b/internal/armadactl/cancel.go index 4196b6e8339..115df97a931 100644 --- a/internal/armadactl/cancel.go +++ b/internal/armadactl/cancel.go @@ -6,6 +6,7 @@ import ( "github.com/pkg/errors" + "github.com/armadaproject/armada/cmd/armadactl/cmd/utils" "github.com/armadaproject/armada/internal/common" armadaslices "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/pkg/api" @@ -73,3 +74,25 @@ func (a *App) CancelOnExecutor(executor string, queues []string, priorityClasses } return nil } + +// CancelOnQueues cancels all jobs on queues matching the provided QueueQueryArgs filter +func (a *App) CancelOnQueues(args *QueueQueryArgs, priorityClasses []string, jobStates []utils.ActiveJobState, dryRun bool) error { + queues, err := a.getAllQueuesAsAPIQueue(args) + if err != nil { + return errors.Errorf("error fetching queues: %s", err) + } + + priorityClassesMsg := strings.Join(priorityClasses, ",") + jobStatesMsg := strings.Join(armadaslices.Map(jobStates, func(s utils.ActiveJobState) string { return s.String() }), ",") + apiJobStates := armadaslices.Map(jobStates, utils.ApiJobStateFromActiveJobState) + + for _, queue := range queues { + fmt.Fprintf(a.Out, "Requesting cancellation of jobs matching queue: %s, priorityClasses: %s, jobStates: %s\n", queue.Name, priorityClassesMsg, jobStatesMsg) + if !dryRun { + if err := a.Params.QueueAPI.Cancel(queue.Name, priorityClasses, apiJobStates); err != nil { + return fmt.Errorf("error cancelling jobs on queue %s: %s", queue.Name, err) + } + } + } + return nil +} diff --git a/internal/armadactl/preempt.go b/internal/armadactl/preempt.go index a49fbdd6590..cc75c75636c 100644 --- a/internal/armadactl/preempt.go +++ b/internal/armadactl/preempt.go @@ -55,3 +55,23 @@ func (a *App) PreemptOnExecutor(executor string, queues []string, priorityClasse } return nil } + +// PreemptOnQueues preempts all jobs on queues matching the provided QueueQueryArgs filter +func (a *App) PreemptOnQueues(args *QueueQueryArgs, priorityClasses []string, dryRun bool) error { + queues, err := a.getAllQueuesAsAPIQueue(args) + if err != nil { + return errors.Errorf("error fetching queues: %s", err) + } + + priorityClassesMsg := strings.Join(priorityClasses, ",") + + for _, queue := range queues { + fmt.Fprintf(a.Out, "Requesting preemption of jobs matching queue: %s, priorityClasses: %s\n", queue.Name, priorityClassesMsg) + if !dryRun { + if err := a.Params.QueueAPI.Preempt(queue.Name, priorityClasses); err != nil { + return fmt.Errorf("error preempting jobs on queue %s: %s", queue.Name, err) + } + } + } + return nil +} diff --git a/internal/common/ingest/testfixtures/event.go b/internal/common/ingest/testfixtures/event.go index e02399982b5..12358ce8e36 100644 --- a/internal/common/ingest/testfixtures/event.go +++ b/internal/common/ingest/testfixtures/event.go @@ -538,6 +538,35 @@ var CancelOnExecutor = &controlplaneevents.Event{ }, } +var PreemptOnQueue = &controlplaneevents.Event{ + Event: &controlplaneevents.Event_PreemptOnQueue{ + PreemptOnQueue: &controlplaneevents.PreemptOnQueue{ + Name: Queue, + PriorityClasses: []string{PriorityClassName}, + }, + }, +} + +var CancelQueuedOnQueue = &controlplaneevents.Event{ + Event: &controlplaneevents.Event_CancelOnQueue{ + CancelOnQueue: &controlplaneevents.CancelOnQueue{ + Name: Queue, + PriorityClasses: []string{PriorityClassName}, + JobStates: []controlplaneevents.ActiveJobState{controlplaneevents.ActiveJobState_QUEUED}, + }, + }, +} + +var CancelRunningOnQueue = &controlplaneevents.Event{ + Event: &controlplaneevents.Event_CancelOnQueue{ + CancelOnQueue: &controlplaneevents.CancelOnQueue{ + Name: Queue, + PriorityClasses: []string{PriorityClassName}, + JobStates: []controlplaneevents.ActiveJobState{controlplaneevents.ActiveJobState_RUNNING}, + }, + }, +} + func JobSetCancelRequestedWithStateFilter(states ...armadaevents.JobState) *armadaevents.EventSequence_Event { return &armadaevents.EventSequence_Event{ Created: testfixtures.BasetimeProto, diff --git a/internal/scheduler/database/query.sql.go b/internal/scheduler/database/query.sql.go index 6e69dd08d07..657371fe006 100644 --- a/internal/scheduler/database/query.sql.go +++ b/internal/scheduler/database/query.sql.go @@ -7,9 +7,12 @@ package database import ( "context" + "fmt" "time" "github.com/google/uuid" + + "github.com/armadaproject/armada/pkg/controlplaneevents" ) const countGroup = `-- name: CountGroup :one @@ -1014,3 +1017,121 @@ func (q *Queries) SelectAllJobsByExecutorAndQueues(ctx context.Context, executor } return items, nil } + +const selectQueuedJobsByQueue = `-- name: selectQueuedJobsByQueue :many +SELECT j.* +FROM jobs j +WHERE j.queue = ANY($1::text[]) + AND j.queued = true +` + +// a job is in the Leased state if it has a run created for it, but isn't yet assigned by Kubernetes +const selectLeasedJobsByQueue = `-- name: selectLeasedJobsByQueue :many +SELECT j.* +FROM runs jr + JOIN jobs j + ON jr.job_id = j.job_id +WHERE j.queue = ANY($1::text[]) + AND jr.running = false + AND jr.pending = false + AND jr.succeeded = false + AND jr.failed = false + AND jr.cancelled = false + AND jr.preempted = false +` + +const selectPendingJobsByQueue = `-- name: selectPendingJobsByQueue :many +SELECT j.* +FROM runs jr + JOIN jobs j + ON jr.job_id = j.job_id +WHERE j.queue = ANY($1::text[]) + AND jr.running = false + AND jr.pending = true + AND jr.succeeded = false + AND jr.failed = false + AND jr.cancelled = false + AND jr.preempted = false +` + +const selectRunningJobsByQueue = `-- name: selectRunningJobsByQueue :many +SELECT j.* +FROM runs jr + JOIN jobs j + ON jr.job_id = j.job_id +WHERE j.queue = ANY($1::text[]) + AND jr.running = true + AND jr.returned = false + AND jr.succeeded = false + AND jr.failed = false + AND jr.cancelled = false + AND jr.preempted = false +` + +func (q *Queries) SelectAllJobsByQueueAndJobState(ctx context.Context, queue string, jobStates []controlplaneevents.ActiveJobState) ([]Job, error) { + items := []Job{} + for _, state := range jobStates { + var query string + switch state { + case controlplaneevents.ActiveJobState_QUEUED: + query = selectQueuedJobsByQueue + case controlplaneevents.ActiveJobState_LEASED: + query = selectLeasedJobsByQueue + case controlplaneevents.ActiveJobState_PENDING: + query = selectPendingJobsByQueue + case controlplaneevents.ActiveJobState_RUNNING: + query = selectRunningJobsByQueue + default: + return nil, fmt.Errorf("unknown active job state %+v", state) + } + jobs, err := q.selectAllJobsByQuery(ctx, query, queue) + if err != nil { + return nil, fmt.Errorf("unable to select jobs by queue and job state: %s", err) + } + items = append(items, jobs...) + } + return items, nil +} + +func (q *Queries) selectAllJobsByQuery(ctx context.Context, query string, args ...string) ([]Job, error) { + rows, err := q.db.Query(ctx, query, args) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Job + for rows.Next() { + var i Job + if err := rows.Scan( + &i.JobID, + &i.JobSet, + &i.Queue, + &i.UserID, + &i.Submitted, + &i.Groups, + &i.Priority, + &i.Queued, + &i.QueuedVersion, + &i.CancelRequested, + &i.Cancelled, + &i.CancelByJobsetRequested, + &i.Succeeded, + &i.Failed, + &i.SubmitMessage, + &i.SchedulingInfo, + &i.SchedulingInfoVersion, + &i.Serial, + &i.LastModified, + &i.Validated, + &i.Pools, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + diff --git a/internal/scheduleringester/dbops.go b/internal/scheduleringester/dbops.go index dbf3c7ec93f..c511d717d01 100644 --- a/internal/scheduleringester/dbops.go +++ b/internal/scheduleringester/dbops.go @@ -7,6 +7,7 @@ import ( "golang.org/x/exp/maps" schedulerdb "github.com/armadaproject/armada/internal/scheduler/database" + "github.com/armadaproject/armada/pkg/controlplaneevents" ) type Operation int @@ -87,6 +88,17 @@ type CancelOnExecutor struct { PriorityClasses []string } +type PreemptOnQueue struct { + Name string + PriorityClasses []string +} + +type CancelOnQueue struct { + Name string + PriorityClasses []string + JobStates []controlplaneevents.ActiveJobState +} + // DbOperation captures a generic batch database operation. // // There are 5 types of operations: @@ -185,6 +197,8 @@ type ( DeleteExecutorSettings map[string]*ExecutorSettingsDelete PreemptExecutor map[string]*PreemptOnExecutor CancelExecutor map[string]*CancelOnExecutor + PreemptQueue map[string]*PreemptOnQueue + CancelQueue map[string]*CancelOnQueue ) type jobSetOperation interface { @@ -337,6 +351,14 @@ func (ce CancelExecutor) Merge(_ DbOperation) bool { return false } +func (pq PreemptQueue) Merge(_ DbOperation) bool { + return false +} + +func (cq CancelQueue) Merge(_ DbOperation) bool { + return false +} + // MergeInMap merges an op b into a, provided that b is of the same type as a. // For example, if a is of type MarkJobSetsCancelRequested, b is only merged if also of type MarkJobSetsCancelRequested. // Returns true if the ops were merged and false otherwise. @@ -536,6 +558,30 @@ func (ce CancelExecutor) CanBeAppliedBefore(b DbOperation) bool { return true } +func (pq PreemptQueue) CanBeAppliedBefore(b DbOperation) bool { + switch op := b.(type) { + case queueOperation: + for queue := range pq { + if affectsQueue := op.affectsQueue(queue); affectsQueue { + return false + } + } + } + return true +} + +func (cq CancelQueue) CanBeAppliedBefore(b DbOperation) bool { + switch op := b.(type) { + case queueOperation: + for queue := range cq { + if affectsQueue := op.affectsQueue(queue); affectsQueue { + return false + } + } + } + return true +} + // definesJobInSet returns true if b is an InsertJobs operation // that inserts at least one job in any of the job sets that make // up the keys of a. @@ -684,6 +730,14 @@ func (ce CancelExecutor) GetOperation() Operation { return ControlPlaneOperation } +func (pq PreemptQueue) GetOperation() Operation { + return ControlPlaneOperation +} + +func (cq CancelQueue) GetOperation() Operation { + return ControlPlaneOperation +} + type executorOperation interface { affectsExecutor(string) bool } @@ -707,3 +761,17 @@ func (ce CancelExecutor) affectsExecutor(executor string) bool { _, ok := ce[executor] return ok } + +type queueOperation interface { + affectsQueue(string) bool +} + +func (pq PreemptQueue) affectsQueue(queue string) bool { + _, ok := pq[queue] + return ok +} + +func (cq CancelQueue) affectsQueue(queue string) bool { + _, ok := cq[queue] + return ok +} diff --git a/internal/scheduleringester/instructions.go b/internal/scheduleringester/instructions.go index 13a526bb57d..86c2c3bea6d 100644 --- a/internal/scheduleringester/instructions.go +++ b/internal/scheduleringester/instructions.go @@ -414,6 +414,10 @@ func (c *ControlPlaneEventsInstructionConverter) dbOperationFromControlPlaneEven operations, err = c.handlePreemptOnExecutor(event.GetPreemptOnExecutor()) case *controlplaneevents.Event_CancelOnExecutor: operations, err = c.handleCancelOnExecutor(event.GetCancelOnExecutor()) + case *controlplaneevents.Event_PreemptOnQueue: + operations, err = c.handlePreemptOnQueue(event.GetPreemptOnQueue()) + case *controlplaneevents.Event_CancelOnQueue: + operations, err = c.handleCancelOnQueue(event.GetCancelOnQueue()) default: log.Errorf("Unknown event of type %T", ev) } @@ -473,6 +477,29 @@ func (c *ControlPlaneEventsInstructionConverter) handleCancelOnExecutor(cancel * }, nil } +func (c *ControlPlaneEventsInstructionConverter) handlePreemptOnQueue(preempt *controlplaneevents.PreemptOnQueue) ([]DbOperation, error) { + return []DbOperation{ + PreemptQueue{ + preempt.Name: { + Name: preempt.Name, + PriorityClasses: preempt.PriorityClasses, + }, + }, + }, nil +} + +func (c *ControlPlaneEventsInstructionConverter) handleCancelOnQueue(cancel *controlplaneevents.CancelOnQueue) ([]DbOperation, error) { + return []DbOperation{ + CancelQueue{ + cancel.Name: { + Name: cancel.Name, + PriorityClasses: cancel.PriorityClasses, + JobStates: cancel.JobStates, + }, + }, + }, nil +} + // schedulingInfoFromSubmitJob returns a minimal representation of a job containing only the info needed by the scheduler. func (c *JobSetEventsInstructionConverter) schedulingInfoFromSubmitJob(submitJob *armadaevents.SubmitJob, submitTime time.Time) (*schedulerobjects.JobSchedulingInfo, error) { return SchedulingInfoFromSubmitJob(submitJob, submitTime) diff --git a/internal/scheduleringester/instructions_test.go b/internal/scheduleringester/instructions_test.go index ca4c6760e08..ea79d2ae7f0 100644 --- a/internal/scheduleringester/instructions_test.go +++ b/internal/scheduleringester/instructions_test.go @@ -292,6 +292,35 @@ func TestConvertControlPlaneEvent(t *testing.T) { }, }}, }, + "preempt on queue": { + event: f.PreemptOnQueue, + expected: []DbOperation{PreemptQueue{ + f.Queue: &PreemptOnQueue{ + Name: f.Queue, + PriorityClasses: []string{f.PriorityClassName}, + }, + }}, + }, + "cancel queued on queue": { + event: f.CancelQueuedOnQueue, + expected: []DbOperation{CancelQueue{ + f.Queue: &CancelOnQueue{ + Name: f.Queue, + PriorityClasses: []string{f.PriorityClassName}, + JobStates: []controlplaneevents.ActiveJobState{controlplaneevents.ActiveJobState_QUEUED}, + }, + }}, + }, + "cancel running on queue": { + event: f.CancelRunningOnQueue, + expected: []DbOperation{CancelQueue{ + f.Queue: &CancelOnQueue{ + Name: f.Queue, + PriorityClasses: []string{f.PriorityClassName}, + JobStates: []controlplaneevents.ActiveJobState{controlplaneevents.ActiveJobState_RUNNING}, + }, + }}, + }, } for name, tc := range tests { diff --git a/internal/scheduleringester/schedulerdb.go b/internal/scheduleringester/schedulerdb.go index 3ab11bfb8e6..a2d36e9f2be 100644 --- a/internal/scheduleringester/schedulerdb.go +++ b/internal/scheduleringester/schedulerdb.go @@ -17,6 +17,7 @@ import ( "github.com/armadaproject/armada/internal/common/slices" schedulerdb "github.com/armadaproject/armada/internal/scheduler/database" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/pkg/controlplaneevents" ) const ( @@ -428,6 +429,56 @@ func (s *SchedulerDb) WriteDbOp(ctx *armadacontext.Context, tx pgx.Tx, op DbOper } } } + case CancelQueue: + for _, cancelRequest := range o { + jobs, err := queries.SelectAllJobsByQueueAndJobState(ctx, cancelRequest.Name, cancelRequest.JobStates) + if err != nil { + return errors.Wrapf(err, "error cancelling jobs by queue, job state and priority class") + } + inPriorityClasses := jobInPriorityClasses(cancelRequest.PriorityClasses) + jobsToCancel := make([]schedulerdb.Job, 0) + for _, job := range jobs { + ok, err := inPriorityClasses(job) + if err != nil { + return errors.Wrapf(err, "error cancelling jobs by queue, job state and priority class") + } + if ok { + jobsToCancel = append(jobsToCancel, job) + } + } + for _, requestCancelParams := range createMarkJobsCancelRequestedByIdParams(jobsToCancel) { + err = queries.MarkJobsCancelRequestedById(ctx, *requestCancelParams) + if err != nil { + return errors.Wrapf(err, "error cancelling jobs by queue, job state and priority class") + } + } + } + case PreemptQueue: + for _, preemptRequest := range o { + // Only allocated jobs can be preempted + jobStates := []controlplaneevents.ActiveJobState{controlplaneevents.ActiveJobState_LEASED, controlplaneevents.ActiveJobState_PENDING, controlplaneevents.ActiveJobState_RUNNING} + jobs, err := queries.SelectAllJobsByQueueAndJobState(ctx, preemptRequest.Name, jobStates) + if err != nil { + return errors.Wrapf(err, "error preempting jobs by queue, job state and priority class") + } + inPriorityClasses := jobInPriorityClasses(preemptRequest.PriorityClasses) + jobsToPreempt := make([]schedulerdb.Job, 0) + for _, job := range jobs { + ok, err := inPriorityClasses(job) + if err != nil { + return errors.Wrapf(err, "error preempting jobs by queue, job state and priority class") + } + if ok { + jobsToPreempt = append(jobsToPreempt, job) + } + } + for _, requestPreemptParams := range createMarkJobRunsPreemptRequestedByJobIdParams(jobsToPreempt) { + err = queries.MarkJobRunsPreemptRequestedByJobId(ctx, *requestPreemptParams) + if err != nil { + return errors.Wrapf(err, "error preempting jobs by queue, job state and priority class") + } + } + } default: return errors.Errorf("received unexpected op %+v", op) } diff --git a/internal/server/queue/queue_service.go b/internal/server/queue/queue_service.go index 97ef409b990..2b3ece5bb45 100644 --- a/internal/server/queue/queue_service.go +++ b/internal/server/queue/queue_service.go @@ -9,27 +9,37 @@ import ( "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "k8s.io/utils/clock" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/armadaerrors" "github.com/armadaproject/armada/internal/common/auth" + protoutil "github.com/armadaproject/armada/internal/common/proto" + "github.com/armadaproject/armada/internal/common/pulsarutils" + armadaslices "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/internal/server/permissions" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/client/queue" + "github.com/armadaproject/armada/pkg/controlplaneevents" ) type Server struct { + publisher pulsarutils.Publisher[*controlplaneevents.Event] queueRepository QueueRepository authorizer auth.ActionAuthorizer + clock clock.Clock } func NewServer( + publisher pulsarutils.Publisher[*controlplaneevents.Event], queueRepository QueueRepository, authorizer auth.ActionAuthorizer, ) *Server { return &Server{ + publisher: publisher, queueRepository: queueRepository, authorizer: authorizer, + clock: clock.RealClock{}, } } @@ -228,3 +238,87 @@ func (s *Server) UncordonQueue(grpcCtx context.Context, req *api.QueueUncordonRe return &types.Empty{}, s.queueRepository.UncordonQueue(ctx, queueName) } + +func isActiveState(state api.JobState) bool { + switch state { + case api.JobState_QUEUED, api.JobState_LEASED, api.JobState_PENDING, api.JobState_RUNNING: + return true + default: + return false + } +} + +func (s *Server) CancelOnQueue(grpcCtx context.Context, req *api.QueueCancelRequest) (*types.Empty, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + + err := s.authorizer.AuthorizeAction(ctx, permissions.CancelAnyJobs) + var ep *armadaerrors.ErrUnauthorized + if errors.As(err, &ep) { + return nil, status.Errorf(codes.PermissionDenied, "error cancelling jobs on queue %s: %s", req.Name, ep) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error checking permissions: %s", err) + } + + queueName := req.Name + if queueName == "" { + return nil, fmt.Errorf("cannot cancel jobs on queue with empty name") + } + + if !armadaslices.AllFunc(req.JobStates, isActiveState) { + return nil, fmt.Errorf("provided job states must be non-terminal") + } + + activeJobStates := armadaslices.Map(req.JobStates, api.ActiveJobStateFromApiJobState) + + es := &controlplaneevents.Event{ + Created: protoutil.ToTimestamp(s.clock.Now().UTC()), + Event: &controlplaneevents.Event_CancelOnQueue{ + CancelOnQueue: &controlplaneevents.CancelOnQueue{ + Name: req.Name, + PriorityClasses: req.PriorityClasses, + JobStates: activeJobStates, + }, + }, + } + + err = s.publisher.PublishMessages(ctx, es) + if err != nil { + return nil, status.Error(codes.Internal, "Failed to send events to Pulsar") + } + + return &types.Empty{}, nil +} + +func (s *Server) PreemptOnQueue(grpcCtx context.Context, req *api.QueuePreemptRequest) (*types.Empty, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + + err := s.authorizer.AuthorizeAction(ctx, permissions.PreemptAnyJobs) + var ep *armadaerrors.ErrUnauthorized + if errors.As(err, &ep) { + return nil, status.Errorf(codes.PermissionDenied, "error preempting jobs on queue %s: %s", req.Name, ep) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error checking permissions: %s", err) + } + + queueName := req.Name + if queueName == "" { + return nil, fmt.Errorf("cannot preempt jobs on queue with empty name") + } + + es := &controlplaneevents.Event{ + Created: protoutil.ToTimestamp(s.clock.Now().UTC()), + Event: &controlplaneevents.Event_PreemptOnQueue{ + PreemptOnQueue: &controlplaneevents.PreemptOnQueue{ + Name: req.Name, + PriorityClasses: req.PriorityClasses, + }, + }, + } + + err = s.publisher.PublishMessages(ctx, es) + if err != nil { + return nil, status.Error(codes.Internal, "Failed to send events to Pulsar") + } + + return &types.Empty{}, nil +} diff --git a/internal/server/server.go b/internal/server/server.go index ef7a9b9e348..badcc5689f8 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -163,7 +163,7 @@ func Serve(ctx *armadacontext.Context, config *configuration.ArmadaConfig, healt } defer controlPlaneEventsPublisher.Close() - queueServer := queue.NewServer(queueRepository, authorizer) + queueServer := queue.NewServer(controlPlaneEventsPublisher, queueRepository, authorizer) submitServer := submit.NewServer( queueServer, diff --git a/pkg/api/submit.pb.go b/pkg/api/submit.pb.go index 8ffdced2437..7bdb6b5b2c1 100644 --- a/pkg/api/submit.pb.go +++ b/pkg/api/submit.pb.go @@ -2180,6 +2180,119 @@ func (*StreamingQueueMessage) XXX_OneofWrappers() []interface{} { } } +type QueuePreemptRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PriorityClasses []string `protobuf:"bytes,2,rep,name=priorityClasses,proto3" json:"priorityClasses,omitempty"` +} + +func (m *QueuePreemptRequest) Reset() { *m = QueuePreemptRequest{} } +func (m *QueuePreemptRequest) String() string { return proto.CompactTextString(m) } +func (*QueuePreemptRequest) ProtoMessage() {} +func (*QueuePreemptRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{30} +} +func (m *QueuePreemptRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueuePreemptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueuePreemptRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueuePreemptRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueuePreemptRequest.Merge(m, src) +} +func (m *QueuePreemptRequest) XXX_Size() int { + return m.Size() +} +func (m *QueuePreemptRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueuePreemptRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueuePreemptRequest proto.InternalMessageInfo + +func (m *QueuePreemptRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *QueuePreemptRequest) GetPriorityClasses() []string { + if m != nil { + return m.PriorityClasses + } + return nil +} + +type QueueCancelRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PriorityClasses []string `protobuf:"bytes,2,rep,name=priorityClasses,proto3" json:"priorityClasses,omitempty"` + // In practice jobs are only cancellable from non-terminal states + JobStates []JobState `protobuf:"varint,3,rep,packed,name=jobStates,proto3,enum=api.JobState" json:"jobStates,omitempty"` +} + +func (m *QueueCancelRequest) Reset() { *m = QueueCancelRequest{} } +func (m *QueueCancelRequest) String() string { return proto.CompactTextString(m) } +func (*QueueCancelRequest) ProtoMessage() {} +func (*QueueCancelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{31} +} +func (m *QueueCancelRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueueCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueueCancelRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueueCancelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueCancelRequest.Merge(m, src) +} +func (m *QueueCancelRequest) XXX_Size() int { + return m.Size() +} +func (m *QueueCancelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueueCancelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueueCancelRequest proto.InternalMessageInfo + +func (m *QueueCancelRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *QueueCancelRequest) GetPriorityClasses() []string { + if m != nil { + return m.PriorityClasses + } + return nil +} + +func (m *QueueCancelRequest) GetJobStates() []JobState { + if m != nil { + return m.JobStates + } + return nil +} + func init() { proto.RegisterEnum("api.IngressType", IngressType_name, IngressType_value) proto.RegisterEnum("api.ServiceType", ServiceType_name, ServiceType_value) @@ -2230,204 +2343,211 @@ func init() { proto.RegisterType((*BatchQueueCreateResponse)(nil), "api.BatchQueueCreateResponse") proto.RegisterType((*EndMarker)(nil), "api.EndMarker") proto.RegisterType((*StreamingQueueMessage)(nil), "api.StreamingQueueMessage") + proto.RegisterType((*QueuePreemptRequest)(nil), "api.QueuePreemptRequest") + proto.RegisterType((*QueueCancelRequest)(nil), "api.QueueCancelRequest") } func init() { proto.RegisterFile("pkg/api/submit.proto", fileDescriptor_e998bacb27df16c1) } var fileDescriptor_e998bacb27df16c1 = []byte{ - // 3061 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3a, 0x3b, 0x70, 0x1b, 0xd7, - 0xb5, 0x5c, 0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, 0x05, 0xe5, 0x2f, 0x2f, 0xd0, 0x08, 0x11, - 0xfd, 0xc1, 0x1d, 0xf1, 0x86, 0x44, 0xee, 0xc0, 0xc8, 0x03, 0xfc, 0x3b, 0x2f, 0xe9, 0x60, 0x69, - 0x8a, 0xdf, 0x53, 0x8e, 0x94, 0x3b, 0xa4, 0xa5, 0xe3, 0xa0, 0x07, 0x79, 0xff, 0x0f, 0x5f, 0x2c, - 0x4a, 0x9f, 0x7f, 0xb1, 0x28, 0xfd, 0xf5, 0x8b, 0x45, 0xe9, 0x93, 0x2f, 0x17, 0x07, 0x3e, 0xff, - 0x72, 0x71, 0xe0, 0xcf, 0x5f, 0x2e, 0x0e, 0x7c, 0xfb, 0xb5, 0xb2, 0xee, 0x1e, 0xd6, 0x8a, 0x99, - 0x92, 0x59, 0x5d, 0x55, 0xed, 0xaa, 0xaa, 0xa9, 0x96, 0x6d, 0x1e, 0xd1, 0x92, 0xeb, 0xad, 0x56, - 0xbd, 0xbf, 0x12, 0x7f, 0x36, 0x38, 0xbb, 0x8e, 0x80, 0x1d, 0xbe, 0x9d, 0xd9, 0x34, 0x33, 0xeb, - 0x96, 0x5e, 0x1c, 0x41, 0x1d, 0xde, 0xfc, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0x9e, 0x06, - 0xd2, 0x38, 0x2d, 0x00, 0x00, + // 3144 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x73, 0x1c, 0x47, + 0xd9, 0xd7, 0x68, 0xad, 0x8f, 0x7d, 0x56, 0x1f, 0xab, 0xb6, 0x2c, 0x8f, 0xd6, 0x8e, 0x56, 0x9e, + 0x24, 0x8e, 0xec, 0xf8, 0x5d, 0xc5, 0xca, 0x9b, 0xc2, 0x36, 0x01, 0xe3, 0x5d, 0xad, 0x6d, 0xc9, + 0xb6, 0xac, 0x48, 0x56, 0x3e, 0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0xb5, 0xef, 0x2f, 0x13, 0x38, + 0x58, 0xdc, 0x6b, 0xbf, 0x1f, 0x86, 0xf4, 0x31, 0x32, 0xc8, 0xaf, 0xfb, 0x08, 0xcc, 0x3b, 0xfd, + 0x58, 0x73, 0xaa, 0xc1, 0xf9, 0x55, 0x9c, 0xaf, 0x96, 0x87, 0x38, 0xd6, 0x81, 0x87, 0xa6, 0xeb, + 0x91, 0x1b, 0x30, 0x8a, 0xed, 0xbc, 0x5f, 0x27, 0x20, 0xac, 0x13, 0xbc, 0xe6, 0xf0, 0x55, 0xb9, + 0xe6, 0x70, 0x44, 0xdb, 0x01, 0xc2, 0x9f, 0x70, 0x2b, 0x52, 0x0f, 0x4c, 0x6e, 0xc3, 0x64, 0x89, + 0xa3, 0xd4, 0x90, 0x66, 0x15, 0xfc, 0xb5, 0x26, 0x58, 0x88, 0x4e, 0x2c, 0x13, 0x32, 0xae, 0xdd, + 0x84, 0x69, 0xd4, 0x7e, 0x8f, 0x06, 0x0f, 0xfe, 0x7d, 0x36, 0x81, 0xda, 0x9b, 0x40, 0x90, 0x35, + 0x87, 0xb5, 0x7a, 0x50, 0xee, 0x6f, 0xc2, 0x2c, 0x72, 0xef, 0x58, 0xa5, 0x13, 0xf1, 0xdf, 0x06, + 0x75, 0xdb, 0x73, 0xa8, 0x5e, 0x35, 0xad, 0x72, 0xab, 0x07, 0x2f, 0x42, 0xcc, 0xaa, 0x57, 0x51, + 0xc4, 0x24, 0x3f, 0x46, 0xab, 0x5e, 0x95, 0x8f, 0xd1, 0xaa, 0x57, 0x03, 0xf3, 0x57, 0x69, 0x85, + 0x7a, 0x74, 0x50, 0xf5, 0x9f, 0x28, 0x00, 0xfc, 0xc5, 0x79, 0xcd, 0xda, 0xb5, 0xfb, 0x6e, 0x9c, + 0x6f, 0x42, 0x02, 0xcf, 0xd3, 0x28, 0xec, 0xdb, 0x58, 0xdb, 0x95, 0xa5, 0x11, 0xde, 0xf1, 0x72, + 0x78, 0xdd, 0x8e, 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 0x3c, 0xb5, 0x5d, 0x40, 0xc1, 0xe7, 0x52, + 0xc9, 0xc0, 0xda, 0xe5, 0x1f, 0xb2, 0x2a, 0xf9, 0x81, 0x30, 0xfa, 0x59, 0xb2, 0x9e, 0x30, 0x3a, + 0x15, 0x31, 0xba, 0x8e, 0x34, 0x92, 0xd1, 0xef, 0x3e, 0x63, 0x66, 0x54, 0x51, 0x0b, 0xb9, 0xda, + 0xe6, 0x01, 0xb9, 0x3b, 0x50, 0xc6, 0x14, 0x72, 0x48, 0xbb, 0x1c, 0xe3, 0x39, 0x65, 0x52, 0x11, + 0x68, 0x84, 0xc8, 0xfb, 0xc1, 0x37, 0xe2, 0x35, 0x85, 0xdc, 0x82, 0xd1, 0xfb, 0xf8, 0xff, 0xda, + 0xa4, 0x8b, 0xa7, 0x29, 0x7e, 0x4f, 0x39, 0x51, 0x6e, 0x8f, 0x96, 0x0e, 0x82, 0x26, 0xf3, 0xdd, + 0x3f, 0x7c, 0xb6, 0xa0, 0x7c, 0xfa, 0xd9, 0x82, 0xf2, 0xf7, 0xcf, 0x16, 0x94, 0x8f, 0x3e, 0x5f, + 0x18, 0xfa, 0xf4, 0xf3, 0x85, 0xa1, 0xbf, 0x7e, 0xbe, 0x30, 0xf4, 0xed, 0x57, 0xca, 0xa6, 0xb7, + 0x57, 0x2f, 0x66, 0x4a, 0x76, 0x75, 0x59, 0x77, 0xaa, 0xba, 0xa1, 0xd7, 0x1c, 0x7b, 0x9f, 0x96, + 0x3c, 0xf1, 0xb5, 0x2c, 0xfe, 0x57, 0xfc, 0x93, 0xe1, 0xd9, 0x3b, 0x08, 0x6c, 0xf2, 0xe5, 0xcc, + 0x9a, 0x9d, 0xb9, 0x53, 0x33, 0x8b, 0xa3, 0x68, 0xc3, 0xeb, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, + 0x15, 0xc2, 0xbe, 0xc7, 0x19, 0x2f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2451,6 +2571,8 @@ type QueueServiceClient interface { GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (QueueService_GetQueuesClient, error) CordonQueue(ctx context.Context, in *QueueCordonRequest, opts ...grpc.CallOption) (*types.Empty, error) UncordonQueue(ctx context.Context, in *QueueUncordonRequest, opts ...grpc.CallOption) (*types.Empty, error) + PreemptOnQueue(ctx context.Context, in *QueuePreemptRequest, opts ...grpc.CallOption) (*types.Empty, error) + CancelOnQueue(ctx context.Context, in *QueueCancelRequest, opts ...grpc.CallOption) (*types.Empty, error) } type queueServiceClient struct { @@ -2565,6 +2687,24 @@ func (c *queueServiceClient) UncordonQueue(ctx context.Context, in *QueueUncordo return out, nil } +func (c *queueServiceClient) PreemptOnQueue(ctx context.Context, in *QueuePreemptRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.QueueService/PreemptOnQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queueServiceClient) CancelOnQueue(ctx context.Context, in *QueueCancelRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.QueueService/CancelOnQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueueServiceServer is the server API for QueueService service. type QueueServiceServer interface { CreateQueue(context.Context, *Queue) (*types.Empty, error) @@ -2576,6 +2716,8 @@ type QueueServiceServer interface { GetQueues(*StreamingQueueGetRequest, QueueService_GetQueuesServer) error CordonQueue(context.Context, *QueueCordonRequest) (*types.Empty, error) UncordonQueue(context.Context, *QueueUncordonRequest) (*types.Empty, error) + PreemptOnQueue(context.Context, *QueuePreemptRequest) (*types.Empty, error) + CancelOnQueue(context.Context, *QueueCancelRequest) (*types.Empty, error) } // UnimplementedQueueServiceServer can be embedded to have forward compatible implementations. @@ -2609,6 +2751,12 @@ func (*UnimplementedQueueServiceServer) CordonQueue(ctx context.Context, req *Qu func (*UnimplementedQueueServiceServer) UncordonQueue(ctx context.Context, req *QueueUncordonRequest) (*types.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UncordonQueue not implemented") } +func (*UnimplementedQueueServiceServer) PreemptOnQueue(ctx context.Context, req *QueuePreemptRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PreemptOnQueue not implemented") +} +func (*UnimplementedQueueServiceServer) CancelOnQueue(ctx context.Context, req *QueueCancelRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelOnQueue not implemented") +} func RegisterQueueServiceServer(s *grpc.Server, srv QueueServiceServer) { s.RegisterService(&_QueueService_serviceDesc, srv) @@ -2779,6 +2927,42 @@ func _QueueService_UncordonQueue_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _QueueService_PreemptOnQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueuePreemptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueueServiceServer).PreemptOnQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.QueueService/PreemptOnQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueueServiceServer).PreemptOnQueue(ctx, req.(*QueuePreemptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueueService_CancelOnQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueCancelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueueServiceServer).CancelOnQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.QueueService/CancelOnQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueueServiceServer).CancelOnQueue(ctx, req.(*QueueCancelRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _QueueService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.QueueService", HandlerType: (*QueueServiceServer)(nil), @@ -2815,6 +2999,14 @@ var _QueueService_serviceDesc = grpc.ServiceDesc{ MethodName: "UncordonQueue", Handler: _QueueService_UncordonQueue_Handler, }, + { + MethodName: "PreemptOnQueue", + Handler: _QueueService_PreemptOnQueue_Handler, + }, + { + MethodName: "CancelOnQueue", + Handler: _QueueService_CancelOnQueue_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -5215,6 +5407,102 @@ func (m *StreamingQueueMessage_End) MarshalToSizedBuffer(dAtA []byte) (int, erro } return len(dAtA) - i, nil } +func (m *QueuePreemptRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueuePreemptRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueuePreemptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PriorityClasses) > 0 { + for iNdEx := len(m.PriorityClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PriorityClasses[iNdEx]) + copy(dAtA[i:], m.PriorityClasses[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.PriorityClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueueCancelRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueueCancelRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueueCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.JobStates) > 0 { + dAtA19 := make([]byte, len(m.JobStates)*10) + var j18 int + for _, num := range m.JobStates { + for num >= 1<<7 { + dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j18++ + } + dAtA19[j18] = uint8(num) + j18++ + } + i -= j18 + copy(dAtA[i:], dAtA19[:j18]) + i = encodeVarintSubmit(dAtA, i, uint64(j18)) + i-- + dAtA[i] = 0x1a + } + if len(m.PriorityClasses) > 0 { + for iNdEx := len(m.PriorityClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PriorityClasses[iNdEx]) + copy(dAtA[i:], m.PriorityClasses[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.PriorityClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintSubmit(dAtA []byte, offset int, v uint64) int { offset -= sovSubmit(v) base := offset @@ -6047,6 +6335,50 @@ func (m *StreamingQueueMessage_End) Size() (n int) { } return n } +func (m *QueuePreemptRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSubmit(uint64(l)) + } + if len(m.PriorityClasses) > 0 { + for _, s := range m.PriorityClasses { + l = len(s) + n += 1 + l + sovSubmit(uint64(l)) + } + } + return n +} + +func (m *QueueCancelRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSubmit(uint64(l)) + } + if len(m.PriorityClasses) > 0 { + for _, s := range m.PriorityClasses { + l = len(s) + n += 1 + l + sovSubmit(uint64(l)) + } + } + if len(m.JobStates) > 0 { + l = 0 + for _, e := range m.JobStates { + l += sovSubmit(uint64(e)) + } + n += 1 + sovSubmit(uint64(l)) + l + } + return n +} func sovSubmit(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 @@ -12150,6 +12482,303 @@ func (m *StreamingQueueMessage) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueuePreemptRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueuePreemptRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueuePreemptRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityClasses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriorityClasses = append(m.PriorityClasses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueueCancelRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueueCancelRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueueCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityClasses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriorityClasses = append(m.PriorityClasses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v JobState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= JobState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.JobStates = append(m.JobStates, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.JobStates) == 0 { + m.JobStates = make([]JobState, 0, elementCount) + } + for iNdEx < postIndex { + var v JobState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= JobState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.JobStates = append(m.JobStates, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field JobStates", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipSubmit(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/pkg/api/submit.proto b/pkg/api/submit.proto index 082d6de6ea3..46a98013ed2 100644 --- a/pkg/api/submit.proto +++ b/pkg/api/submit.proto @@ -282,6 +282,18 @@ message StreamingQueueMessage{ } } +message QueuePreemptRequest { + string name = 1; + repeated string priorityClasses = 2; +} + +message QueueCancelRequest { + string name = 1; + repeated string priorityClasses = 2; + // In practice jobs are only cancellable from non-terminal states + repeated JobState jobStates = 3; +} + service QueueService { rpc CreateQueue (Queue) returns (google.protobuf.Empty) {} rpc CreateQueues (QueueList) returns (BatchQueueCreateResponse) {} @@ -292,6 +304,8 @@ service QueueService { rpc GetQueues (StreamingQueueGetRequest) returns (stream StreamingQueueMessage) {} rpc CordonQueue (QueueCordonRequest) returns (google.protobuf.Empty) {} rpc UncordonQueue (QueueUncordonRequest) returns (google.protobuf.Empty) {} + rpc PreemptOnQueue (QueuePreemptRequest) returns (google.protobuf.Empty) {} + rpc CancelOnQueue (QueueCancelRequest) returns (google.protobuf.Empty) {} } service Submit { diff --git a/pkg/api/util.go b/pkg/api/util.go index 4d39a1a2f5a..7eb8ecbba0a 100644 --- a/pkg/api/util.go +++ b/pkg/api/util.go @@ -7,6 +7,7 @@ import ( v1 "k8s.io/api/core/v1" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/pkg/controlplaneevents" ) func NodeIdFromExecutorAndNodeName(executor, nodeName string) string { @@ -209,3 +210,17 @@ func JobSetIdFromApiEvent(msg *EventMessage) string { } return "" } + +func ActiveJobStateFromApiJobState(state JobState) controlplaneevents.ActiveJobState { + switch state { + case JobState_QUEUED: + return controlplaneevents.ActiveJobState_QUEUED + case JobState_LEASED: + return controlplaneevents.ActiveJobState_LEASED + case JobState_PENDING: + return controlplaneevents.ActiveJobState_PENDING + case JobState_RUNNING: + return controlplaneevents.ActiveJobState_RUNNING + } + return controlplaneevents.ActiveJobState_UNKNOWN +} diff --git a/pkg/client/queue/cancel.go b/pkg/client/queue/cancel.go new file mode 100644 index 00000000000..0253b244b37 --- /dev/null +++ b/pkg/client/queue/cancel.go @@ -0,0 +1,34 @@ +package queue + +import ( + "fmt" + + "github.com/armadaproject/armada/internal/common" + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" +) + +type CancelAPI func(string, []string, []api.JobState) error + +func Cancel(getConnectionDetails client.ConnectionDetails) CancelAPI { + return func(queueName string, priorityClasses []string, jobStates []api.JobState) error { + connectionDetails, err := getConnectionDetails() + if err != nil { + return fmt.Errorf("failed to obtain api connection details: %s", err) + } + conn, err := client.CreateApiConnection(connectionDetails) + if err != nil { + return fmt.Errorf("failed to connect to api because %s", err) + } + defer conn.Close() + + ctx, cancel := common.ContextWithDefaultTimeout() + defer cancel() + + queueClient := api.NewQueueServiceClient(conn) + if _, err = queueClient.CancelOnQueue(ctx, &api.QueueCancelRequest{Name: queueName, PriorityClasses: priorityClasses, JobStates: jobStates}); err != nil { + return err + } + return nil + } +} diff --git a/pkg/client/queue/preempt.go b/pkg/client/queue/preempt.go new file mode 100644 index 00000000000..fa25eba4814 --- /dev/null +++ b/pkg/client/queue/preempt.go @@ -0,0 +1,34 @@ +package queue + +import ( + "fmt" + + "github.com/armadaproject/armada/internal/common" + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" +) + +type PreemptAPI func(string, []string) error + +func Preempt(getConnectionDetails client.ConnectionDetails) PreemptAPI { + return func(queueName string, priorityClasses []string) error { + connectionDetails, err := getConnectionDetails() + if err != nil { + return fmt.Errorf("failed to obtain api connection details: %s", err) + } + conn, err := client.CreateApiConnection(connectionDetails) + if err != nil { + return fmt.Errorf("failed to connect to api because %s", err) + } + defer conn.Close() + + ctx, cancel := common.ContextWithDefaultTimeout() + defer cancel() + + queueClient := api.NewQueueServiceClient(conn) + if _, err = queueClient.PreemptOnQueue(ctx, &api.QueuePreemptRequest{Name: queueName, PriorityClasses: priorityClasses}); err != nil { + return err + } + return nil + } +} diff --git a/pkg/controlplaneevents/events.pb.go b/pkg/controlplaneevents/events.pb.go index d5812bba0b5..f66abd834e0 100644 --- a/pkg/controlplaneevents/events.pb.go +++ b/pkg/controlplaneevents/events.pb.go @@ -24,6 +24,41 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// A subset of JobState including only non-terminal states +type ActiveJobState int32 + +const ( + ActiveJobState_UNKNOWN ActiveJobState = 0 + ActiveJobState_QUEUED ActiveJobState = 1 + ActiveJobState_LEASED ActiveJobState = 2 + ActiveJobState_PENDING ActiveJobState = 3 + ActiveJobState_RUNNING ActiveJobState = 4 +) + +var ActiveJobState_name = map[int32]string{ + 0: "UNKNOWN", + 1: "QUEUED", + 2: "LEASED", + 3: "PENDING", + 4: "RUNNING", +} + +var ActiveJobState_value = map[string]int32{ + "UNKNOWN": 0, + "QUEUED": 1, + "LEASED": 2, + "PENDING": 3, + "RUNNING": 4, +} + +func (x ActiveJobState) String() string { + return proto.EnumName(ActiveJobState_name, int32(x)) +} + +func (ActiveJobState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2ccee8bdbf348752, []int{0} +} + type Event struct { Created *types.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"` // Types that are valid to be assigned to Event: @@ -31,6 +66,8 @@ type Event struct { // *Event_ExecutorSettingsDelete // *Event_PreemptOnExecutor // *Event_CancelOnExecutor + // *Event_PreemptOnQueue + // *Event_CancelOnQueue Event isEvent_Event `protobuf_oneof:"event"` } @@ -85,11 +122,19 @@ type Event_PreemptOnExecutor struct { type Event_CancelOnExecutor struct { CancelOnExecutor *CancelOnExecutor `protobuf:"bytes,5,opt,name=cancelOnExecutor,proto3,oneof" json:"cancelOnExecutor,omitempty"` } +type Event_PreemptOnQueue struct { + PreemptOnQueue *PreemptOnQueue `protobuf:"bytes,6,opt,name=preemptOnQueue,proto3,oneof" json:"preemptOnQueue,omitempty"` +} +type Event_CancelOnQueue struct { + CancelOnQueue *CancelOnQueue `protobuf:"bytes,7,opt,name=cancelOnQueue,proto3,oneof" json:"cancelOnQueue,omitempty"` +} func (*Event_ExecutorSettingsUpsert) isEvent_Event() {} func (*Event_ExecutorSettingsDelete) isEvent_Event() {} func (*Event_PreemptOnExecutor) isEvent_Event() {} func (*Event_CancelOnExecutor) isEvent_Event() {} +func (*Event_PreemptOnQueue) isEvent_Event() {} +func (*Event_CancelOnQueue) isEvent_Event() {} func (m *Event) GetEvent() isEvent_Event { if m != nil { @@ -133,6 +178,20 @@ func (m *Event) GetCancelOnExecutor() *CancelOnExecutor { return nil } +func (m *Event) GetPreemptOnQueue() *PreemptOnQueue { + if x, ok := m.GetEvent().(*Event_PreemptOnQueue); ok { + return x.PreemptOnQueue + } + return nil +} + +func (m *Event) GetCancelOnQueue() *CancelOnQueue { + if x, ok := m.GetEvent().(*Event_CancelOnQueue); ok { + return x.CancelOnQueue + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Event) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -140,6 +199,8 @@ func (*Event) XXX_OneofWrappers() []interface{} { (*Event_ExecutorSettingsDelete)(nil), (*Event_PreemptOnExecutor)(nil), (*Event_CancelOnExecutor)(nil), + (*Event_PreemptOnQueue)(nil), + (*Event_CancelOnQueue)(nil), } } @@ -375,12 +436,127 @@ func (m *CancelOnExecutor) GetPriorityClasses() []string { return nil } +type PreemptOnQueue struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PriorityClasses []string `protobuf:"bytes,2,rep,name=priorityClasses,proto3" json:"priorityClasses,omitempty"` +} + +func (m *PreemptOnQueue) Reset() { *m = PreemptOnQueue{} } +func (m *PreemptOnQueue) String() string { return proto.CompactTextString(m) } +func (*PreemptOnQueue) ProtoMessage() {} +func (*PreemptOnQueue) Descriptor() ([]byte, []int) { + return fileDescriptor_2ccee8bdbf348752, []int{5} +} +func (m *PreemptOnQueue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PreemptOnQueue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PreemptOnQueue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PreemptOnQueue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PreemptOnQueue.Merge(m, src) +} +func (m *PreemptOnQueue) XXX_Size() int { + return m.Size() +} +func (m *PreemptOnQueue) XXX_DiscardUnknown() { + xxx_messageInfo_PreemptOnQueue.DiscardUnknown(m) +} + +var xxx_messageInfo_PreemptOnQueue proto.InternalMessageInfo + +func (m *PreemptOnQueue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *PreemptOnQueue) GetPriorityClasses() []string { + if m != nil { + return m.PriorityClasses + } + return nil +} + +type CancelOnQueue struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PriorityClasses []string `protobuf:"bytes,2,rep,name=priorityClasses,proto3" json:"priorityClasses,omitempty"` + JobStates []ActiveJobState `protobuf:"varint,3,rep,packed,name=jobStates,proto3,enum=controlplaneevents.ActiveJobState" json:"jobStates,omitempty"` +} + +func (m *CancelOnQueue) Reset() { *m = CancelOnQueue{} } +func (m *CancelOnQueue) String() string { return proto.CompactTextString(m) } +func (*CancelOnQueue) ProtoMessage() {} +func (*CancelOnQueue) Descriptor() ([]byte, []int) { + return fileDescriptor_2ccee8bdbf348752, []int{6} +} +func (m *CancelOnQueue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CancelOnQueue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CancelOnQueue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CancelOnQueue) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelOnQueue.Merge(m, src) +} +func (m *CancelOnQueue) XXX_Size() int { + return m.Size() +} +func (m *CancelOnQueue) XXX_DiscardUnknown() { + xxx_messageInfo_CancelOnQueue.DiscardUnknown(m) +} + +var xxx_messageInfo_CancelOnQueue proto.InternalMessageInfo + +func (m *CancelOnQueue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *CancelOnQueue) GetPriorityClasses() []string { + if m != nil { + return m.PriorityClasses + } + return nil +} + +func (m *CancelOnQueue) GetJobStates() []ActiveJobState { + if m != nil { + return m.JobStates + } + return nil +} + func init() { + proto.RegisterEnum("controlplaneevents.ActiveJobState", ActiveJobState_name, ActiveJobState_value) proto.RegisterType((*Event)(nil), "controlplaneevents.Event") proto.RegisterType((*ExecutorSettingsUpsert)(nil), "controlplaneevents.ExecutorSettingsUpsert") proto.RegisterType((*ExecutorSettingsDelete)(nil), "controlplaneevents.ExecutorSettingsDelete") proto.RegisterType((*PreemptOnExecutor)(nil), "controlplaneevents.PreemptOnExecutor") proto.RegisterType((*CancelOnExecutor)(nil), "controlplaneevents.CancelOnExecutor") + proto.RegisterType((*PreemptOnQueue)(nil), "controlplaneevents.PreemptOnQueue") + proto.RegisterType((*CancelOnQueue)(nil), "controlplaneevents.CancelOnQueue") } func init() { @@ -388,43 +564,54 @@ func init() { } var fileDescriptor_2ccee8bdbf348752 = []byte{ - // 564 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0x41, 0x8f, 0xd2, 0x40, - 0x14, 0xc7, 0xe9, 0x02, 0xbb, 0xcb, 0x68, 0x14, 0x46, 0xc5, 0x8a, 0xb1, 0x43, 0xd8, 0xd5, 0x6c, - 0xcc, 0xa6, 0x4d, 0xd6, 0xe8, 0xd1, 0xe8, 0xe0, 0x46, 0x8d, 0x07, 0x09, 0xba, 0x17, 0x6f, 0xa5, - 0x3c, 0xb1, 0xda, 0x76, 0xea, 0xcc, 0x40, 0xe4, 0x2b, 0x78, 0xf2, 0x73, 0x78, 0xd3, 0x4f, 0xe1, - 0x71, 0x8f, 0x9e, 0x1a, 0x03, 0xb7, 0xfa, 0x25, 0x0c, 0x53, 0xd8, 0x2d, 0x6d, 0x35, 0x1c, 0x3d, - 0x41, 0xe7, 0xfd, 0xfe, 0xef, 0xff, 0x6f, 0xdf, 0xcb, 0xa0, 0xbd, 0xf0, 0xc3, 0xc8, 0x72, 0x58, - 0x20, 0x39, 0xf3, 0x42, 0xcf, 0x0e, 0x00, 0x26, 0x10, 0x48, 0x61, 0x25, 0x3f, 0x66, 0xc8, 0x99, - 0x64, 0x18, 0xe7, 0x81, 0x16, 0x19, 0x31, 0x36, 0xf2, 0xc0, 0x52, 0xc4, 0x60, 0xfc, 0xd6, 0x92, - 0xae, 0x0f, 0x42, 0xda, 0x7e, 0x98, 0x88, 0x3a, 0xf3, 0x0a, 0xaa, 0x1e, 0x2f, 0x58, 0xfc, 0x02, - 0xed, 0x38, 0x1c, 0x6c, 0x09, 0x43, 0x5d, 0x6b, 0x6b, 0x07, 0x17, 0x8e, 0x5a, 0x66, 0x22, 0x36, - 0x57, 0x62, 0xf3, 0xf5, 0x4a, 0x4c, 0xaf, 0xc5, 0x11, 0x69, 0x2c, 0xf1, 0x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, 0x37, 0xa1, 0x7a, 0x0b, 0x4a, 0xdd, 0xb5, - 0x62, 0xb0, 0xad, 0xee, 0xd4, 0x7b, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x09, 0xe8, 0xfb, 0x3a, - 0xd9, 0x05, 0x00, 0x00, + // 738 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcf, 0x6e, 0xd3, 0x4a, + 0x18, 0xc5, 0xe3, 0xa4, 0x4d, 0x9a, 0xe9, 0x6d, 0x6e, 0x3a, 0xf7, 0x92, 0x9a, 0x14, 0x32, 0x25, + 0x2d, 0xa8, 0xaa, 0x2a, 0x47, 0x2a, 0x82, 0x25, 0xa2, 0x6e, 0xa2, 0x52, 0x8a, 0xdc, 0x34, 0x25, + 0x42, 0xb0, 0x73, 0x9c, 0x69, 0x70, 0x89, 0x3d, 0xc6, 0x9e, 0x44, 0x74, 0xc9, 0x96, 0x15, 0xcf, + 0xc1, 0x0e, 0x36, 0xbc, 0x02, 0xcb, 0x2e, 0x91, 0x90, 0x2c, 0xd4, 0xee, 0xcc, 0x4b, 0x20, 0xcf, + 0x24, 0xa9, 0xff, 0x51, 0x45, 0x2c, 0x10, 0xab, 0x78, 0x66, 0x7e, 0xe7, 0x3b, 0x67, 0x46, 0xf3, + 0xc5, 0x06, 0xab, 0xd6, 0xab, 0x5e, 0x4d, 0x23, 0x26, 0xb5, 0x49, 0xdf, 0xea, 0xab, 0x26, 0xc6, + 0x43, 0x6c, 0x52, 0xa7, 0xc6, 0x7f, 0x24, 0xcb, 0x26, 0x94, 0x40, 0x18, 0x07, 0xca, 0xa8, 0x47, + 0x48, 0xaf, 0x8f, 0x6b, 0x8c, 0xe8, 0x0c, 0x8e, 0x6b, 0x54, 0x37, 0xb0, 0x43, 0x55, 0xc3, 0xe2, + 0xa2, 0xea, 0xe7, 0x2c, 0x98, 0x6d, 0xf8, 0x2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f8, 0x90, 0x5e, 0xdd, 0x66, + 0xeb, 0x4d, 0x4e, 0x4b, 0x7b, 0x44, 0xda, 0xe1, 0x54, 0xd3, 0xa7, 0xd8, 0x2b, 0xdf, 0xe9, 0x64, + 0xd9, 0xab, 0xfd, 0xee, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xd1, 0xf1, 0xaf, 0x60, 0x08, + 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { @@ -555,6 +742,48 @@ func (m *Event_CancelOnExecutor) MarshalToSizedBuffer(dAtA []byte) (int, error) } return len(dAtA) - i, nil } +func (m *Event_PreemptOnQueue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event_PreemptOnQueue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PreemptOnQueue != nil { + { + size, err := m.PreemptOnQueue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *Event_CancelOnQueue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event_CancelOnQueue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.CancelOnQueue != nil { + { + size, err := m.CancelOnQueue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} func (m *ExecutorSettingsUpsert) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -735,6 +964,102 @@ func (m *CancelOnExecutor) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PreemptOnQueue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PreemptOnQueue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreemptOnQueue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PriorityClasses) > 0 { + for iNdEx := len(m.PriorityClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PriorityClasses[iNdEx]) + copy(dAtA[i:], m.PriorityClasses[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PriorityClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CancelOnQueue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelOnQueue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelOnQueue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.JobStates) > 0 { + dAtA9 := make([]byte, len(m.JobStates)*10) + var j8 int + for _, num := range m.JobStates { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintEvents(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0x1a + } + if len(m.PriorityClasses) > 0 { + for iNdEx := len(m.PriorityClasses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PriorityClasses[iNdEx]) + copy(dAtA[i:], m.PriorityClasses[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PriorityClasses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -810,6 +1135,30 @@ func (m *Event_CancelOnExecutor) Size() (n int) { } return n } +func (m *Event_PreemptOnQueue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PreemptOnQueue != nil { + l = m.PreemptOnQueue.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} +func (m *Event_CancelOnQueue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CancelOnQueue != nil { + l = m.CancelOnQueue.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} func (m *ExecutorSettingsUpsert) Size() (n int) { if m == nil { return 0 @@ -897,28 +1246,73 @@ func (m *CancelOnExecutor) Size() (n int) { return n } -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func (m *PreemptOnQueue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.PriorityClasses) > 0 { + for _, s := range m.PriorityClasses { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + return n } -func (m *Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift + +func (m *CancelOnQueue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.PriorityClasses) > 0 { + for _, s := range m.PriorityClasses { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.JobStates) > 0 { + l = 0 + for _, e := range m.JobStates { + l += sovEvents(uint64(e)) + } + n += 1 + sovEvents(uint64(l)) + l + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1108,6 +1502,76 @@ func (m *Event) Unmarshal(dAtA []byte) error { } m.Event = &Event_CancelOnExecutor{v} iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreemptOnQueue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &PreemptOnQueue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Event = &Event_PreemptOnQueue{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CancelOnQueue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &CancelOnQueue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Event = &Event_CancelOnQueue{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -1669,6 +2133,303 @@ func (m *CancelOnExecutor) Unmarshal(dAtA []byte) error { } return nil } +func (m *PreemptOnQueue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PreemptOnQueue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreemptOnQueue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityClasses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriorityClasses = append(m.PriorityClasses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelOnQueue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelOnQueue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelOnQueue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityClasses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriorityClasses = append(m.PriorityClasses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v ActiveJobState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ActiveJobState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.JobStates = append(m.JobStates, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.JobStates) == 0 { + m.JobStates = make([]ActiveJobState, 0, elementCount) + } + for iNdEx < postIndex { + var v ActiveJobState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= ActiveJobState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.JobStates = append(m.JobStates, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field JobStates", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/pkg/controlplaneevents/events.proto b/pkg/controlplaneevents/events.proto index 5c5c3e6d0b3..deac8fdcfb1 100644 --- a/pkg/controlplaneevents/events.proto +++ b/pkg/controlplaneevents/events.proto @@ -13,6 +13,8 @@ message Event { ExecutorSettingsDelete executorSettingsDelete = 3; PreemptOnExecutor preemptOnExecutor = 4; CancelOnExecutor cancelOnExecutor = 5; + PreemptOnQueue preemptOnQueue = 6; + CancelOnQueue cancelOnQueue = 7; } } @@ -38,3 +40,23 @@ message CancelOnExecutor { repeated string queues = 2; repeated string priorityClasses = 3; } + +// A subset of JobState including only non-terminal states +enum ActiveJobState { + UNKNOWN = 0; + QUEUED = 1; + LEASED = 2; + PENDING = 3; + RUNNING = 4; +} + +message PreemptOnQueue { + string name = 1; + repeated string priorityClasses = 2; +} + +message CancelOnQueue { + string name = 1; + repeated string priorityClasses = 2; + repeated ActiveJobState jobStates = 3; +}