diff --git a/client/rust/src/gen/api.rs b/client/rust/src/gen/api.rs index 1575ff527e8..b981c7e25cc 100644 --- a/client/rust/src/gen/api.rs +++ b/client/rust/src/gen/api.rs @@ -320,6 +320,8 @@ pub struct Queue { ::prost::alloc::string::String, ::prost::alloc::string::String, >, + #[prost(string, tag = "11")] + pub retry_policy: ::prost::alloc::string::String, } /// Nested message and enum types in `Queue`. pub mod queue { @@ -387,6 +389,56 @@ pub struct PreemptionResult { ::prost::alloc::string::String, >, } +/// RetryPolicy defines rules that determine whether failed jobs should be retried. +/// Operators create policies and assign them to queues by name. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryPolicy { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag = "2")] + pub retry_limit: u32, + #[prost(enumeration = "RetryAction", tag = "3")] + pub default_action: i32, + #[prost(message, repeated, tag = "4")] + pub rules: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryRule { + #[prost(enumeration = "RetryAction", tag = "1")] + pub action: i32, + #[prost(string, repeated, tag = "2")] + pub on_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag = "3")] + pub on_exit_codes: ::core::option::Option, + #[prost(string, tag = "4")] + pub on_termination_message_pattern: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "5")] + pub on_categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryExitCodeMatcher { + #[prost(enumeration = "ExitCodeOperator", tag = "1")] + pub operator: i32, + #[prost(int32, repeated, tag = "2")] + pub values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryPolicyGetRequest { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryPolicyDeleteRequest { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RetryPolicyListRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetryPolicyList { + #[prost(message, repeated, tag = "1")] + pub retry_policies: ::prost::alloc::vec::Vec, +} /// swagger:model #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueueGetRequest { @@ -595,6 +647,64 @@ impl JobState { } } } +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum RetryAction { + Unspecified = 0, + Fail = 1, + Retry = 2, +} +impl RetryAction { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Unspecified => "RETRY_ACTION_UNSPECIFIED", + Self::Fail => "RETRY_ACTION_FAIL", + Self::Retry => "RETRY_ACTION_RETRY", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RETRY_ACTION_UNSPECIFIED" => Some(Self::Unspecified), + "RETRY_ACTION_FAIL" => Some(Self::Fail), + "RETRY_ACTION_RETRY" => Some(Self::Retry), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ExitCodeOperator { + Unspecified = 0, + In = 1, + NotIn = 2, +} +impl ExitCodeOperator { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Unspecified => "EXIT_CODE_OPERATOR_UNSPECIFIED", + Self::In => "EXIT_CODE_OPERATOR_IN", + Self::NotIn => "EXIT_CODE_OPERATOR_NOT_IN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXIT_CODE_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified), + "EXIT_CODE_OPERATOR_IN" => Some(Self::In), + "EXIT_CODE_OPERATOR_NOT_IN" => Some(Self::NotIn), + _ => None, + } + } +} /// Generated client implementations. pub mod queue_service_client { #![allow( @@ -928,6 +1038,207 @@ pub mod queue_service_client { } } /// Generated client implementations. +pub mod retry_policy_service_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct RetryPolicyServiceClient { + inner: tonic::client::Grpc, + } + impl RetryPolicyServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl RetryPolicyServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> RetryPolicyServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + RetryPolicyServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn create_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.RetryPolicyService/CreateRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.RetryPolicyService", "CreateRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn update_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.RetryPolicyService/UpdateRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.RetryPolicyService", "UpdateRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn delete_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.RetryPolicyService/DeleteRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.RetryPolicyService", "DeleteRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn get_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.RetryPolicyService/GetRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.RetryPolicyService", "GetRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn get_retry_policies( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.RetryPolicyService/GetRetryPolicies", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.RetryPolicyService", "GetRetryPolicies")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated client implementations. pub mod submit_client { #![allow( unused_variables, @@ -1258,6 +1569,113 @@ pub mod submit_client { req.extensions_mut().insert(GrpcMethod::new("api.Submit", "GetQueues")); self.inner.server_streaming(req, path, codec).await } + pub async fn create_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.Submit/CreateRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.Submit", "CreateRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn update_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.Submit/UpdateRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.Submit", "UpdateRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn delete_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.Submit/DeleteRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.Submit", "DeleteRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn get_retry_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.Submit/GetRetryPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("api.Submit", "GetRetryPolicy")); + self.inner.unary(req, path, codec).await + } + pub async fn get_retry_policies( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/api.Submit/GetRetryPolicies", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("api.Submit", "GetRetryPolicies")); + self.inner.unary(req, path, codec).await + } pub async fn health( &mut self, request: impl tonic::IntoRequest<()>, diff --git a/client/scala/armada-scala-client/src/test/scala/io/armadaproject/armada/ArmadaClientSuite.scala b/client/scala/armada-scala-client/src/test/scala/io/armadaproject/armada/ArmadaClientSuite.scala index 4a346e47195..1190dc2d37a 100644 --- a/client/scala/armada-scala-client/src/test/scala/io/armadaproject/armada/ArmadaClientSuite.scala +++ b/client/scala/armada-scala-client/src/test/scala/io/armadaproject/armada/ArmadaClientSuite.scala @@ -20,6 +20,11 @@ import api.submit.{ QueueDeleteRequest, QueueGetRequest, QueueList, + RetryPolicy, + RetryPolicyDeleteRequest, + RetryPolicyGetRequest, + RetryPolicyList, + RetryPolicyListRequest, StreamingQueueGetRequest, StreamingQueueMessage, SubmitGrpc @@ -317,6 +322,36 @@ private class SubmitMockServer( ): scala.concurrent.Future[BatchQueueUpdateResponse] = { Future.successful(new BatchQueueUpdateResponse) } + + def createRetryPolicy( + request: RetryPolicy + ): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + Future.successful(new Empty) + } + + def updateRetryPolicy( + request: RetryPolicy + ): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + Future.successful(new Empty) + } + + def deleteRetryPolicy( + request: RetryPolicyDeleteRequest + ): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + Future.successful(new Empty) + } + + def getRetryPolicy( + request: RetryPolicyGetRequest + ): scala.concurrent.Future[RetryPolicy] = { + Future.failed(new StatusRuntimeException(Status.NOT_FOUND)) + } + + def getRetryPolicies( + request: RetryPolicyListRequest + ): scala.concurrent.Future[RetryPolicyList] = { + Future.successful(new RetryPolicyList) + } } private class JobsMockServer( diff --git a/cmd/armadactl/cmd/commands.go b/cmd/armadactl/cmd/commands.go index 35817ed6b35..1e4dad188a4 100644 --- a/cmd/armadactl/cmd/commands.go +++ b/cmd/armadactl/cmd/commands.go @@ -27,6 +27,7 @@ func createCmd(a *armadactl.App) *cobra.Command { } cmd.Flags().Bool("dry-run", false, "Validate the input file and exit without making any changes.") cmd.AddCommand(queueCreateCmd()) + cmd.AddCommand(retryPolicyCreateCmd()) return cmd } @@ -37,6 +38,7 @@ func deleteCmd() *cobra.Command { Long: "Delete Armada resource. Supported: queue", } cmd.AddCommand(queueDeleteCmd()) + cmd.AddCommand(retryPolicyDeleteCmd()) return cmd } @@ -47,6 +49,7 @@ func updateCmd() *cobra.Command { Long: "Update Armada resource. Supported: queue", } cmd.AddCommand(queueUpdateCmd()) + cmd.AddCommand(retryPolicyUpdateCmd()) return cmd } @@ -59,6 +62,8 @@ func getCmd() *cobra.Command { cmd.AddCommand( queueGetCmd(), queuesGetCmd(), + retryPolicyGetCmd(), + retryPolicyGetAllCmd(), getSchedulingReportCmd(armadactl.New()), getQueueSchedulingReportCmd(armadactl.New()), getJobSchedulingReportCmd(armadactl.New()), diff --git a/cmd/armadactl/cmd/params.go b/cmd/armadactl/cmd/params.go index 1bffacfcb84..135474d293d 100644 --- a/cmd/armadactl/cmd/params.go +++ b/cmd/armadactl/cmd/params.go @@ -8,6 +8,7 @@ import ( ce "github.com/armadaproject/armada/pkg/client/executor" cn "github.com/armadaproject/armada/pkg/client/node" cq "github.com/armadaproject/armada/pkg/client/queue" + crp "github.com/armadaproject/armada/pkg/client/retrypolicy" ) // initParams initialises the command parameters, flags, and a configuration file. @@ -33,6 +34,12 @@ func initParams(cmd *cobra.Command, params *armadactl.Params) error { params.QueueAPI.Preempt = cq.Preempt(client.ExtractCommandlineArmadaApiConnectionDetails) params.QueueAPI.Cancel = cq.Cancel(client.ExtractCommandlineArmadaApiConnectionDetails) + params.RetryPolicyAPI.Create = crp.Create(client.ExtractCommandlineArmadaApiConnectionDetails) + params.RetryPolicyAPI.Delete = crp.Delete(client.ExtractCommandlineArmadaApiConnectionDetails) + params.RetryPolicyAPI.Get = crp.Get(client.ExtractCommandlineArmadaApiConnectionDetails) + params.RetryPolicyAPI.GetAll = crp.GetAll(client.ExtractCommandlineArmadaApiConnectionDetails) + params.RetryPolicyAPI.Update = crp.Update(client.ExtractCommandlineArmadaApiConnectionDetails) + params.ExecutorAPI.Cordon = ce.CordonExecutor(client.ExtractCommandlineArmadaApiConnectionDetails) params.ExecutorAPI.Uncordon = ce.UncordonExecutor(client.ExtractCommandlineArmadaApiConnectionDetails) diff --git a/cmd/armadactl/cmd/queue.go b/cmd/armadactl/cmd/queue.go index 92a74995bd1..5db95eec328 100644 --- a/cmd/armadactl/cmd/queue.go +++ b/cmd/armadactl/cmd/queue.go @@ -63,6 +63,11 @@ Job priority is evaluated inside queue, queue has its own priority. Any labels return fmt.Errorf("error converting queue labels to map: %s", err) } + retryPolicyName, err := cmd.Flags().GetString("retry-policy") + if err != nil { + return fmt.Errorf("error reading retry-policy: %s", err) + } + newQueue, err := queue.NewQueue(&api.Queue{ Name: name, PriorityFactor: priorityFactor, @@ -70,6 +75,7 @@ Job priority is evaluated inside queue, queue has its own priority. Any labels GroupOwners: groups, Cordoned: cordoned, Labels: labelsAsMap, + RetryPolicy: retryPolicyName, }) if err != nil { return fmt.Errorf("invalid queue data: %s", err) @@ -83,6 +89,7 @@ Job priority is evaluated inside queue, queue has its own priority. Any labels cmd.Flags().StringSlice("group-owners", []string{}, "Comma separated list of queue group owners, defaults to empty list.") cmd.Flags().Bool("cordon", false, "Used to pause scheduling on specified queue. Defaults to false.") cmd.Flags().StringSliceP("labels", "l", []string{}, "Comma separated list of key-value queue labels, for example: armadaproject.io/submitter=airflow. Defaults to empty list.") + cmd.Flags().String("retry-policy", "", "Name of the retry policy to assign to this queue.") return cmd } @@ -230,6 +237,11 @@ func queueUpdateCmdWithApp(a *armadactl.App) *cobra.Command { return fmt.Errorf("error converting queue labels to map: %s", err) } + retryPolicyName, err := cmd.Flags().GetString("retry-policy") + if err != nil { + return fmt.Errorf("error reading retry-policy: %s", err) + } + newQueue, err := queue.NewQueue(&api.Queue{ Name: name, PriorityFactor: priorityFactor, @@ -237,6 +249,7 @@ func queueUpdateCmdWithApp(a *armadactl.App) *cobra.Command { GroupOwners: groups, Cordoned: cordoned, Labels: labelsAsMap, + RetryPolicy: retryPolicyName, }) if err != nil { return fmt.Errorf("invalid queue data: %s", err) @@ -251,5 +264,6 @@ func queueUpdateCmdWithApp(a *armadactl.App) *cobra.Command { cmd.Flags().StringSlice("group-owners", []string{}, "Comma separated list of queue group owners, defaults to empty list.") cmd.Flags().Bool("cordon", false, "Used to pause scheduling on specified queue. Defaults to false.") cmd.Flags().StringSliceP("labels", "l", []string{}, "Comma separated list of key-value queue labels, for example: armadaproject.io/submitter=airflow. Defaults to empty list.") + cmd.Flags().String("retry-policy", "", "Name of the retry policy to assign to this queue.") return cmd } diff --git a/cmd/armadactl/cmd/retrypolicy.go b/cmd/armadactl/cmd/retrypolicy.go new file mode 100644 index 00000000000..35a629a82c0 --- /dev/null +++ b/cmd/armadactl/cmd/retrypolicy.go @@ -0,0 +1,123 @@ +package cmd + +import ( + "github.com/spf13/cobra" + + "github.com/armadaproject/armada/internal/armadactl" +) + +func retryPolicyCreateCmd() *cobra.Command { + return retryPolicyCreateCmdWithApp(armadactl.New()) +} + +func retryPolicyCreateCmdWithApp(a *armadactl.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "retry-policy", + Short: "Create a retry policy from a YAML/JSON file", + Long: "Create a retry policy that defines rules for whether failed jobs should be retried.", + Args: cobra.NoArgs, + PreRunE: func(cmd *cobra.Command, args []string) error { + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, args []string) error { + filePath, err := cmd.Flags().GetString("file") + if err != nil { + return err + } + return a.CreateRetryPolicyFromFile(filePath) + }, + } + cmd.Flags().StringP("file", "f", "", "Path to YAML/JSON file defining the retry policy.") + if err := cmd.MarkFlagRequired("file"); err != nil { + panic(err) + } + return cmd +} + +func retryPolicyUpdateCmd() *cobra.Command { + return retryPolicyUpdateCmdWithApp(armadactl.New()) +} + +func retryPolicyUpdateCmdWithApp(a *armadactl.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "retry-policy", + Short: "Update a retry policy from a YAML/JSON file", + Long: "Update an existing retry policy with the definition from a YAML/JSON file.", + Args: cobra.NoArgs, + PreRunE: func(cmd *cobra.Command, args []string) error { + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, args []string) error { + filePath, err := cmd.Flags().GetString("file") + if err != nil { + return err + } + return a.UpdateRetryPolicyFromFile(filePath) + }, + } + cmd.Flags().StringP("file", "f", "", "Path to YAML/JSON file defining the retry policy.") + if err := cmd.MarkFlagRequired("file"); err != nil { + panic(err) + } + return cmd +} + +func retryPolicyGetCmd() *cobra.Command { + return retryPolicyGetCmdWithApp(armadactl.New()) +} + +func retryPolicyGetCmdWithApp(a *armadactl.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "retry-policy ", + Short: "Get a retry policy by name", + Long: "Get the definition of a retry policy by its name.", + Args: cobra.ExactArgs(1), + PreRunE: func(cmd *cobra.Command, args []string) error { + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, args []string) error { + return a.GetRetryPolicy(args[0]) + }, + } + return cmd +} + +func retryPolicyGetAllCmd() *cobra.Command { + return retryPolicyGetAllCmdWithApp(armadactl.New()) +} + +func retryPolicyGetAllCmdWithApp(a *armadactl.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "retry-policies", + Short: "List all retry policies", + Long: "List all retry policies defined in the system.", + Args: cobra.NoArgs, + PreRunE: func(cmd *cobra.Command, args []string) error { + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, args []string) error { + return a.GetAllRetryPolicies() + }, + } + return cmd +} + +func retryPolicyDeleteCmd() *cobra.Command { + return retryPolicyDeleteCmdWithApp(armadactl.New()) +} + +func retryPolicyDeleteCmdWithApp(a *armadactl.App) *cobra.Command { + cmd := &cobra.Command{ + Use: "retry-policy ", + Short: "Delete a retry policy by name", + Long: "Delete an existing retry policy by its name.", + Args: cobra.ExactArgs(1), + PreRunE: func(cmd *cobra.Command, args []string) error { + return initParams(cmd, a.Params) + }, + RunE: func(cmd *cobra.Command, args []string) error { + return a.DeleteRetryPolicy(args[0]) + }, + } + return cmd +} diff --git a/internal/armadactl/app.go b/internal/armadactl/app.go index 24caa113a02..962f77f1c1d 100644 --- a/internal/armadactl/app.go +++ b/internal/armadactl/app.go @@ -21,6 +21,7 @@ import ( "github.com/armadaproject/armada/pkg/client/executor" "github.com/armadaproject/armada/pkg/client/node" "github.com/armadaproject/armada/pkg/client/queue" + "github.com/armadaproject/armada/pkg/client/retrypolicy" ) type App struct { @@ -41,6 +42,7 @@ type App struct { type Params struct { ApiConnectionDetails *client.ApiConnectionDetails QueueAPI *QueueAPI + RetryPolicyAPI *RetryPolicyAPI ExecutorAPI *ExecutorAPI NodeAPI *NodeAPI } @@ -69,6 +71,14 @@ type ExecutorAPI struct { PreemptOnExecutor executor.PreemptAPI } +type RetryPolicyAPI struct { + Create retrypolicy.CreateAPI + Delete retrypolicy.DeleteAPI + Get retrypolicy.GetAPI + GetAll retrypolicy.GetAllAPI + Update retrypolicy.UpdateAPI +} + type NodeAPI struct { PreemptOnNode node.PreemptAPI CancelOnNode node.CancelAPI @@ -79,9 +89,10 @@ type NodeAPI struct { func New() *App { return &App{ Params: &Params{ - QueueAPI: &QueueAPI{}, - ExecutorAPI: &ExecutorAPI{}, - NodeAPI: &NodeAPI{}, + QueueAPI: &QueueAPI{}, + RetryPolicyAPI: &RetryPolicyAPI{}, + ExecutorAPI: &ExecutorAPI{}, + NodeAPI: &NodeAPI{}, }, Out: os.Stdout, Random: rand.Reader, diff --git a/internal/armadactl/queue.go b/internal/armadactl/queue.go index b5b7cf75be1..bf802581bc9 100644 --- a/internal/armadactl/queue.go +++ b/internal/armadactl/queue.go @@ -55,6 +55,14 @@ func (a *App) CreateResource(fileName string, dryRun bool) error { if !dryRun { return a.Params.QueueAPI.Create(queue) } + case client.ResourceKindRetryPolicy: + policy := &api.RetryPolicy{} + if err := util.BindJsonOrYaml(fileName, policy); err != nil { + return errors.Errorf("file %s error: %s", fileName, err) + } + if !dryRun { + return a.Params.RetryPolicyAPI.Create(policy) + } default: return errors.Errorf("invalid resource kind: %s", resource.Kind) } diff --git a/internal/armadactl/retrypolicy.go b/internal/armadactl/retrypolicy.go new file mode 100644 index 00000000000..818b9afdb7a --- /dev/null +++ b/internal/armadactl/retrypolicy.go @@ -0,0 +1,89 @@ +package armadactl + +import ( + "fmt" + + "github.com/pkg/errors" + "sigs.k8s.io/yaml" + + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" + "github.com/armadaproject/armada/pkg/client/util" +) + +func (a *App) CreateRetryPolicy(policy *api.RetryPolicy) error { + if err := a.Params.RetryPolicyAPI.Create(policy); err != nil { + return errors.Errorf("error creating retry policy %s: %s", policy.Name, err) + } + fmt.Fprintf(a.Out, "Created retry policy %s\n", policy.Name) + return nil +} + +func (a *App) CreateRetryPolicyFromFile(fileName string) error { + policy := &api.RetryPolicy{} + if err := util.BindJsonOrYaml(fileName, policy); err != nil { + return errors.Errorf("file %s error: %s", fileName, err) + } + return a.CreateRetryPolicy(policy) +} + +func (a *App) UpdateRetryPolicy(policy *api.RetryPolicy) error { + if err := a.Params.RetryPolicyAPI.Update(policy); err != nil { + return errors.Errorf("error updating retry policy %s: %s", policy.Name, err) + } + fmt.Fprintf(a.Out, "Updated retry policy %s\n", policy.Name) + return nil +} + +func (a *App) UpdateRetryPolicyFromFile(fileName string) error { + policy := &api.RetryPolicy{} + if err := util.BindJsonOrYaml(fileName, policy); err != nil { + return errors.Errorf("file %s error: %s", fileName, err) + } + return a.UpdateRetryPolicy(policy) +} + +func (a *App) DeleteRetryPolicy(name string) error { + if err := a.Params.RetryPolicyAPI.Delete(name); err != nil { + return errors.Errorf("error deleting retry policy %s: %s", name, err) + } + fmt.Fprintf(a.Out, "Deleted retry policy %s (or it did not exist)\n", name) + return nil +} + +func (a *App) GetRetryPolicy(name string) error { + policy, err := a.Params.RetryPolicyAPI.Get(name) + if err != nil { + return errors.Errorf("error getting retry policy %s: %s", name, err) + } + b, err := yaml.Marshal(policy) + if err != nil { + return errors.Errorf("error marshalling retry policy %s: %s", name, err) + } + fmt.Fprint(a.Out, retryPolicyHeaderYaml()+string(b)) + return nil +} + +func (a *App) GetAllRetryPolicies() error { + policies, err := a.Params.RetryPolicyAPI.GetAll() + if err != nil { + return errors.Errorf("error getting retry policies: %s", err) + } + b, err := yaml.Marshal(policies) + if err != nil { + return errors.Errorf("error marshalling retry policies: %s", err) + } + fmt.Fprint(a.Out, retryPolicyHeaderYaml()+string(b)) + return nil +} + +func retryPolicyHeaderYaml() string { + b, err := yaml.Marshal(client.Resource{ + Version: client.APIVersionV1, + Kind: client.ResourceKindRetryPolicy, + }) + if err != nil { + panic(err) + } + return string(b) +} diff --git a/internal/lookout/schema/migrations/032_create_retry_policy.sql b/internal/lookout/schema/migrations/032_create_retry_policy.sql new file mode 100644 index 00000000000..3455aceadf0 --- /dev/null +++ b/internal/lookout/schema/migrations/032_create_retry_policy.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS retry_policy +( + name text NOT NULL PRIMARY KEY, + definition bytea NOT NULL +) diff --git a/internal/scheduler/mocks/api.go b/internal/scheduler/mocks/api.go index 53e533daafd..bb291f9daeb 100644 --- a/internal/scheduler/mocks/api.go +++ b/internal/scheduler/mocks/api.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -destination=./api.go -package=schedulermocks github.com/armadaproject/armada/pkg/api SubmitClient,Submit_GetQueuesClient +// mockgen -destination=./internal/scheduler/mocks/api.go -package=schedulermocks github.com/armadaproject/armada/pkg/api SubmitClient,Submit_GetQueuesClient // // Package schedulermocks is a generated GoMock package. @@ -124,6 +124,26 @@ func (mr *MockSubmitClientMockRecorder) CreateQueues(ctx, in any, opts ...any) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateQueues", reflect.TypeOf((*MockSubmitClient)(nil).CreateQueues), varargs...) } +// CreateRetryPolicy mocks base method. +func (m *MockSubmitClient) CreateRetryPolicy(ctx context.Context, in *api.RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateRetryPolicy", varargs...) + ret0, _ := ret[0].(*types.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateRetryPolicy indicates an expected call of CreateRetryPolicy. +func (mr *MockSubmitClientMockRecorder) CreateRetryPolicy(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRetryPolicy", reflect.TypeOf((*MockSubmitClient)(nil).CreateRetryPolicy), varargs...) +} + // DeleteQueue mocks base method. func (m *MockSubmitClient) DeleteQueue(ctx context.Context, in *api.QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { m.ctrl.T.Helper() @@ -144,6 +164,26 @@ func (mr *MockSubmitClientMockRecorder) DeleteQueue(ctx, in any, opts ...any) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteQueue", reflect.TypeOf((*MockSubmitClient)(nil).DeleteQueue), varargs...) } +// DeleteRetryPolicy mocks base method. +func (m *MockSubmitClient) DeleteRetryPolicy(ctx context.Context, in *api.RetryPolicyDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteRetryPolicy", varargs...) + ret0, _ := ret[0].(*types.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteRetryPolicy indicates an expected call of DeleteRetryPolicy. +func (mr *MockSubmitClientMockRecorder) DeleteRetryPolicy(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRetryPolicy", reflect.TypeOf((*MockSubmitClient)(nil).DeleteRetryPolicy), varargs...) +} + // GetQueue mocks base method. func (m *MockSubmitClient) GetQueue(ctx context.Context, in *api.QueueGetRequest, opts ...grpc.CallOption) (*api.Queue, error) { m.ctrl.T.Helper() @@ -184,6 +224,46 @@ func (mr *MockSubmitClientMockRecorder) GetQueues(ctx, in any, opts ...any) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueues", reflect.TypeOf((*MockSubmitClient)(nil).GetQueues), varargs...) } +// GetRetryPolicies mocks base method. +func (m *MockSubmitClient) GetRetryPolicies(ctx context.Context, in *api.RetryPolicyListRequest, opts ...grpc.CallOption) (*api.RetryPolicyList, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRetryPolicies", varargs...) + ret0, _ := ret[0].(*api.RetryPolicyList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRetryPolicies indicates an expected call of GetRetryPolicies. +func (mr *MockSubmitClientMockRecorder) GetRetryPolicies(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRetryPolicies", reflect.TypeOf((*MockSubmitClient)(nil).GetRetryPolicies), varargs...) +} + +// GetRetryPolicy mocks base method. +func (m *MockSubmitClient) GetRetryPolicy(ctx context.Context, in *api.RetryPolicyGetRequest, opts ...grpc.CallOption) (*api.RetryPolicy, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRetryPolicy", varargs...) + ret0, _ := ret[0].(*api.RetryPolicy) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRetryPolicy indicates an expected call of GetRetryPolicy. +func (mr *MockSubmitClientMockRecorder) GetRetryPolicy(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRetryPolicy", reflect.TypeOf((*MockSubmitClient)(nil).GetRetryPolicy), varargs...) +} + // Health mocks base method. func (m *MockSubmitClient) Health(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*api.HealthCheckResponse, error) { m.ctrl.T.Helper() @@ -304,6 +384,26 @@ func (mr *MockSubmitClientMockRecorder) UpdateQueues(ctx, in any, opts ...any) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateQueues", reflect.TypeOf((*MockSubmitClient)(nil).UpdateQueues), varargs...) } +// UpdateRetryPolicy mocks base method. +func (m *MockSubmitClient) UpdateRetryPolicy(ctx context.Context, in *api.RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "UpdateRetryPolicy", varargs...) + ret0, _ := ret[0].(*types.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateRetryPolicy indicates an expected call of UpdateRetryPolicy. +func (mr *MockSubmitClientMockRecorder) UpdateRetryPolicy(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRetryPolicy", reflect.TypeOf((*MockSubmitClient)(nil).UpdateRetryPolicy), varargs...) +} + // MockSubmit_GetQueuesClient is a mock of Submit_GetQueuesClient interface. type MockSubmit_GetQueuesClient struct { ctrl *gomock.Controller diff --git a/internal/server/executor/executor_server_test.go b/internal/server/executor/executor_server_test.go index 6d96b55dead..c50db5f5af6 100644 --- a/internal/server/executor/executor_server_test.go +++ b/internal/server/executor/executor_server_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" "google.golang.org/grpc/codes" - grpcstatus "google.golang.org/grpc/status" clocktesting "k8s.io/utils/clock/testing" "github.com/armadaproject/armada/internal/common/armadacontext" @@ -20,6 +19,7 @@ import ( protoutil "github.com/armadaproject/armada/internal/common/proto" servermocks "github.com/armadaproject/armada/internal/server/mocks" "github.com/armadaproject/armada/internal/server/permissions" + "github.com/armadaproject/armada/internal/server/servertest" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/controlplaneevents" ) @@ -40,13 +40,6 @@ func newExecutorTestServer(t *testing.T) (*Server, *executorTestMocks) { return s, m } -func requireGrpcCode(t *testing.T, err error, code codes.Code) { - t.Helper() - st, ok := grpcstatus.FromError(err) - require.True(t, ok, "expected gRPC status error") - assert.Equal(t, code, st.Code()) -} - func TestUpsertExecutorSettings_PermissionDenied(t *testing.T) { s, m := newExecutorTestServer(t) grpcCtx := armadacontext.Background() @@ -59,7 +52,7 @@ func TestUpsertExecutorSettings_PermissionDenied(t *testing.T) { _, err := s.UpsertExecutorSettings(grpcCtx, &api.ExecutorSettingsUpsertRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestUpsertExecutorSettings_AuthorizeErrorUnavailable(t *testing.T) { @@ -74,7 +67,7 @@ func TestUpsertExecutorSettings_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.UpsertExecutorSettings(grpcCtx, &api.ExecutorSettingsUpsertRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Unavailable) + servertest.RequireGrpcCode(t, err, codes.Unavailable) } func TestUpsertExecutorSettings_ValidationName(t *testing.T) { @@ -125,7 +118,7 @@ func TestUpsertExecutorSettings_PublishErrorInternal(t *testing.T) { _, err := s.UpsertExecutorSettings(grpcCtx, &api.ExecutorSettingsUpsertRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestUpsertExecutorSettings_SuccessPublishesExpectedEvent(t *testing.T) { @@ -186,7 +179,7 @@ func TestDeleteExecutorSettings_PermissionDenied(t *testing.T) { _, err := s.DeleteExecutorSettings(grpcCtx, &api.ExecutorSettingsDeleteRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestDeleteExecutorSettings_AuthorizeErrorUnavailable(t *testing.T) { @@ -201,7 +194,7 @@ func TestDeleteExecutorSettings_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.DeleteExecutorSettings(grpcCtx, &api.ExecutorSettingsDeleteRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Unavailable) + servertest.RequireGrpcCode(t, err, codes.Unavailable) } func TestDeleteExecutorSettings_ValidationName(t *testing.T) { @@ -237,7 +230,7 @@ func TestDeleteExecutorSettings_PublishErrorInternal(t *testing.T) { _, err := s.DeleteExecutorSettings(grpcCtx, &api.ExecutorSettingsDeleteRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestDeleteExecutorSettings_SuccessPublishesExpectedEvent(t *testing.T) { @@ -288,7 +281,7 @@ func TestPreemptOnExecutor_PermissionDenied(t *testing.T) { _, err := s.PreemptOnExecutor(grpcCtx, &api.ExecutorPreemptRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestPreemptOnExecutor_AuthorizeErrorUnavailable(t *testing.T) { @@ -303,7 +296,7 @@ func TestPreemptOnExecutor_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.PreemptOnExecutor(grpcCtx, &api.ExecutorPreemptRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Unavailable) + servertest.RequireGrpcCode(t, err, codes.Unavailable) } func TestPreemptOnExecutor_ValidationName(t *testing.T) { @@ -339,7 +332,7 @@ func TestPreemptOnExecutor_PublishErrorInternal(t *testing.T) { _, err := s.PreemptOnExecutor(grpcCtx, &api.ExecutorPreemptRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestPreemptOnExecutor_SuccessPublishesExpectedEvent(t *testing.T) { @@ -392,7 +385,7 @@ func TestCancelOnExecutor_PermissionDenied(t *testing.T) { _, err := s.CancelOnExecutor(grpcCtx, &api.ExecutorCancelRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestCancelOnExecutor_AuthorizeErrorUnavailable(t *testing.T) { @@ -407,7 +400,7 @@ func TestCancelOnExecutor_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.CancelOnExecutor(grpcCtx, &api.ExecutorCancelRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Unavailable) + servertest.RequireGrpcCode(t, err, codes.Unavailable) } func TestCancelOnExecutor_ValidationName(t *testing.T) { @@ -443,7 +436,7 @@ func TestCancelOnExecutor_PublishErrorInternal(t *testing.T) { _, err := s.CancelOnExecutor(grpcCtx, &api.ExecutorCancelRequest{Name: "executor-1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestCancelOnExecutor_SuccessPublishesExpectedEvent(t *testing.T) { diff --git a/internal/server/mocks/generate.go b/internal/server/mocks/generate.go index 2efeadc2e72..de0fff32137 100644 --- a/internal/server/mocks/generate.go +++ b/internal/server/mocks/generate.go @@ -4,3 +4,4 @@ package mocks //go:generate mockgen -destination=./mock_deduplicator.go -package=mocks "github.com/armadaproject/armada/internal/server/submit" Deduplicator //go:generate mockgen -destination=./mock_authorizer.go -package=mocks "github.com/armadaproject/armada/internal/common/auth" ActionAuthorizer //go:generate mockgen -destination=./mock_repository.go -package=mocks "github.com/armadaproject/armada/internal/server/queue" QueueRepository +//go:generate mockgen -destination=./mock_retry_policy_repository.go -package=mocks "github.com/armadaproject/armada/internal/server/retrypolicy" RetryPolicyRepository diff --git a/internal/server/mocks/mock_retry_policy_repository.go b/internal/server/mocks/mock_retry_policy_repository.go new file mode 100644 index 00000000000..9bab4bac379 --- /dev/null +++ b/internal/server/mocks/mock_retry_policy_repository.go @@ -0,0 +1,108 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/armadaproject/armada/internal/server/retrypolicy (interfaces: RetryPolicyRepository) + +package mocks + +import ( + reflect "reflect" + + armadacontext "github.com/armadaproject/armada/internal/common/armadacontext" + api "github.com/armadaproject/armada/pkg/api" + gomock "go.uber.org/mock/gomock" +) + +// MockRetryPolicyRepository is a mock of RetryPolicyRepository interface. +type MockRetryPolicyRepository struct { + ctrl *gomock.Controller + recorder *MockRetryPolicyRepositoryMockRecorder + isgomock struct{} +} + +// MockRetryPolicyRepositoryMockRecorder is the mock recorder for MockRetryPolicyRepository. +type MockRetryPolicyRepositoryMockRecorder struct { + mock *MockRetryPolicyRepository +} + +// NewMockRetryPolicyRepository creates a new mock instance. +func NewMockRetryPolicyRepository(ctrl *gomock.Controller) *MockRetryPolicyRepository { + mock := &MockRetryPolicyRepository{ctrl: ctrl} + mock.recorder = &MockRetryPolicyRepositoryMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockRetryPolicyRepository) EXPECT() *MockRetryPolicyRepositoryMockRecorder { + return m.recorder +} + +// CreateRetryPolicy mocks base method. +func (m *MockRetryPolicyRepository) CreateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateRetryPolicy", ctx, policy) + ret0, _ := ret[0].(error) + return ret0 +} + +// CreateRetryPolicy indicates an expected call of CreateRetryPolicy. +func (mr *MockRetryPolicyRepositoryMockRecorder) CreateRetryPolicy(ctx, policy any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRetryPolicy", reflect.TypeOf((*MockRetryPolicyRepository)(nil).CreateRetryPolicy), ctx, policy) +} + +// DeleteRetryPolicy mocks base method. +func (m *MockRetryPolicyRepository) DeleteRetryPolicy(ctx *armadacontext.Context, name string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteRetryPolicy", ctx, name) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteRetryPolicy indicates an expected call of DeleteRetryPolicy. +func (mr *MockRetryPolicyRepositoryMockRecorder) DeleteRetryPolicy(ctx, name any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRetryPolicy", reflect.TypeOf((*MockRetryPolicyRepository)(nil).DeleteRetryPolicy), ctx, name) +} + +// GetAllRetryPolicies mocks base method. +func (m *MockRetryPolicyRepository) GetAllRetryPolicies(ctx *armadacontext.Context) ([]*api.RetryPolicy, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllRetryPolicies", ctx) + ret0, _ := ret[0].([]*api.RetryPolicy) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllRetryPolicies indicates an expected call of GetAllRetryPolicies. +func (mr *MockRetryPolicyRepositoryMockRecorder) GetAllRetryPolicies(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllRetryPolicies", reflect.TypeOf((*MockRetryPolicyRepository)(nil).GetAllRetryPolicies), ctx) +} + +// GetRetryPolicy mocks base method. +func (m *MockRetryPolicyRepository) GetRetryPolicy(ctx *armadacontext.Context, name string) (*api.RetryPolicy, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRetryPolicy", ctx, name) + ret0, _ := ret[0].(*api.RetryPolicy) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRetryPolicy indicates an expected call of GetRetryPolicy. +func (mr *MockRetryPolicyRepositoryMockRecorder) GetRetryPolicy(ctx, name any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRetryPolicy", reflect.TypeOf((*MockRetryPolicyRepository)(nil).GetRetryPolicy), ctx, name) +} + +// UpdateRetryPolicy mocks base method. +func (m *MockRetryPolicyRepository) UpdateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateRetryPolicy", ctx, policy) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateRetryPolicy indicates an expected call of UpdateRetryPolicy. +func (mr *MockRetryPolicyRepositoryMockRecorder) UpdateRetryPolicy(ctx, policy any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRetryPolicy", reflect.TypeOf((*MockRetryPolicyRepository)(nil).UpdateRetryPolicy), ctx, policy) +} diff --git a/internal/server/node/node_test.go b/internal/server/node/node_test.go index 4929053e873..e4c66ab4fce 100644 --- a/internal/server/node/node_test.go +++ b/internal/server/node/node_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" "google.golang.org/grpc/codes" - grpcstatus "google.golang.org/grpc/status" clocktesting "k8s.io/utils/clock/testing" "github.com/armadaproject/armada/internal/common/armadacontext" @@ -19,6 +18,7 @@ import ( protoutil "github.com/armadaproject/armada/internal/common/proto" servermocks "github.com/armadaproject/armada/internal/server/mocks" "github.com/armadaproject/armada/internal/server/permissions" + "github.com/armadaproject/armada/internal/server/servertest" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/controlplaneevents" ) @@ -39,13 +39,6 @@ func newTestServer(t *testing.T) (*Server, *testMocks) { return s, m } -func requireGrpcCode(t *testing.T, err error, code codes.Code) { - t.Helper() - st, ok := grpcstatus.FromError(err) - require.True(t, ok, "expected gRPC status error") - assert.Equal(t, code, st.Code()) -} - func TestPreemptOnNode_PermissionDenied(t *testing.T) { s, m := newTestServer(t) ctx := armadacontext.Background() @@ -58,7 +51,7 @@ func TestPreemptOnNode_PermissionDenied(t *testing.T) { _, err := s.PreemptOnNode(ctx, &api.NodePreemptRequest{Name: "executor-1", Executor: "executor-id"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestPreemptOnNode_AuthorizeErrorUnavailable(t *testing.T) { @@ -73,7 +66,7 @@ func TestPreemptOnNode_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.PreemptOnNode(ctx, &api.NodePreemptRequest{Name: "executor-1", Executor: "executor-id"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestPreemptOnNode_Validation(t *testing.T) { @@ -109,7 +102,7 @@ func TestPreemptOnNode_PublishErrorInternal(t *testing.T) { _, err := s.PreemptOnNode(ctx, &api.NodePreemptRequest{Name: "executor-1", Executor: "executor-id"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestPreemptOnNode_SuccessPublishesExpectedEvent(t *testing.T) { @@ -168,7 +161,7 @@ func TestCancelOnNode_PermissionDenied(t *testing.T) { _, err := s.CancelOnNode(ctx, &api.NodeCancelRequest{Name: "executor-1", Executor: "executor-id"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestCancelOnNode_AuthorizeErrorUnavailable(t *testing.T) { @@ -183,7 +176,7 @@ func TestCancelOnNode_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.CancelOnNode(ctx, &api.NodeCancelRequest{Name: "executor-1", Executor: "executor-id"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestCancelOnNode_Validation(t *testing.T) { @@ -219,7 +212,7 @@ func TestCancelOnNode_PublishErrorInternal(t *testing.T) { _, err := s.CancelOnNode(ctx, &api.NodeCancelRequest{Name: "executor-1", Executor: "executor-id"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestCancelOnNode_SuccessPublishesExpectedEvent(t *testing.T) { diff --git a/internal/server/permissions/permissions.go b/internal/server/permissions/permissions.go index 21b06426b26..3a11183c4ad 100644 --- a/internal/server/permissions/permissions.go +++ b/internal/server/permissions/permissions.go @@ -17,4 +17,7 @@ const ( CordonNodes = "cordon_nodes" ExecuteJobs = "execute_jobs" UpdateExecutorSettings = "update_executor_settings" + CreateRetryPolicy = "create_retry_policy" + UpdateRetryPolicy = "update_retry_policy" + DeleteRetryPolicy = "delete_retry_policy" ) diff --git a/internal/server/queryapi/database/models.go b/internal/server/queryapi/database/models.go index 78f16891882..2f13ba760b9 100644 --- a/internal/server/queryapi/database/models.go +++ b/internal/server/queryapi/database/models.go @@ -71,3 +71,8 @@ type Queue struct { Name string `db:"name"` Definition []byte `db:"definition"` } + +type RetryPolicy struct { + Name string `db:"name"` + Definition []byte `db:"definition"` +} diff --git a/internal/server/queue/queue_service_test.go b/internal/server/queue/queue_service_test.go index f0dc7ff2885..71497e279f0 100644 --- a/internal/server/queue/queue_service_test.go +++ b/internal/server/queue/queue_service_test.go @@ -12,7 +12,6 @@ import ( "go.uber.org/mock/gomock" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" - grpcstatus "google.golang.org/grpc/status" clocktesting "k8s.io/utils/clock/testing" "github.com/armadaproject/armada/internal/common/armadacontext" @@ -23,6 +22,7 @@ import ( protoutil "github.com/armadaproject/armada/internal/common/proto" servermocks "github.com/armadaproject/armada/internal/server/mocks" "github.com/armadaproject/armada/internal/server/permissions" + "github.com/armadaproject/armada/internal/server/servertest" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/client/queue" "github.com/armadaproject/armada/pkg/controlplaneevents" @@ -46,13 +46,6 @@ func newTestQueueServer(t *testing.T) (*Server, *queueServiceTestMocks) { return s, m } -func requireGrpcCode(t *testing.T, err error, code codes.Code) { - t.Helper() - st, ok := grpcstatus.FromError(err) - require.True(t, ok, "expected gRPC status error") - assert.Equal(t, code, st.Code()) -} - func TestCreateQueue_PermissionDenied(t *testing.T) { s, m := newTestQueueServer(t) ctx := armadacontext.Background() @@ -65,7 +58,7 @@ func TestCreateQueue_PermissionDenied(t *testing.T) { _, err := s.CreateQueue(ctx, &api.Queue{Name: "q1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.PermissionDenied) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) } func TestCreateQueue_AuthorizeErrorUnavailable(t *testing.T) { @@ -80,7 +73,7 @@ func TestCreateQueue_AuthorizeErrorUnavailable(t *testing.T) { _, err := s.CreateQueue(ctx, &api.Queue{Name: "q1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.Unavailable) + servertest.RequireGrpcCode(t, err, codes.Unavailable) } func TestCreateQueue_DefaultsUserOwnerFromPrincipal(t *testing.T) { @@ -132,7 +125,7 @@ func TestCreateQueue_ValidationInvalidArgument(t *testing.T) { _, err := s.CreateQueue(ctx, &api.Queue{Name: "q1", PriorityFactor: 1, Labels: map[string]string{"k": ""}}) require.Error(t, err) - requireGrpcCode(t, err, codes.InvalidArgument) + servertest.RequireGrpcCode(t, err, codes.InvalidArgument) } func TestCreateQueue_AlreadyExists(t *testing.T) { @@ -153,7 +146,7 @@ func TestCreateQueue_AlreadyExists(t *testing.T) { _, err := s.CreateQueue(ctx, &api.Queue{Name: "q1", PriorityFactor: 1}) require.Error(t, err) - requireGrpcCode(t, err, codes.AlreadyExists) + servertest.RequireGrpcCode(t, err, codes.AlreadyExists) } func TestUpdateQueue_NotFound(t *testing.T) { @@ -174,7 +167,7 @@ func TestUpdateQueue_NotFound(t *testing.T) { _, err := s.UpdateQueue(ctx, &api.Queue{Name: "q1", PriorityFactor: 1}) require.Error(t, err) - requireGrpcCode(t, err, codes.NotFound) + servertest.RequireGrpcCode(t, err, codes.NotFound) } func TestDeleteQueue_RepoErrorInvalidArgument(t *testing.T) { @@ -195,7 +188,7 @@ func TestDeleteQueue_RepoErrorInvalidArgument(t *testing.T) { _, err := s.DeleteQueue(ctx, &api.QueueDeleteRequest{Name: "q1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.InvalidArgument) + servertest.RequireGrpcCode(t, err, codes.InvalidArgument) } func TestGetQueue_NotFound(t *testing.T) { @@ -210,7 +203,7 @@ func TestGetQueue_NotFound(t *testing.T) { _, err := s.GetQueue(ctx, &api.QueueGetRequest{Name: "q1"}) require.Error(t, err) - requireGrpcCode(t, err, codes.NotFound) + servertest.RequireGrpcCode(t, err, codes.NotFound) } type fakeQueueStream struct { @@ -289,7 +282,7 @@ func TestCancelOnQueue_PublishErrorInternal(t *testing.T) { _, err := s.CancelOnQueue(ctx, &api.QueueCancelRequest{Name: "q1", JobStates: []api.JobState{api.JobState_RUNNING}}) require.Error(t, err) - requireGrpcCode(t, err, codes.Internal) + servertest.RequireGrpcCode(t, err, codes.Internal) } func TestCancelOnQueue_SuccessPublishesExpectedEvent(t *testing.T) { diff --git a/internal/server/retrypolicy/repository.go b/internal/server/retrypolicy/repository.go new file mode 100644 index 00000000000..4ae70dbf05f --- /dev/null +++ b/internal/server/retrypolicy/repository.go @@ -0,0 +1,145 @@ +package retrypolicy + +import ( + "fmt" + + "github.com/gogo/protobuf/proto" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgxpool" + "github.com/pkg/errors" + + "github.com/armadaproject/armada/internal/common/armadacontext" + "github.com/armadaproject/armada/pkg/api" +) + +type ErrRetryPolicyNotFound struct { + Name string +} + +func (err *ErrRetryPolicyNotFound) Error() string { + return fmt.Sprintf("could not find retry policy %q", err.Name) +} + +type ErrRetryPolicyAlreadyExists struct { + Name string +} + +func (err *ErrRetryPolicyAlreadyExists) Error() string { + return fmt.Sprintf("retry policy %s already exists", err.Name) +} + +type RetryPolicyRepository interface { + GetAllRetryPolicies(ctx *armadacontext.Context) ([]*api.RetryPolicy, error) + GetRetryPolicy(ctx *armadacontext.Context, name string) (*api.RetryPolicy, error) + CreateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error + UpdateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error + DeleteRetryPolicy(ctx *armadacontext.Context, name string) error +} + +type PostgresRetryPolicyRepository struct { + db *pgxpool.Pool +} + +func NewPostgresRetryPolicyRepository(db *pgxpool.Pool) *PostgresRetryPolicyRepository { + return &PostgresRetryPolicyRepository{db: db} +} + +func (r *PostgresRetryPolicyRepository) GetAllRetryPolicies(ctx *armadacontext.Context) ([]*api.RetryPolicy, error) { + rows, err := r.db.Query(ctx, "SELECT definition FROM retry_policy ORDER BY name") + if err != nil { + return nil, errors.WithStack(err) + } + defer rows.Close() + + var policies []*api.RetryPolicy + for rows.Next() { + var definitionBytes []byte + err := rows.Scan(&definitionBytes) + if err != nil { + return nil, errors.WithStack(err) + } + policy, err := unmarshalRetryPolicy(definitionBytes) + if err != nil { + return nil, errors.WithStack(err) + } + policies = append(policies, policy) + } + + if err := rows.Err(); err != nil { + return nil, errors.WithStack(err) + } + return policies, nil +} + +func (r *PostgresRetryPolicyRepository) GetRetryPolicy(ctx *armadacontext.Context, name string) (*api.RetryPolicy, error) { + var definitionBytes []byte + query := "SELECT definition FROM retry_policy WHERE name = $1" + + err := r.db.QueryRow(ctx, query, name).Scan(&definitionBytes) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return nil, &ErrRetryPolicyNotFound{Name: name} + } + return nil, errors.WithStack(err) + } + + policy, err := unmarshalRetryPolicy(definitionBytes) + if err != nil { + return nil, errors.WithStack(err) + } + return policy, nil +} + +func (r *PostgresRetryPolicyRepository) CreateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error { + data, err := proto.Marshal(policy) + if err != nil { + return errors.WithStack(err) + } + + query := "INSERT INTO retry_policy (name, definition) VALUES ($1, $2) ON CONFLICT (name) DO NOTHING" + result, err := r.db.Exec(ctx, query, policy.Name, data) + if err != nil { + return errors.WithStack(err) + } + if result.RowsAffected() == 0 { + return &ErrRetryPolicyAlreadyExists{Name: policy.Name} + } + return nil +} + +func (r *PostgresRetryPolicyRepository) UpdateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error { + data, err := proto.Marshal(policy) + if err != nil { + return errors.WithStack(err) + } + + query := "UPDATE retry_policy SET definition = $2 WHERE name = $1" + result, err := r.db.Exec(ctx, query, policy.Name, data) + if err != nil { + return errors.WithStack(err) + } + if result.RowsAffected() == 0 { + return &ErrRetryPolicyNotFound{Name: policy.Name} + } + return nil +} + +// DeleteRetryPolicy removes a retry policy by name. +// Deletes are intentionally idempotent - deleting a non-existent policy is a no-op, +// consistent with DeleteQueue in queue_repository.go. +func (r *PostgresRetryPolicyRepository) DeleteRetryPolicy(ctx *armadacontext.Context, name string) error { + query := "DELETE FROM retry_policy WHERE name = $1" + _, err := r.db.Exec(ctx, query, name) + if err != nil { + return errors.WithStack(err) + } + return nil +} + +func unmarshalRetryPolicy(definitionBytes []byte) (*api.RetryPolicy, error) { + policy := &api.RetryPolicy{} + if err := proto.Unmarshal(definitionBytes, policy); err != nil { + return nil, err + } + return policy, nil +} diff --git a/internal/server/retrypolicy/service.go b/internal/server/retrypolicy/service.go new file mode 100644 index 00000000000..be92e7b11e1 --- /dev/null +++ b/internal/server/retrypolicy/service.go @@ -0,0 +1,129 @@ +package retrypolicy + +import ( + "context" + + "github.com/gogo/protobuf/types" + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/armadaproject/armada/internal/common/armadacontext" + "github.com/armadaproject/armada/internal/common/armadaerrors" + "github.com/armadaproject/armada/internal/common/auth" + "github.com/armadaproject/armada/internal/server/permissions" + "github.com/armadaproject/armada/pkg/api" +) + +type Server struct { + repository RetryPolicyRepository + authorizer auth.ActionAuthorizer +} + +func NewServer(repository RetryPolicyRepository, authorizer auth.ActionAuthorizer) *Server { + return &Server{ + repository: repository, + authorizer: authorizer, + } +} + +func (s *Server) CreateRetryPolicy(grpcCtx context.Context, req *api.RetryPolicy) (*types.Empty, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + err := s.authorizer.AuthorizeAction(ctx, permissions.CreateRetryPolicy) + var ep *armadaerrors.ErrUnauthorized + if errors.As(err, &ep) { + return nil, status.Errorf(codes.PermissionDenied, "error creating retry policy %s: %s", req.Name, ep) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error checking permissions: %s", err) + } + + if req.Name == "" { + return nil, status.Errorf(codes.InvalidArgument, "retry policy name must not be empty") + } + + err = s.repository.CreateRetryPolicy(ctx, req) + var ea *ErrRetryPolicyAlreadyExists + if errors.As(err, &ea) { + return nil, status.Errorf(codes.AlreadyExists, "error creating retry policy: %s", err) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error creating retry policy: %s", err) + } + + return &types.Empty{}, nil +} + +func (s *Server) UpdateRetryPolicy(grpcCtx context.Context, req *api.RetryPolicy) (*types.Empty, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + err := s.authorizer.AuthorizeAction(ctx, permissions.UpdateRetryPolicy) + var ep *armadaerrors.ErrUnauthorized + if errors.As(err, &ep) { + return nil, status.Errorf(codes.PermissionDenied, "error updating retry policy %s: %s", req.Name, ep) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error checking permissions: %s", err) + } + + if req.Name == "" { + return nil, status.Errorf(codes.InvalidArgument, "retry policy name must not be empty") + } + + err = s.repository.UpdateRetryPolicy(ctx, req) + var enf *ErrRetryPolicyNotFound + if errors.As(err, &enf) { + return nil, status.Errorf(codes.NotFound, "error: %s", err) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error updating retry policy %q: %s", req.Name, err) + } + + return &types.Empty{}, nil +} + +func (s *Server) DeleteRetryPolicy(grpcCtx context.Context, req *api.RetryPolicyDeleteRequest) (*types.Empty, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + err := s.authorizer.AuthorizeAction(ctx, permissions.DeleteRetryPolicy) + var ep *armadaerrors.ErrUnauthorized + if errors.As(err, &ep) { + return nil, status.Errorf(codes.PermissionDenied, "error deleting retry policy %s: %s", req.Name, ep) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error checking permissions: %s", err) + } + + if req.Name == "" { + return nil, status.Errorf(codes.InvalidArgument, "retry policy name must not be empty") + } + + err = s.repository.DeleteRetryPolicy(ctx, req.Name) + if err != nil { + return nil, status.Errorf(codes.Unavailable, "error deleting retry policy %s: %s", req.Name, err) + } + return &types.Empty{}, nil +} + +// GetRetryPolicy returns a single retry policy by name. +// Read access is intentionally unauthenticated, consistent with GetQueue in queue_service.go. +func (s *Server) GetRetryPolicy(grpcCtx context.Context, req *api.RetryPolicyGetRequest) (*api.RetryPolicy, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + + if req.Name == "" { + return nil, status.Errorf(codes.InvalidArgument, "retry policy name must not be empty") + } + + policy, err := s.repository.GetRetryPolicy(ctx, req.Name) + var enf *ErrRetryPolicyNotFound + if errors.As(err, &enf) { + return nil, status.Errorf(codes.NotFound, "error: %s", err) + } else if err != nil { + return nil, status.Errorf(codes.Unavailable, "error getting retry policy %q: %s", req.Name, err) + } + return policy, nil +} + +// GetRetryPolicies returns all retry policies. +// Read access is intentionally unauthenticated, consistent with GetQueue in queue_service.go. +func (s *Server) GetRetryPolicies(grpcCtx context.Context, _ *api.RetryPolicyListRequest) (*api.RetryPolicyList, error) { + ctx := armadacontext.FromGrpcCtx(grpcCtx) + policies, err := s.repository.GetAllRetryPolicies(ctx) + if err != nil { + return nil, status.Errorf(codes.Unavailable, "error getting retry policies: %s", err) + } + return &api.RetryPolicyList{RetryPolicies: policies}, nil +} diff --git a/internal/server/retrypolicy/service_test.go b/internal/server/retrypolicy/service_test.go new file mode 100644 index 00000000000..f0a5480882a --- /dev/null +++ b/internal/server/retrypolicy/service_test.go @@ -0,0 +1,301 @@ +package retrypolicy + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + "google.golang.org/grpc/codes" + + "github.com/armadaproject/armada/internal/common/armadacontext" + "github.com/armadaproject/armada/internal/common/armadaerrors" + "github.com/armadaproject/armada/internal/common/auth/permission" + servermocks "github.com/armadaproject/armada/internal/server/mocks" + "github.com/armadaproject/armada/internal/server/permissions" + "github.com/armadaproject/armada/internal/server/servertest" + "github.com/armadaproject/armada/pkg/api" +) + +type testMocks struct { + authorizer *servermocks.MockActionAuthorizer + repo *servermocks.MockRetryPolicyRepository +} + +func newTestServer(t *testing.T) (*Server, *testMocks) { + t.Helper() + ctrl := gomock.NewController(t) + m := &testMocks{ + authorizer: servermocks.NewMockActionAuthorizer(ctrl), + repo: servermocks.NewMockRetryPolicyRepository(ctrl), + } + s := NewServer(m.repo, m.authorizer) + return s, m +} + +func TestCreateRetryPolicy_PermissionDenied(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.CreateRetryPolicy)). + Return(&armadaerrors.ErrUnauthorized{Principal: "alice", Permission: "create_retry_policy"}). + Times(1) + + _, err := s.CreateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) +} + +func TestCreateRetryPolicy_AuthorizeErrorUnavailable(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.CreateRetryPolicy)). + Return(errors.New("authorizer down")). + Times(1) + + _, err := s.CreateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.Unavailable) +} + +func TestCreateRetryPolicy_EmptyNameInvalidArgument(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.CreateRetryPolicy)). + Return(nil). + Times(1) + + _, err := s.CreateRetryPolicy(ctx, &api.RetryPolicy{Name: ""}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.InvalidArgument) +} + +func TestCreateRetryPolicy_AlreadyExists(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.CreateRetryPolicy)). + Return(nil). + Times(1) + + m.repo. + EXPECT(). + CreateRetryPolicy(gomock.Any(), gomock.Any()). + Return(&ErrRetryPolicyAlreadyExists{Name: "p1"}). + Times(1) + + _, err := s.CreateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.AlreadyExists) +} + +func TestCreateRetryPolicy_Success(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.CreateRetryPolicy)). + Return(nil). + Times(1) + + m.repo. + EXPECT(). + CreateRetryPolicy(gomock.Any(), gomock.Any()). + Return(nil). + Times(1) + + _, err := s.CreateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1", RetryLimit: 3}) + require.NoError(t, err) +} + +func TestUpdateRetryPolicy_PermissionDenied(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.UpdateRetryPolicy)). + Return(&armadaerrors.ErrUnauthorized{Principal: "alice", Permission: "update_retry_policy"}). + Times(1) + + _, err := s.UpdateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) +} + +func TestUpdateRetryPolicy_EmptyName(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.UpdateRetryPolicy)). + Return(nil). + Times(1) + + _, err := s.UpdateRetryPolicy(ctx, &api.RetryPolicy{Name: ""}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.InvalidArgument) +} + +func TestUpdateRetryPolicy_NotFound(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.UpdateRetryPolicy)). + Return(nil). + Times(1) + + m.repo. + EXPECT(). + UpdateRetryPolicy(gomock.Any(), gomock.Any()). + Return(&ErrRetryPolicyNotFound{Name: "p1"}). + Times(1) + + _, err := s.UpdateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.NotFound) +} + +func TestUpdateRetryPolicy_Success(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.UpdateRetryPolicy)). + Return(nil). + Times(1) + + m.repo. + EXPECT(). + UpdateRetryPolicy(gomock.Any(), gomock.Any()). + Return(nil). + Times(1) + + _, err := s.UpdateRetryPolicy(ctx, &api.RetryPolicy{Name: "p1", RetryLimit: 5}) + require.NoError(t, err) +} + +func TestDeleteRetryPolicy_EmptyName(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.DeleteRetryPolicy)). + Return(nil). + Times(1) + + _, err := s.DeleteRetryPolicy(ctx, &api.RetryPolicyDeleteRequest{Name: ""}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.InvalidArgument) +} + +func TestDeleteRetryPolicy_PermissionDenied(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.DeleteRetryPolicy)). + Return(&armadaerrors.ErrUnauthorized{Principal: "alice", Permission: "delete_retry_policy"}). + Times(1) + + _, err := s.DeleteRetryPolicy(ctx, &api.RetryPolicyDeleteRequest{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.PermissionDenied) +} + +func TestDeleteRetryPolicy_Success(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.authorizer. + EXPECT(). + AuthorizeAction(ctx, permission.Permission(permissions.DeleteRetryPolicy)). + Return(nil). + Times(1) + + m.repo. + EXPECT(). + DeleteRetryPolicy(gomock.Any(), "p1"). + Return(nil). + Times(1) + + _, err := s.DeleteRetryPolicy(ctx, &api.RetryPolicyDeleteRequest{Name: "p1"}) + require.NoError(t, err) +} + +func TestGetRetryPolicy_EmptyName(t *testing.T) { + s, _ := newTestServer(t) + ctx := armadacontext.Background() + + _, err := s.GetRetryPolicy(ctx, &api.RetryPolicyGetRequest{Name: ""}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.InvalidArgument) +} + +func TestGetRetryPolicy_NotFound(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + m.repo. + EXPECT(). + GetRetryPolicy(gomock.Any(), "p1"). + Return(nil, &ErrRetryPolicyNotFound{Name: "p1"}). + Times(1) + + _, err := s.GetRetryPolicy(ctx, &api.RetryPolicyGetRequest{Name: "p1"}) + require.Error(t, err) + servertest.RequireGrpcCode(t, err, codes.NotFound) +} + +func TestGetRetryPolicy_Success(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + expected := &api.RetryPolicy{Name: "p1", RetryLimit: 5} + m.repo. + EXPECT(). + GetRetryPolicy(gomock.Any(), "p1"). + Return(expected, nil). + Times(1) + + result, err := s.GetRetryPolicy(ctx, &api.RetryPolicyGetRequest{Name: "p1"}) + require.NoError(t, err) + assert.Equal(t, expected, result) +} + +func TestGetRetryPolicies_Success(t *testing.T) { + s, m := newTestServer(t) + ctx := armadacontext.Background() + + expected := []*api.RetryPolicy{ + {Name: "p1", RetryLimit: 3}, + {Name: "p2", RetryLimit: 5}, + } + m.repo. + EXPECT(). + GetAllRetryPolicies(gomock.Any()). + Return(expected, nil). + Times(1) + + result, err := s.GetRetryPolicies(ctx, &api.RetryPolicyListRequest{}) + require.NoError(t, err) + assert.Equal(t, expected, result.RetryPolicies) +} diff --git a/internal/server/server.go b/internal/server/server.go index f6411234aa2..aa527731a9d 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -31,6 +31,7 @@ import ( "github.com/armadaproject/armada/internal/server/node" "github.com/armadaproject/armada/internal/server/queryapi" "github.com/armadaproject/armada/internal/server/queue" + "github.com/armadaproject/armada/internal/server/retrypolicy" "github.com/armadaproject/armada/internal/server/submit" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/api/schedulerobjects" @@ -166,8 +167,12 @@ func Serve(ctx *armadacontext.Context, config *configuration.ArmadaConfig, healt queueServer := queue.NewServer(controlPlaneEventsPublisher, queueRepository, authorizer) + retryPolicyRepo := retrypolicy.NewPostgresRetryPolicyRepository(dbPool) + retryPolicyServer := retrypolicy.NewServer(retryPolicyRepo, authorizer) + submitServer := submit.NewServer( queueServer, + retryPolicyServer, jobSetEventsPublisher, queueCache, config.Submission, @@ -194,6 +199,7 @@ func Serve(ctx *armadacontext.Context, config *configuration.ArmadaConfig, healt api.RegisterSubmitServer(grpcServer, submitServer) api.RegisterEventServer(grpcServer, eventServer) api.RegisterQueueServiceServer(grpcServer, queueServer) + api.RegisterRetryPolicyServiceServer(grpcServer, retryPolicyServer) api.RegisterExecutorServer(grpcServer, executorServer) api.RegisterNodeServer(grpcServer, nodeServer) diff --git a/internal/server/servertest/grpc.go b/internal/server/servertest/grpc.go new file mode 100644 index 00000000000..0c19679847a --- /dev/null +++ b/internal/server/servertest/grpc.go @@ -0,0 +1,17 @@ +package servertest + +import ( + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// RequireGrpcCode asserts that err is a gRPC status error with the given code. +func RequireGrpcCode(t *testing.T, err error, code codes.Code) { + t.Helper() + st, ok := status.FromError(err) + require.True(t, ok, "expected gRPC status error") + require.Equal(t, code, st.Code()) +} diff --git a/internal/server/submit/submit.go b/internal/server/submit/submit.go index 80dc618da9b..3938b105b68 100644 --- a/internal/server/submit/submit.go +++ b/internal/server/submit/submit.go @@ -30,12 +30,13 @@ import ( // Server is a service that accepts API calls according to the original Armada submit API and publishes messages // to Pulsar based on those calls. type Server struct { - queueService api.QueueServiceServer - publisher pulsarutils.Publisher[*armadaevents.EventSequence] - queueCache armadaqueue.ReadOnlyQueueRepository - submissionConfig configuration.SubmissionConfig - deduplicator Deduplicator - authorizer auth.ActionAuthorizer + queueService api.QueueServiceServer + retryPolicyService api.RetryPolicyServiceServer + publisher pulsarutils.Publisher[*armadaevents.EventSequence] + queueCache armadaqueue.ReadOnlyQueueRepository + submissionConfig configuration.SubmissionConfig + deduplicator Deduplicator + authorizer auth.ActionAuthorizer // Below are used only for testing clock clock.Clock idGenerator func() string @@ -43,6 +44,7 @@ type Server struct { func NewServer( queueService api.QueueServiceServer, + retryPolicyService api.RetryPolicyServiceServer, publisher pulsarutils.Publisher[*armadaevents.EventSequence], queueCache armadaqueue.ReadOnlyQueueRepository, submissionConfig configuration.SubmissionConfig, @@ -50,14 +52,15 @@ func NewServer( authorizer auth.ActionAuthorizer, ) *Server { return &Server{ - queueService: queueService, - publisher: publisher, - queueCache: queueCache, - submissionConfig: submissionConfig, - deduplicator: deduplicator, - authorizer: authorizer, - clock: clock.RealClock{}, - idGenerator: util.NewULID, + queueService: queueService, + retryPolicyService: retryPolicyService, + publisher: publisher, + queueCache: queueCache, + submissionConfig: submissionConfig, + deduplicator: deduplicator, + authorizer: authorizer, + clock: clock.RealClock{}, + idGenerator: util.NewULID, } } @@ -464,3 +467,23 @@ func (s *Server) GetQueue(ctx context.Context, request *api.QueueGetRequest) (*a func (s *Server) GetQueues(request *api.StreamingQueueGetRequest, server api.Submit_GetQueuesServer) error { return s.queueService.GetQueues(request, server) } + +func (s *Server) CreateRetryPolicy(ctx context.Context, policy *api.RetryPolicy) (*types.Empty, error) { + return s.retryPolicyService.CreateRetryPolicy(ctx, policy) +} + +func (s *Server) UpdateRetryPolicy(ctx context.Context, policy *api.RetryPolicy) (*types.Empty, error) { + return s.retryPolicyService.UpdateRetryPolicy(ctx, policy) +} + +func (s *Server) DeleteRetryPolicy(ctx context.Context, req *api.RetryPolicyDeleteRequest) (*types.Empty, error) { + return s.retryPolicyService.DeleteRetryPolicy(ctx, req) +} + +func (s *Server) GetRetryPolicy(ctx context.Context, req *api.RetryPolicyGetRequest) (*api.RetryPolicy, error) { + return s.retryPolicyService.GetRetryPolicy(ctx, req) +} + +func (s *Server) GetRetryPolicies(ctx context.Context, req *api.RetryPolicyListRequest) (*api.RetryPolicyList, error) { + return s.retryPolicyService.GetRetryPolicies(ctx, req) +} diff --git a/internal/server/submit/submit_test.go b/internal/server/submit/submit_test.go index 17d3df49524..e66eb96d55d 100644 --- a/internal/server/submit/submit_test.go +++ b/internal/server/submit/submit_test.go @@ -528,6 +528,7 @@ func withTerminationGracePeriod(req *api.JobSubmitRequest, v *int64) *api.JobSub func createTestServer(t *testing.T) (*Server, *mockObjects) { m := createMocks(t) server := NewServer( + nil, nil, m.publisher, m.queueRepo, diff --git a/pkg/api/api.swagger.go b/pkg/api/api.swagger.go index 238ec9b02bd..6323d3b5df9 100644 --- a/pkg/api/api.swagger.go +++ b/pkg/api/api.swagger.go @@ -691,6 +691,148 @@ func SwaggerJsonTemplate() string { " }\n" + " }\n" + " },\n" + + " \"/v1/retry-policies\": {\n" + + " \"get\": {\n" + + " \"tags\": [\n" + + " \"Submit\"\n" + + " ],\n" + + " \"operationId\": \"GetRetryPolicies\",\n" + + " \"responses\": {\n" + + " \"200\": {\n" + + " \"description\": \"A successful response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/apiRetryPolicyList\"\n" + + " }\n" + + " },\n" + + " \"default\": {\n" + + " \"description\": \"An unexpected error response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/runtimeError\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"/v1/retry-policy\": {\n" + + " \"post\": {\n" + + " \"tags\": [\n" + + " \"Submit\"\n" + + " ],\n" + + " \"operationId\": \"CreateRetryPolicy\",\n" + + " \"parameters\": [\n" + + " {\n" + + " \"name\": \"body\",\n" + + " \"in\": \"body\",\n" + + " \"required\": true,\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/apiRetryPolicy\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"responses\": {\n" + + " \"200\": {\n" + + " \"description\": \"A successful response.\",\n" + + " \"schema\": {}\n" + + " },\n" + + " \"default\": {\n" + + " \"description\": \"An unexpected error response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/runtimeError\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"/v1/retry-policy/{name}\": {\n" + + " \"get\": {\n" + + " \"tags\": [\n" + + " \"Submit\"\n" + + " ],\n" + + " \"operationId\": \"GetRetryPolicy\",\n" + + " \"parameters\": [\n" + + " {\n" + + " \"type\": \"string\",\n" + + " \"name\": \"name\",\n" + + " \"in\": \"path\",\n" + + " \"required\": true\n" + + " }\n" + + " ],\n" + + " \"responses\": {\n" + + " \"200\": {\n" + + " \"description\": \"A successful response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/apiRetryPolicy\"\n" + + " }\n" + + " },\n" + + " \"default\": {\n" + + " \"description\": \"An unexpected error response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/runtimeError\"\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"put\": {\n" + + " \"tags\": [\n" + + " \"Submit\"\n" + + " ],\n" + + " \"operationId\": \"UpdateRetryPolicy\",\n" + + " \"parameters\": [\n" + + " {\n" + + " \"type\": \"string\",\n" + + " \"name\": \"name\",\n" + + " \"in\": \"path\",\n" + + " \"required\": true\n" + + " },\n" + + " {\n" + + " \"name\": \"body\",\n" + + " \"in\": \"body\",\n" + + " \"required\": true,\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/apiRetryPolicy\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"responses\": {\n" + + " \"200\": {\n" + + " \"description\": \"A successful response.\",\n" + + " \"schema\": {}\n" + + " },\n" + + " \"default\": {\n" + + " \"description\": \"An unexpected error response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/runtimeError\"\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"delete\": {\n" + + " \"tags\": [\n" + + " \"Submit\"\n" + + " ],\n" + + " \"operationId\": \"DeleteRetryPolicy\",\n" + + " \"parameters\": [\n" + + " {\n" + + " \"type\": \"string\",\n" + + " \"name\": \"name\",\n" + + " \"in\": \"path\",\n" + + " \"required\": true\n" + + " }\n" + + " ],\n" + + " \"responses\": {\n" + + " \"200\": {\n" + + " \"description\": \"A successful response.\",\n" + + " \"schema\": {}\n" + + " },\n" + + " \"default\": {\n" + + " \"description\": \"An unexpected error response.\",\n" + + " \"schema\": {\n" + + " \"$ref\": \"#/definitions/runtimeError\"\n" + + " }\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + " \"/v1/run/details\": {\n" + " \"post\": {\n" + " \"tags\": [\n" + @@ -902,6 +1044,15 @@ func SwaggerJsonTemplate() string { " }\n" + " }\n" + " },\n" + + " \"apiExitCodeOperator\": {\n" + + " \"type\": \"string\",\n" + + " \"default\": \"EXIT_CODE_OPERATOR_UNSPECIFIED\",\n" + + " \"enum\": [\n" + + " \"EXIT_CODE_OPERATOR_UNSPECIFIED\",\n" + + " \"EXIT_CODE_OPERATOR_IN\",\n" + + " \"EXIT_CODE_OPERATOR_NOT_IN\"\n" + + " ]\n" + + " },\n" + " \"apiGetActiveQueuesRequest\": {\n" + " \"type\": \"object\"\n" + " },\n" + @@ -2204,6 +2355,9 @@ func SwaggerJsonTemplate() string { " \"$ref\": \"#/definitions/apiPriorityClassResourceLimits\"\n" + " }\n" + " },\n" + + " \"retryPolicy\": {\n" + + " \"type\": \"string\"\n" + + " },\n" + " \"userOwners\": {\n" + " \"type\": \"array\",\n" + " \"items\": {\n" + @@ -2246,6 +2400,89 @@ func SwaggerJsonTemplate() string { " }\n" + " }\n" + " },\n" + + " \"apiRetryAction\": {\n" + + " \"type\": \"string\",\n" + + " \"default\": \"RETRY_ACTION_UNSPECIFIED\",\n" + + " \"enum\": [\n" + + " \"RETRY_ACTION_UNSPECIFIED\",\n" + + " \"RETRY_ACTION_FAIL\",\n" + + " \"RETRY_ACTION_RETRY\"\n" + + " ]\n" + + " },\n" + + " \"apiRetryExitCodeMatcher\": {\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + " \"operator\": {\n" + + " \"$ref\": \"#/definitions/apiExitCodeOperator\"\n" + + " },\n" + + " \"values\": {\n" + + " \"type\": \"array\",\n" + + " \"items\": {\n" + + " \"type\": \"integer\",\n" + + " \"format\": \"int32\"\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"apiRetryPolicy\": {\n" + + " \"description\": \"RetryPolicy defines rules that determine whether failed jobs should be retried.\\nOperators create policies and assign them to queues by name.\",\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + " \"defaultAction\": {\n" + + " \"$ref\": \"#/definitions/apiRetryAction\"\n" + + " },\n" + + " \"name\": {\n" + + " \"type\": \"string\"\n" + + " },\n" + + " \"retryLimit\": {\n" + + " \"type\": \"integer\",\n" + + " \"format\": \"int64\"\n" + + " },\n" + + " \"rules\": {\n" + + " \"type\": \"array\",\n" + + " \"items\": {\n" + + " \"$ref\": \"#/definitions/apiRetryRule\"\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"apiRetryPolicyList\": {\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + " \"retryPolicies\": {\n" + + " \"type\": \"array\",\n" + + " \"items\": {\n" + + " \"$ref\": \"#/definitions/apiRetryPolicy\"\n" + + " }\n" + + " }\n" + + " }\n" + + " },\n" + + " \"apiRetryRule\": {\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + " \"action\": {\n" + + " \"$ref\": \"#/definitions/apiRetryAction\"\n" + + " },\n" + + " \"onCategories\": {\n" + + " \"type\": \"array\",\n" + + " \"items\": {\n" + + " \"type\": \"string\"\n" + + " }\n" + + " },\n" + + " \"onConditions\": {\n" + + " \"type\": \"array\",\n" + + " \"items\": {\n" + + " \"type\": \"string\"\n" + + " }\n" + + " },\n" + + " \"onExitCodes\": {\n" + + " \"$ref\": \"#/definitions/apiRetryExitCodeMatcher\"\n" + + " },\n" + + " \"onTerminationMessagePattern\": {\n" + + " \"type\": \"string\"\n" + + " }\n" + + " }\n" + + " },\n" + " \"apiServiceConfig\": {\n" + " \"type\": \"object\",\n" + " \"properties\": {\n" + diff --git a/pkg/api/api.swagger.json b/pkg/api/api.swagger.json index 80543de8695..33d1c609a2c 100644 --- a/pkg/api/api.swagger.json +++ b/pkg/api/api.swagger.json @@ -680,6 +680,148 @@ } } }, + "/v1/retry-policies": { + "get": { + "tags": [ + "Submit" + ], + "operationId": "GetRetryPolicies", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/apiRetryPolicyList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/v1/retry-policy": { + "post": { + "tags": [ + "Submit" + ], + "operationId": "CreateRetryPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apiRetryPolicy" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, + "/v1/retry-policy/{name}": { + "get": { + "tags": [ + "Submit" + ], + "operationId": "GetRetryPolicy", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/apiRetryPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "put": { + "tags": [ + "Submit" + ], + "operationId": "UpdateRetryPolicy", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apiRetryPolicy" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + }, + "delete": { + "tags": [ + "Submit" + ], + "operationId": "DeleteRetryPolicy", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + } + } + }, "/v1/run/details": { "post": { "tags": [ @@ -891,6 +1033,15 @@ } } }, + "apiExitCodeOperator": { + "type": "string", + "default": "EXIT_CODE_OPERATOR_UNSPECIFIED", + "enum": [ + "EXIT_CODE_OPERATOR_UNSPECIFIED", + "EXIT_CODE_OPERATOR_IN", + "EXIT_CODE_OPERATOR_NOT_IN" + ] + }, "apiGetActiveQueuesRequest": { "type": "object" }, @@ -2193,6 +2344,9 @@ "$ref": "#/definitions/apiPriorityClassResourceLimits" } }, + "retryPolicy": { + "type": "string" + }, "userOwners": { "type": "array", "items": { @@ -2235,6 +2389,89 @@ } } }, + "apiRetryAction": { + "type": "string", + "default": "RETRY_ACTION_UNSPECIFIED", + "enum": [ + "RETRY_ACTION_UNSPECIFIED", + "RETRY_ACTION_FAIL", + "RETRY_ACTION_RETRY" + ] + }, + "apiRetryExitCodeMatcher": { + "type": "object", + "properties": { + "operator": { + "$ref": "#/definitions/apiExitCodeOperator" + }, + "values": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "apiRetryPolicy": { + "description": "RetryPolicy defines rules that determine whether failed jobs should be retried.\nOperators create policies and assign them to queues by name.", + "type": "object", + "properties": { + "defaultAction": { + "$ref": "#/definitions/apiRetryAction" + }, + "name": { + "type": "string" + }, + "retryLimit": { + "type": "integer", + "format": "int64" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/definitions/apiRetryRule" + } + } + } + }, + "apiRetryPolicyList": { + "type": "object", + "properties": { + "retryPolicies": { + "type": "array", + "items": { + "$ref": "#/definitions/apiRetryPolicy" + } + } + } + }, + "apiRetryRule": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/apiRetryAction" + }, + "onCategories": { + "type": "array", + "items": { + "type": "string" + } + }, + "onConditions": { + "type": "array", + "items": { + "type": "string" + } + }, + "onExitCodes": { + "$ref": "#/definitions/apiRetryExitCodeMatcher" + }, + "onTerminationMessagePattern": { + "type": "string" + } + } + }, "apiServiceConfig": { "type": "object", "properties": { diff --git a/pkg/api/submit.pb.go b/pkg/api/submit.pb.go index ea864b1a416..88f4f9f661e 100644 --- a/pkg/api/submit.pb.go +++ b/pkg/api/submit.pb.go @@ -133,6 +133,62 @@ func (JobState) EnumDescriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{2} } +type RetryAction int32 + +const ( + RetryAction_RETRY_ACTION_UNSPECIFIED RetryAction = 0 + RetryAction_RETRY_ACTION_FAIL RetryAction = 1 + RetryAction_RETRY_ACTION_RETRY RetryAction = 2 +) + +var RetryAction_name = map[int32]string{ + 0: "RETRY_ACTION_UNSPECIFIED", + 1: "RETRY_ACTION_FAIL", + 2: "RETRY_ACTION_RETRY", +} + +var RetryAction_value = map[string]int32{ + "RETRY_ACTION_UNSPECIFIED": 0, + "RETRY_ACTION_FAIL": 1, + "RETRY_ACTION_RETRY": 2, +} + +func (x RetryAction) String() string { + return proto.EnumName(RetryAction_name, int32(x)) +} + +func (RetryAction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{3} +} + +type ExitCodeOperator int32 + +const ( + ExitCodeOperator_EXIT_CODE_OPERATOR_UNSPECIFIED ExitCodeOperator = 0 + ExitCodeOperator_EXIT_CODE_OPERATOR_IN ExitCodeOperator = 1 + ExitCodeOperator_EXIT_CODE_OPERATOR_NOT_IN ExitCodeOperator = 2 +) + +var ExitCodeOperator_name = map[int32]string{ + 0: "EXIT_CODE_OPERATOR_UNSPECIFIED", + 1: "EXIT_CODE_OPERATOR_IN", + 2: "EXIT_CODE_OPERATOR_NOT_IN", +} + +var ExitCodeOperator_value = map[string]int32{ + "EXIT_CODE_OPERATOR_UNSPECIFIED": 0, + "EXIT_CODE_OPERATOR_IN": 1, + "EXIT_CODE_OPERATOR_NOT_IN": 2, +} + +func (x ExitCodeOperator) String() string { + return proto.EnumName(ExitCodeOperator_name, int32(x)) +} + +func (ExitCodeOperator) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{4} +} + type JobSubmitRequestItem struct { Priority float64 `protobuf:"fixed64,1,opt,name=priority,proto3" json:"priority,omitempty"` Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` @@ -1179,6 +1235,7 @@ type Queue struct { // A list of Kubernetes-like key-value labels, e.g. armadaproject.io/priority=critical LabelsDeprecated []string `protobuf:"bytes,9,rep,name=labels_deprecated,json=labelsDeprecated,proto3" json:"labelsDeprecated,omitempty"` // Deprecated: Do not use. Labels map[string]string `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + RetryPolicy string `protobuf:"bytes,11,opt,name=retry_policy,json=retryPolicy,proto3" json:"retryPolicy,omitempty"` } func (m *Queue) Reset() { *m = Queue{} } @@ -1286,6 +1343,13 @@ func (m *Queue) GetLabels() map[string]string { return nil } +func (m *Queue) GetRetryPolicy() string { + if m != nil { + return m.RetryPolicy + } + return "" +} + type Queue_Permissions struct { Subjects []*Queue_Permissions_Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` Verbs []string `protobuf:"bytes,2,rep,name=verbs,proto3" json:"verbs,omitempty"` @@ -1625,23 +1689,27 @@ func (m *PreemptionResult) GetPreemptionResults() map[string]string { return nil } -//swagger:model -type QueueGetRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +// RetryPolicy defines rules that determine whether failed jobs should be retried. +// Operators create policies and assign them to queues by name. +type RetryPolicy struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + RetryLimit uint32 `protobuf:"varint,2,opt,name=retry_limit,json=retryLimit,proto3" json:"retryLimit,omitempty"` + DefaultAction RetryAction `protobuf:"varint,3,opt,name=default_action,json=defaultAction,proto3,enum=api.RetryAction" json:"defaultAction,omitempty"` + Rules []*RetryRule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"` } -func (m *QueueGetRequest) Reset() { *m = QueueGetRequest{} } -func (m *QueueGetRequest) String() string { return proto.CompactTextString(m) } -func (*QueueGetRequest) ProtoMessage() {} -func (*QueueGetRequest) Descriptor() ([]byte, []int) { +func (m *RetryPolicy) Reset() { *m = RetryPolicy{} } +func (m *RetryPolicy) String() string { return proto.CompactTextString(m) } +func (*RetryPolicy) ProtoMessage() {} +func (*RetryPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{19} } -func (m *QueueGetRequest) XXX_Unmarshal(b []byte) error { +func (m *RetryPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueGetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryPolicy.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1651,42 +1719,66 @@ func (m *QueueGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *QueueGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueGetRequest.Merge(m, src) +func (m *RetryPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicy.Merge(m, src) } -func (m *QueueGetRequest) XXX_Size() int { +func (m *RetryPolicy) XXX_Size() int { return m.Size() } -func (m *QueueGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueueGetRequest.DiscardUnknown(m) +func (m *RetryPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicy.DiscardUnknown(m) } -var xxx_messageInfo_QueueGetRequest proto.InternalMessageInfo +var xxx_messageInfo_RetryPolicy proto.InternalMessageInfo -func (m *QueueGetRequest) GetName() string { +func (m *RetryPolicy) GetName() string { if m != nil { return m.Name } return "" } -//swagger:model -type QueueCordonRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +func (m *RetryPolicy) GetRetryLimit() uint32 { + if m != nil { + return m.RetryLimit + } + return 0 } -func (m *QueueCordonRequest) Reset() { *m = QueueCordonRequest{} } -func (m *QueueCordonRequest) String() string { return proto.CompactTextString(m) } -func (*QueueCordonRequest) ProtoMessage() {} -func (*QueueCordonRequest) Descriptor() ([]byte, []int) { +func (m *RetryPolicy) GetDefaultAction() RetryAction { + if m != nil { + return m.DefaultAction + } + return RetryAction_RETRY_ACTION_UNSPECIFIED +} + +func (m *RetryPolicy) GetRules() []*RetryRule { + if m != nil { + return m.Rules + } + return nil +} + +type RetryRule struct { + Action RetryAction `protobuf:"varint,1,opt,name=action,proto3,enum=api.RetryAction" json:"action,omitempty"` + OnConditions []string `protobuf:"bytes,2,rep,name=on_conditions,json=onConditions,proto3" json:"onConditions,omitempty"` + OnExitCodes *RetryExitCodeMatcher `protobuf:"bytes,3,opt,name=on_exit_codes,json=onExitCodes,proto3" json:"onExitCodes,omitempty"` + OnTerminationMessagePattern string `protobuf:"bytes,4,opt,name=on_termination_message_pattern,json=onTerminationMessagePattern,proto3" json:"onTerminationMessagePattern,omitempty"` + OnCategories []string `protobuf:"bytes,5,rep,name=on_categories,json=onCategories,proto3" json:"onCategories,omitempty"` +} + +func (m *RetryRule) Reset() { *m = RetryRule{} } +func (m *RetryRule) String() string { return proto.CompactTextString(m) } +func (*RetryRule) ProtoMessage() {} +func (*RetryRule) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{20} } -func (m *QueueCordonRequest) XXX_Unmarshal(b []byte) error { +func (m *RetryRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueCordonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueCordonRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryRule.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1696,42 +1788,70 @@ func (m *QueueCordonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueueCordonRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueCordonRequest.Merge(m, src) +func (m *RetryRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryRule.Merge(m, src) } -func (m *QueueCordonRequest) XXX_Size() int { +func (m *RetryRule) XXX_Size() int { return m.Size() } -func (m *QueueCordonRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueueCordonRequest.DiscardUnknown(m) +func (m *RetryRule) XXX_DiscardUnknown() { + xxx_messageInfo_RetryRule.DiscardUnknown(m) } -var xxx_messageInfo_QueueCordonRequest proto.InternalMessageInfo +var xxx_messageInfo_RetryRule proto.InternalMessageInfo -func (m *QueueCordonRequest) GetName() string { +func (m *RetryRule) GetAction() RetryAction { if m != nil { - return m.Name + return m.Action + } + return RetryAction_RETRY_ACTION_UNSPECIFIED +} + +func (m *RetryRule) GetOnConditions() []string { + if m != nil { + return m.OnConditions + } + return nil +} + +func (m *RetryRule) GetOnExitCodes() *RetryExitCodeMatcher { + if m != nil { + return m.OnExitCodes + } + return nil +} + +func (m *RetryRule) GetOnTerminationMessagePattern() string { + if m != nil { + return m.OnTerminationMessagePattern } return "" } -//swagger:model -type QueueUncordonRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +func (m *RetryRule) GetOnCategories() []string { + if m != nil { + return m.OnCategories + } + return nil } -func (m *QueueUncordonRequest) Reset() { *m = QueueUncordonRequest{} } -func (m *QueueUncordonRequest) String() string { return proto.CompactTextString(m) } -func (*QueueUncordonRequest) ProtoMessage() {} -func (*QueueUncordonRequest) Descriptor() ([]byte, []int) { +type RetryExitCodeMatcher struct { + Operator ExitCodeOperator `protobuf:"varint,1,opt,name=operator,proto3,enum=api.ExitCodeOperator" json:"operator,omitempty"` + Values []int32 `protobuf:"varint,2,rep,packed,name=values,proto3" json:"values,omitempty"` +} + +func (m *RetryExitCodeMatcher) Reset() { *m = RetryExitCodeMatcher{} } +func (m *RetryExitCodeMatcher) String() string { return proto.CompactTextString(m) } +func (*RetryExitCodeMatcher) ProtoMessage() {} +func (*RetryExitCodeMatcher) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{21} } -func (m *QueueUncordonRequest) XXX_Unmarshal(b []byte) error { +func (m *RetryExitCodeMatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueUncordonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryExitCodeMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueUncordonRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryExitCodeMatcher.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1741,42 +1861,48 @@ func (m *QueueUncordonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *QueueUncordonRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueUncordonRequest.Merge(m, src) +func (m *RetryExitCodeMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryExitCodeMatcher.Merge(m, src) } -func (m *QueueUncordonRequest) XXX_Size() int { +func (m *RetryExitCodeMatcher) XXX_Size() int { return m.Size() } -func (m *QueueUncordonRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueueUncordonRequest.DiscardUnknown(m) +func (m *RetryExitCodeMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_RetryExitCodeMatcher.DiscardUnknown(m) } -var xxx_messageInfo_QueueUncordonRequest proto.InternalMessageInfo +var xxx_messageInfo_RetryExitCodeMatcher proto.InternalMessageInfo -func (m *QueueUncordonRequest) GetName() string { +func (m *RetryExitCodeMatcher) GetOperator() ExitCodeOperator { if m != nil { - return m.Name + return m.Operator } - return "" + return ExitCodeOperator_EXIT_CODE_OPERATOR_UNSPECIFIED } -//swagger:model -type StreamingQueueGetRequest struct { - Num uint32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` +func (m *RetryExitCodeMatcher) GetValues() []int32 { + if m != nil { + return m.Values + } + return nil } -func (m *StreamingQueueGetRequest) Reset() { *m = StreamingQueueGetRequest{} } -func (m *StreamingQueueGetRequest) String() string { return proto.CompactTextString(m) } -func (*StreamingQueueGetRequest) ProtoMessage() {} -func (*StreamingQueueGetRequest) Descriptor() ([]byte, []int) { +type RetryPolicyGetRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *RetryPolicyGetRequest) Reset() { *m = RetryPolicyGetRequest{} } +func (m *RetryPolicyGetRequest) String() string { return proto.CompactTextString(m) } +func (*RetryPolicyGetRequest) ProtoMessage() {} +func (*RetryPolicyGetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{22} } -func (m *StreamingQueueGetRequest) XXX_Unmarshal(b []byte) error { +func (m *RetryPolicyGetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *StreamingQueueGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryPolicyGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_StreamingQueueGetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryPolicyGetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1786,42 +1912,41 @@ func (m *StreamingQueueGetRequest) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *StreamingQueueGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamingQueueGetRequest.Merge(m, src) +func (m *RetryPolicyGetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicyGetRequest.Merge(m, src) } -func (m *StreamingQueueGetRequest) XXX_Size() int { +func (m *RetryPolicyGetRequest) XXX_Size() int { return m.Size() } -func (m *StreamingQueueGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StreamingQueueGetRequest.DiscardUnknown(m) +func (m *RetryPolicyGetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicyGetRequest.DiscardUnknown(m) } -var xxx_messageInfo_StreamingQueueGetRequest proto.InternalMessageInfo +var xxx_messageInfo_RetryPolicyGetRequest proto.InternalMessageInfo -func (m *StreamingQueueGetRequest) GetNum() uint32 { +func (m *RetryPolicyGetRequest) GetName() string { if m != nil { - return m.Num + return m.Name } - return 0 + return "" } -//swagger:model -type QueueDeleteRequest struct { +type RetryPolicyDeleteRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *QueueDeleteRequest) Reset() { *m = QueueDeleteRequest{} } -func (m *QueueDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*QueueDeleteRequest) ProtoMessage() {} -func (*QueueDeleteRequest) Descriptor() ([]byte, []int) { +func (m *RetryPolicyDeleteRequest) Reset() { *m = RetryPolicyDeleteRequest{} } +func (m *RetryPolicyDeleteRequest) String() string { return proto.CompactTextString(m) } +func (*RetryPolicyDeleteRequest) ProtoMessage() {} +func (*RetryPolicyDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{23} } -func (m *QueueDeleteRequest) XXX_Unmarshal(b []byte) error { +func (m *RetryPolicyDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryPolicyDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueDeleteRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryPolicyDeleteRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1831,43 +1956,40 @@ func (m *QueueDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueueDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueDeleteRequest.Merge(m, src) +func (m *RetryPolicyDeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicyDeleteRequest.Merge(m, src) } -func (m *QueueDeleteRequest) XXX_Size() int { +func (m *RetryPolicyDeleteRequest) XXX_Size() int { return m.Size() } -func (m *QueueDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueueDeleteRequest.DiscardUnknown(m) +func (m *RetryPolicyDeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicyDeleteRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueueDeleteRequest proto.InternalMessageInfo +var xxx_messageInfo_RetryPolicyDeleteRequest proto.InternalMessageInfo -func (m *QueueDeleteRequest) GetName() string { +func (m *RetryPolicyDeleteRequest) GetName() string { if m != nil { return m.Name } return "" } -type JobSetInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - QueuedJobs int32 `protobuf:"varint,2,opt,name=queued_jobs,json=queuedJobs,proto3" json:"queuedJobs,omitempty"` - LeasedJobs int32 `protobuf:"varint,3,opt,name=leased_jobs,json=leasedJobs,proto3" json:"leasedJobs,omitempty"` +type RetryPolicyListRequest struct { } -func (m *JobSetInfo) Reset() { *m = JobSetInfo{} } -func (m *JobSetInfo) String() string { return proto.CompactTextString(m) } -func (*JobSetInfo) ProtoMessage() {} -func (*JobSetInfo) Descriptor() ([]byte, []int) { +func (m *RetryPolicyListRequest) Reset() { *m = RetryPolicyListRequest{} } +func (m *RetryPolicyListRequest) String() string { return proto.CompactTextString(m) } +func (*RetryPolicyListRequest) ProtoMessage() {} +func (*RetryPolicyListRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{24} } -func (m *JobSetInfo) XXX_Unmarshal(b []byte) error { +func (m *RetryPolicyListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *JobSetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryPolicyListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_JobSetInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryPolicyListRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1877,56 +1999,34 @@ func (m *JobSetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *JobSetInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobSetInfo.Merge(m, src) +func (m *RetryPolicyListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicyListRequest.Merge(m, src) } -func (m *JobSetInfo) XXX_Size() int { +func (m *RetryPolicyListRequest) XXX_Size() int { return m.Size() } -func (m *JobSetInfo) XXX_DiscardUnknown() { - xxx_messageInfo_JobSetInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_JobSetInfo proto.InternalMessageInfo - -func (m *JobSetInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *JobSetInfo) GetQueuedJobs() int32 { - if m != nil { - return m.QueuedJobs - } - return 0 +func (m *RetryPolicyListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicyListRequest.DiscardUnknown(m) } -func (m *JobSetInfo) GetLeasedJobs() int32 { - if m != nil { - return m.LeasedJobs - } - return 0 -} +var xxx_messageInfo_RetryPolicyListRequest proto.InternalMessageInfo -type QueueUpdateResponse struct { - Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +type RetryPolicyList struct { + RetryPolicies []*RetryPolicy `protobuf:"bytes,1,rep,name=retry_policies,json=retryPolicies,proto3" json:"retryPolicies,omitempty"` } -func (m *QueueUpdateResponse) Reset() { *m = QueueUpdateResponse{} } -func (m *QueueUpdateResponse) String() string { return proto.CompactTextString(m) } -func (*QueueUpdateResponse) ProtoMessage() {} -func (*QueueUpdateResponse) Descriptor() ([]byte, []int) { +func (m *RetryPolicyList) Reset() { *m = RetryPolicyList{} } +func (m *RetryPolicyList) String() string { return proto.CompactTextString(m) } +func (*RetryPolicyList) ProtoMessage() {} +func (*RetryPolicyList) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{25} } -func (m *QueueUpdateResponse) XXX_Unmarshal(b []byte) error { +func (m *RetryPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RetryPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueUpdateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_RetryPolicyList.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1936,48 +2036,42 @@ func (m *QueueUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueueUpdateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueUpdateResponse.Merge(m, src) +func (m *RetryPolicyList) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicyList.Merge(m, src) } -func (m *QueueUpdateResponse) XXX_Size() int { +func (m *RetryPolicyList) XXX_Size() int { return m.Size() } -func (m *QueueUpdateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueueUpdateResponse.DiscardUnknown(m) +func (m *RetryPolicyList) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicyList.DiscardUnknown(m) } -var xxx_messageInfo_QueueUpdateResponse proto.InternalMessageInfo +var xxx_messageInfo_RetryPolicyList proto.InternalMessageInfo -func (m *QueueUpdateResponse) GetQueue() *Queue { +func (m *RetryPolicyList) GetRetryPolicies() []*RetryPolicy { if m != nil { - return m.Queue + return m.RetryPolicies } return nil } -func (m *QueueUpdateResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type BatchQueueUpdateResponse struct { - FailedQueues []*QueueUpdateResponse `protobuf:"bytes,1,rep,name=failed_queues,json=failedQueues,proto3" json:"failedQueues,omitempty"` +//swagger:model +type QueueGetRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *BatchQueueUpdateResponse) Reset() { *m = BatchQueueUpdateResponse{} } -func (m *BatchQueueUpdateResponse) String() string { return proto.CompactTextString(m) } -func (*BatchQueueUpdateResponse) ProtoMessage() {} -func (*BatchQueueUpdateResponse) Descriptor() ([]byte, []int) { +func (m *QueueGetRequest) Reset() { *m = QueueGetRequest{} } +func (m *QueueGetRequest) String() string { return proto.CompactTextString(m) } +func (*QueueGetRequest) ProtoMessage() {} +func (*QueueGetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{26} } -func (m *BatchQueueUpdateResponse) XXX_Unmarshal(b []byte) error { +func (m *QueueGetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BatchQueueUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueueGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BatchQueueUpdateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueueGetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1987,42 +2081,42 @@ func (m *BatchQueueUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *BatchQueueUpdateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchQueueUpdateResponse.Merge(m, src) +func (m *QueueGetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueGetRequest.Merge(m, src) } -func (m *BatchQueueUpdateResponse) XXX_Size() int { +func (m *QueueGetRequest) XXX_Size() int { return m.Size() } -func (m *BatchQueueUpdateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchQueueUpdateResponse.DiscardUnknown(m) +func (m *QueueGetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueueGetRequest.DiscardUnknown(m) } -var xxx_messageInfo_BatchQueueUpdateResponse proto.InternalMessageInfo +var xxx_messageInfo_QueueGetRequest proto.InternalMessageInfo -func (m *BatchQueueUpdateResponse) GetFailedQueues() []*QueueUpdateResponse { +func (m *QueueGetRequest) GetName() string { if m != nil { - return m.FailedQueues + return m.Name } - return nil + return "" } -type QueueCreateResponse struct { - Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +//swagger:model +type QueueCordonRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *QueueCreateResponse) Reset() { *m = QueueCreateResponse{} } -func (m *QueueCreateResponse) String() string { return proto.CompactTextString(m) } -func (*QueueCreateResponse) ProtoMessage() {} -func (*QueueCreateResponse) Descriptor() ([]byte, []int) { +func (m *QueueCordonRequest) Reset() { *m = QueueCordonRequest{} } +func (m *QueueCordonRequest) String() string { return proto.CompactTextString(m) } +func (*QueueCordonRequest) ProtoMessage() {} +func (*QueueCordonRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{27} } -func (m *QueueCreateResponse) XXX_Unmarshal(b []byte) error { +func (m *QueueCordonRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueueCordonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueCreateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueueCordonRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2032,48 +2126,42 @@ func (m *QueueCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueueCreateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueCreateResponse.Merge(m, src) +func (m *QueueCordonRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueCordonRequest.Merge(m, src) } -func (m *QueueCreateResponse) XXX_Size() int { +func (m *QueueCordonRequest) XXX_Size() int { return m.Size() } -func (m *QueueCreateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueueCreateResponse.DiscardUnknown(m) +func (m *QueueCordonRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueueCordonRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueueCreateResponse proto.InternalMessageInfo - -func (m *QueueCreateResponse) GetQueue() *Queue { - if m != nil { - return m.Queue - } - return nil -} +var xxx_messageInfo_QueueCordonRequest proto.InternalMessageInfo -func (m *QueueCreateResponse) GetError() string { +func (m *QueueCordonRequest) GetName() string { if m != nil { - return m.Error + return m.Name } return "" } -type BatchQueueCreateResponse struct { - FailedQueues []*QueueCreateResponse `protobuf:"bytes,1,rep,name=failed_queues,json=failedQueues,proto3" json:"failedQueues,omitempty"` +//swagger:model +type QueueUncordonRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *BatchQueueCreateResponse) Reset() { *m = BatchQueueCreateResponse{} } -func (m *BatchQueueCreateResponse) String() string { return proto.CompactTextString(m) } -func (*BatchQueueCreateResponse) ProtoMessage() {} -func (*BatchQueueCreateResponse) Descriptor() ([]byte, []int) { +func (m *QueueUncordonRequest) Reset() { *m = QueueUncordonRequest{} } +func (m *QueueUncordonRequest) String() string { return proto.CompactTextString(m) } +func (*QueueUncordonRequest) ProtoMessage() {} +func (*QueueUncordonRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{28} } -func (m *BatchQueueCreateResponse) XXX_Unmarshal(b []byte) error { +func (m *QueueUncordonRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BatchQueueCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueueUncordonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BatchQueueCreateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueueUncordonRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2083,41 +2171,42 @@ func (m *BatchQueueCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *BatchQueueCreateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchQueueCreateResponse.Merge(m, src) +func (m *QueueUncordonRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueUncordonRequest.Merge(m, src) } -func (m *BatchQueueCreateResponse) XXX_Size() int { +func (m *QueueUncordonRequest) XXX_Size() int { return m.Size() } -func (m *BatchQueueCreateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchQueueCreateResponse.DiscardUnknown(m) +func (m *QueueUncordonRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueueUncordonRequest.DiscardUnknown(m) } -var xxx_messageInfo_BatchQueueCreateResponse proto.InternalMessageInfo +var xxx_messageInfo_QueueUncordonRequest proto.InternalMessageInfo -func (m *BatchQueueCreateResponse) GetFailedQueues() []*QueueCreateResponse { +func (m *QueueUncordonRequest) GetName() string { if m != nil { - return m.FailedQueues + return m.Name } - return nil + return "" } -// Indicates the end of streams -type EndMarker struct { +//swagger:model +type StreamingQueueGetRequest struct { + Num uint32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` } -func (m *EndMarker) Reset() { *m = EndMarker{} } -func (m *EndMarker) String() string { return proto.CompactTextString(m) } -func (*EndMarker) ProtoMessage() {} -func (*EndMarker) Descriptor() ([]byte, []int) { +func (m *StreamingQueueGetRequest) Reset() { *m = StreamingQueueGetRequest{} } +func (m *StreamingQueueGetRequest) String() string { return proto.CompactTextString(m) } +func (*StreamingQueueGetRequest) ProtoMessage() {} +func (*StreamingQueueGetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{29} } -func (m *EndMarker) XXX_Unmarshal(b []byte) error { +func (m *StreamingQueueGetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EndMarker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *StreamingQueueGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EndMarker.Marshal(b, m, deterministic) + return xxx_messageInfo_StreamingQueueGetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2127,37 +2216,42 @@ func (m *EndMarker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *EndMarker) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndMarker.Merge(m, src) +func (m *StreamingQueueGetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamingQueueGetRequest.Merge(m, src) } -func (m *EndMarker) XXX_Size() int { +func (m *StreamingQueueGetRequest) XXX_Size() int { return m.Size() } -func (m *EndMarker) XXX_DiscardUnknown() { - xxx_messageInfo_EndMarker.DiscardUnknown(m) +func (m *StreamingQueueGetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StreamingQueueGetRequest.DiscardUnknown(m) } -var xxx_messageInfo_EndMarker proto.InternalMessageInfo +var xxx_messageInfo_StreamingQueueGetRequest proto.InternalMessageInfo -type StreamingQueueMessage struct { - // Types that are valid to be assigned to Event: - // *StreamingQueueMessage_Queue - // *StreamingQueueMessage_End - Event isStreamingQueueMessage_Event `protobuf_oneof:"event"` +func (m *StreamingQueueGetRequest) GetNum() uint32 { + if m != nil { + return m.Num + } + return 0 } -func (m *StreamingQueueMessage) Reset() { *m = StreamingQueueMessage{} } -func (m *StreamingQueueMessage) String() string { return proto.CompactTextString(m) } -func (*StreamingQueueMessage) ProtoMessage() {} -func (*StreamingQueueMessage) Descriptor() ([]byte, []int) { +//swagger:model +type QueueDeleteRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *QueueDeleteRequest) Reset() { *m = QueueDeleteRequest{} } +func (m *QueueDeleteRequest) String() string { return proto.CompactTextString(m) } +func (*QueueDeleteRequest) ProtoMessage() {} +func (*QueueDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{30} } -func (m *StreamingQueueMessage) XXX_Unmarshal(b []byte) error { +func (m *QueueDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *StreamingQueueMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueueDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_StreamingQueueMessage.Marshal(b, m, deterministic) + return xxx_messageInfo_QueueDeleteRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2167,82 +2261,43 @@ func (m *StreamingQueueMessage) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *StreamingQueueMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamingQueueMessage.Merge(m, src) +func (m *QueueDeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueDeleteRequest.Merge(m, src) } -func (m *StreamingQueueMessage) XXX_Size() int { +func (m *QueueDeleteRequest) XXX_Size() int { return m.Size() } -func (m *StreamingQueueMessage) XXX_DiscardUnknown() { - xxx_messageInfo_StreamingQueueMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_StreamingQueueMessage proto.InternalMessageInfo - -type isStreamingQueueMessage_Event interface { - isStreamingQueueMessage_Event() - MarshalTo([]byte) (int, error) - Size() int -} - -type StreamingQueueMessage_Queue struct { - Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3,oneof" json:"queue,omitempty"` -} -type StreamingQueueMessage_End struct { - End *EndMarker `protobuf:"bytes,2,opt,name=end,proto3,oneof" json:"end,omitempty"` +func (m *QueueDeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueueDeleteRequest.DiscardUnknown(m) } -func (*StreamingQueueMessage_Queue) isStreamingQueueMessage_Event() {} -func (*StreamingQueueMessage_End) isStreamingQueueMessage_Event() {} +var xxx_messageInfo_QueueDeleteRequest proto.InternalMessageInfo -func (m *StreamingQueueMessage) GetEvent() isStreamingQueueMessage_Event { +func (m *QueueDeleteRequest) GetName() string { if m != nil { - return m.Event - } - return nil -} - -func (m *StreamingQueueMessage) GetQueue() *Queue { - if x, ok := m.GetEvent().(*StreamingQueueMessage_Queue); ok { - return x.Queue - } - return nil -} - -func (m *StreamingQueueMessage) GetEnd() *EndMarker { - if x, ok := m.GetEvent().(*StreamingQueueMessage_End); ok { - return x.End - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*StreamingQueueMessage) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*StreamingQueueMessage_Queue)(nil), - (*StreamingQueueMessage_End)(nil), + return m.Name } + return "" } -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"` - // If empty, jobs on all pools will be preempted - Pools []string `protobuf:"bytes,3,rep,name=pools,proto3" json:"pools,omitempty"` +type JobSetInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + QueuedJobs int32 `protobuf:"varint,2,opt,name=queued_jobs,json=queuedJobs,proto3" json:"queuedJobs,omitempty"` + LeasedJobs int32 `protobuf:"varint,3,opt,name=leased_jobs,json=leasedJobs,proto3" json:"leasedJobs,omitempty"` } -func (m *QueuePreemptRequest) Reset() { *m = QueuePreemptRequest{} } -func (m *QueuePreemptRequest) String() string { return proto.CompactTextString(m) } -func (*QueuePreemptRequest) ProtoMessage() {} -func (*QueuePreemptRequest) Descriptor() ([]byte, []int) { +func (m *JobSetInfo) Reset() { *m = JobSetInfo{} } +func (m *JobSetInfo) String() string { return proto.CompactTextString(m) } +func (*JobSetInfo) ProtoMessage() {} +func (*JobSetInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{31} } -func (m *QueuePreemptRequest) XXX_Unmarshal(b []byte) error { +func (m *JobSetInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueuePreemptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *JobSetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueuePreemptRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_JobSetInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2252,60 +2307,56 @@ func (m *QueuePreemptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueuePreemptRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueuePreemptRequest.Merge(m, src) +func (m *JobSetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobSetInfo.Merge(m, src) } -func (m *QueuePreemptRequest) XXX_Size() int { +func (m *JobSetInfo) XXX_Size() int { return m.Size() } -func (m *QueuePreemptRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueuePreemptRequest.DiscardUnknown(m) +func (m *JobSetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_JobSetInfo.DiscardUnknown(m) } -var xxx_messageInfo_QueuePreemptRequest proto.InternalMessageInfo +var xxx_messageInfo_JobSetInfo proto.InternalMessageInfo -func (m *QueuePreemptRequest) GetName() string { +func (m *JobSetInfo) GetName() string { if m != nil { return m.Name } return "" } -func (m *QueuePreemptRequest) GetPriorityClasses() []string { +func (m *JobSetInfo) GetQueuedJobs() int32 { if m != nil { - return m.PriorityClasses + return m.QueuedJobs } - return nil + return 0 } -func (m *QueuePreemptRequest) GetPools() []string { +func (m *JobSetInfo) GetLeasedJobs() int32 { if m != nil { - return m.Pools + return m.LeasedJobs } - return nil + return 0 } -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"` - // If empty, jobs on all pools will be cancelled - Pools []string `protobuf:"bytes,4,rep,name=pools,proto3" json:"pools,omitempty"` +type QueueUpdateResponse struct { + Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func (m *QueueCancelRequest) Reset() { *m = QueueCancelRequest{} } -func (m *QueueCancelRequest) String() string { return proto.CompactTextString(m) } -func (*QueueCancelRequest) ProtoMessage() {} -func (*QueueCancelRequest) Descriptor() ([]byte, []int) { +func (m *QueueUpdateResponse) Reset() { *m = QueueUpdateResponse{} } +func (m *QueueUpdateResponse) String() string { return proto.CompactTextString(m) } +func (*QueueUpdateResponse) ProtoMessage() {} +func (*QueueUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e998bacb27df16c1, []int{32} } -func (m *QueueCancelRequest) XXX_Unmarshal(b []byte) error { +func (m *QueueUpdateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueueCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueueUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueueCancelRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueueUpdateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2315,909 +2366,827 @@ func (m *QueueCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueueCancelRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueueCancelRequest.Merge(m, src) +func (m *QueueUpdateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueUpdateResponse.Merge(m, src) } -func (m *QueueCancelRequest) XXX_Size() int { +func (m *QueueUpdateResponse) XXX_Size() int { return m.Size() } -func (m *QueueCancelRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueueCancelRequest.DiscardUnknown(m) +func (m *QueueUpdateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueueUpdateResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueueCancelRequest proto.InternalMessageInfo +var xxx_messageInfo_QueueUpdateResponse proto.InternalMessageInfo -func (m *QueueCancelRequest) GetName() string { +func (m *QueueUpdateResponse) GetQueue() *Queue { if m != nil { - return m.Name + return m.Queue } - return "" + return nil } -func (m *QueueCancelRequest) GetPriorityClasses() []string { +func (m *QueueUpdateResponse) GetError() string { if m != nil { - return m.PriorityClasses + return m.Error } - return nil + return "" } -func (m *QueueCancelRequest) GetJobStates() []JobState { - if m != nil { - return m.JobStates - } - return nil +type BatchQueueUpdateResponse struct { + FailedQueues []*QueueUpdateResponse `protobuf:"bytes,1,rep,name=failed_queues,json=failedQueues,proto3" json:"failedQueues,omitempty"` } -func (m *QueueCancelRequest) GetPools() []string { - if m != nil { - return m.Pools +func (m *BatchQueueUpdateResponse) Reset() { *m = BatchQueueUpdateResponse{} } +func (m *BatchQueueUpdateResponse) String() string { return proto.CompactTextString(m) } +func (*BatchQueueUpdateResponse) ProtoMessage() {} +func (*BatchQueueUpdateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{33} +} +func (m *BatchQueueUpdateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchQueueUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchQueueUpdateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil } - -func init() { - proto.RegisterEnum("api.IngressType", IngressType_name, IngressType_value) - proto.RegisterEnum("api.ServiceType", ServiceType_name, ServiceType_value) - proto.RegisterEnum("api.JobState", JobState_name, JobState_value) - proto.RegisterType((*JobSubmitRequestItem)(nil), "api.JobSubmitRequestItem") - proto.RegisterMapType((map[string]string)(nil), "api.JobSubmitRequestItem.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "api.JobSubmitRequestItem.LabelsEntry") - proto.RegisterMapType((map[string]string)(nil), "api.JobSubmitRequestItem.RequiredNodeLabelsEntry") - proto.RegisterType((*IngressConfig)(nil), "api.IngressConfig") - proto.RegisterMapType((map[string]string)(nil), "api.IngressConfig.AnnotationsEntry") - proto.RegisterType((*ServiceConfig)(nil), "api.ServiceConfig") - proto.RegisterType((*JobSubmitRequest)(nil), "api.JobSubmitRequest") - proto.RegisterType((*JobPreemptRequest)(nil), "api.JobPreemptRequest") - proto.RegisterType((*JobCancelRequest)(nil), "api.JobCancelRequest") - proto.RegisterType((*JobSetCancelRequest)(nil), "api.JobSetCancelRequest") - proto.RegisterType((*JobSetFilter)(nil), "api.JobSetFilter") - proto.RegisterType((*Job)(nil), "api.Job") - proto.RegisterMapType((map[string]string)(nil), "api.Job.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "api.Job.LabelsEntry") - proto.RegisterMapType((map[string]string)(nil), "api.Job.RequiredNodeLabelsEntry") - proto.RegisterType((*JobReprioritizeRequest)(nil), "api.JobReprioritizeRequest") - proto.RegisterType((*JobReprioritizeResponse)(nil), "api.JobReprioritizeResponse") - proto.RegisterMapType((map[string]string)(nil), "api.JobReprioritizeResponse.ReprioritizationResultsEntry") - proto.RegisterType((*JobSubmitResponseItem)(nil), "api.JobSubmitResponseItem") - proto.RegisterType((*JobSubmitResponse)(nil), "api.JobSubmitResponse") - proto.RegisterType((*Queue)(nil), "api.Queue") - proto.RegisterMapType((map[string]string)(nil), "api.Queue.LabelsEntry") - proto.RegisterMapType((map[string]*PriorityClassResourceLimits)(nil), "api.Queue.ResourceLimitsByPriorityClassNameEntry") - proto.RegisterMapType((map[string]float64)(nil), "api.Queue.ResourceLimitsEntry") - proto.RegisterType((*Queue_Permissions)(nil), "api.Queue.Permissions") - proto.RegisterType((*Queue_Permissions_Subject)(nil), "api.Queue.Permissions.Subject") - proto.RegisterType((*PriorityClassResourceLimits)(nil), "api.PriorityClassResourceLimits") - proto.RegisterMapType((map[string]*PriorityClassPoolResourceLimits)(nil), "api.PriorityClassResourceLimits.MaximumResourceFractionByPoolEntry") - proto.RegisterMapType((map[string]float64)(nil), "api.PriorityClassResourceLimits.MaximumResourceFractionEntry") - proto.RegisterType((*PriorityClassPoolResourceLimits)(nil), "api.PriorityClassPoolResourceLimits") - proto.RegisterMapType((map[string]float64)(nil), "api.PriorityClassPoolResourceLimits.MaximumResourceFractionEntry") - proto.RegisterType((*QueueList)(nil), "api.QueueList") - proto.RegisterType((*CancellationResult)(nil), "api.CancellationResult") - proto.RegisterType((*PreemptionResult)(nil), "api.PreemptionResult") - proto.RegisterMapType((map[string]string)(nil), "api.PreemptionResult.PreemptionResultsEntry") - proto.RegisterType((*QueueGetRequest)(nil), "api.QueueGetRequest") - proto.RegisterType((*QueueCordonRequest)(nil), "api.QueueCordonRequest") - proto.RegisterType((*QueueUncordonRequest)(nil), "api.QueueUncordonRequest") - proto.RegisterType((*StreamingQueueGetRequest)(nil), "api.StreamingQueueGetRequest") - proto.RegisterType((*QueueDeleteRequest)(nil), "api.QueueDeleteRequest") - proto.RegisterType((*JobSetInfo)(nil), "api.JobSetInfo") - proto.RegisterType((*QueueUpdateResponse)(nil), "api.QueueUpdateResponse") - proto.RegisterType((*BatchQueueUpdateResponse)(nil), "api.BatchQueueUpdateResponse") - proto.RegisterType((*QueueCreateResponse)(nil), "api.QueueCreateResponse") - 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 (m *BatchQueueUpdateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchQueueUpdateResponse.Merge(m, src) } - -func init() { proto.RegisterFile("pkg/api/submit.proto", fileDescriptor_e998bacb27df16c1) } - -var fileDescriptor_e998bacb27df16c1 = []byte{ - // 3206 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3a, 0x4b, 0x6f, 0x1b, 0xd7, - 0xd5, 0x1a, 0x51, 0x2f, 0x1e, 0x8a, 0x12, 0x75, 0xf5, 0x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 0xa7, 0xe6, 0x05, 0x16, 0x82, 0x0c, 0x91, 0x33, 0xfa, 0x50, 0x82, - 0x39, 0x1b, 0xbf, 0x5f, 0xd3, 0x6d, 0xac, 0x15, 0x0c, 0x53, 0xc3, 0x05, 0x6e, 0xcc, 0x18, 0x15, - 0x79, 0xad, 0xb3, 0xc8, 0x3c, 0xa7, 0xda, 0x35, 0x35, 0x2c, 0x1a, 0xa6, 0x34, 0xea, 0xa9, 0x8b, - 0x76, 0xcb, 0x62, 0xa0, 0x80, 0x2c, 0xe5, 0x51, 0xeb, 0x3a, 0x7a, 0x08, 0x13, 0x96, 0xa9, 0x15, - 0x1c, 0x0b, 0x97, 0xe4, 0xe1, 0x15, 0x69, 0x35, 0xb6, 0xb1, 0x94, 0x66, 0x11, 0x47, 0x75, 0x20, - 0x51, 0x99, 0x3e, 0xbd, 0x96, 0xde, 0x33, 0xb5, 0x7d, 0x0b, 0x97, 0xe8, 0x7e, 0xce, 0x58, 0xec, - 0x23, 0xc4, 0x7b, 0x9c, 0x03, 0xd1, 0x1e, 0x44, 0x3d, 0x86, 0x8e, 0x3c, 0x4e, 0xcd, 0xe9, 0xca, - 0x91, 0x85, 0x15, 0xfb, 0x70, 0x42, 0x61, 0xc5, 0x61, 0x28, 0x0b, 0xe3, 0xba, 0x51, 0xb6, 0xb1, - 0xe3, 0xc8, 0x51, 0xca, 0x0f, 0x51, 0x46, 0xdb, 0x0c, 0x96, 0x35, 0x8d, 0x43, 0xbd, 0x9c, 0x99, - 0x27, 0x8a, 0x71, 0x34, 0x81, 0x8b, 0x47, 0x89, 0x6e, 0xc3, 0x84, 0x83, 0xed, 0x53, 0xbd, 0x84, - 0x1d, 0x19, 0x04, 0x2e, 0xfb, 0x0c, 0xc8, 0xb9, 0x50, 0x65, 0x3c, 0x3c, 0x51, 0x19, 0x0f, 0x46, - 0x62, 0xdc, 0x29, 0x1d, 0x61, 0xad, 0x56, 0xc1, 0xb6, 0x1c, 0x0b, 0x62, 0xdc, 0x07, 0x8a, 0x31, - 0xee, 0x03, 0x93, 0x2a, 0xc4, 0x84, 0xdd, 0x42, 0x2f, 0x42, 0xe4, 0x04, 0xb3, 0x83, 0x15, 0xcd, - 0xcc, 0x34, 0xea, 0xa9, 0xf8, 0x09, 0x16, 0xcf, 0x14, 0x59, 0x45, 0x57, 0x60, 0xf4, 0x54, 0xad, - 0xd4, 0x30, 0xdd, 0x97, 0x68, 0x66, 0xb6, 0x51, 0x4f, 0x4d, 0x53, 0x80, 0x80, 0xc8, 0x30, 0x6e, - 0x0e, 0x5f, 0x97, 0x92, 0x87, 0x90, 0x68, 0x8e, 0xc7, 0x73, 0x91, 0x53, 0x85, 0x0b, 0x1d, 0x82, - 0xf0, 0x3c, 0xc4, 0xed, 0x8c, 0x4c, 0x4c, 0x26, 0xe2, 0xca, 0x3f, 0x22, 0x10, 0x0f, 0x6d, 0x38, - 0xba, 0x09, 0x23, 0xee, 0x99, 0x85, 0xa9, 0xb0, 0xa9, 0x8d, 0x84, 0x18, 0x12, 0x8f, 0xce, 0x2c, - 0x4c, 0x4f, 0xfa, 0x14, 0xc1, 0x08, 0x85, 0x29, 0xa5, 0x21, 0x2a, 0x58, 0xa6, 0xed, 0x3a, 0xf2, - 0xf0, 0x4a, 0x64, 0x35, 0xce, 0x54, 0xa0, 0x00, 0x51, 0x05, 0x0a, 0x40, 0x5f, 0x0b, 0xa7, 0x84, - 0x08, 0x0d, 0x9d, 0x17, 0x5b, 0x03, 0xf0, 0xc9, 0x73, 0xc1, 0x0d, 0x88, 0xb9, 0x15, 0xa7, 0x80, - 0x0d, 0xb5, 0x58, 0xc1, 0x9a, 0x3c, 0xb2, 0x22, 0xad, 0x4e, 0x64, 0xe4, 0x46, 0x3d, 0x35, 0xe7, - 0x12, 0xbf, 0x52, 0xa8, 0x40, 0x0b, 0x01, 0x94, 0x66, 0x4e, 0x6c, 0xbb, 0x05, 0x92, 0x4b, 0xe5, - 0x51, 0x21, 0x73, 0x62, 0xdb, 0xdd, 0x55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 0x2a, 0x8c, 0xd9, - 0x58, 0x75, 0x4c, 0x83, 0x1e, 0x1a, 0x8e, 0xcd, 0x20, 0x22, 0x36, 0x83, 0x28, 0xff, 0x62, 0xfb, - 0x95, 0x55, 0x8d, 0x12, 0xae, 0x78, 0x26, 0xad, 0xc1, 0x18, 0x93, 0x28, 0xda, 0x44, 0xd9, 0x8b, - 0x36, 0x51, 0xc0, 0x13, 0xda, 0xe4, 0x3b, 0x2d, 0xd2, 0xd3, 0x69, 0x82, 0xf9, 0x23, 0x03, 0x99, - 0x3f, 0xda, 0x87, 0xf9, 0x7f, 0x95, 0x60, 0x76, 0x87, 0x2a, 0x15, 0xf6, 0x40, 0xd8, 0x2a, 0x69, - 0x50, 0xab, 0x86, 0x7b, 0x5a, 0x75, 0x0b, 0xc6, 0x0e, 0xf5, 0x8a, 0x8b, 0x6d, 0xea, 0x81, 0xd8, - 0xc6, 0x8c, 0x1f, 0xa6, 0xd8, 0xbd, 0x4d, 0x17, 0x98, 0xe6, 0x0c, 0x49, 0xd4, 0x9c, 0x41, 0x06, - 0xdc, 0xe6, 0x7b, 0x30, 0x29, 0xf2, 0x46, 0xff, 0x0f, 0x63, 0x8e, 0xab, 0xba, 0xd8, 0x91, 0xa5, - 0x95, 0xc8, 0xea, 0xd4, 0x46, 0xdc, 0x17, 0x4f, 0xa0, 0x8c, 0x19, 0x43, 0x10, 0x99, 0x31, 0x88, - 0xf2, 0xf3, 0x69, 0x88, 0xec, 0x98, 0x45, 0xb4, 0x02, 0xc3, 0xbe, 0x73, 0x12, 0x8d, 0x7a, 0x6a, - 0x52, 0x17, 0xdd, 0x32, 0xac, 0x6b, 0xe1, 0x26, 0x36, 0xde, 0x67, 0x13, 0x7b, 0xee, 0x11, 0x15, - 0xea, 0xc8, 0xc7, 0xfb, 0xee, 0xc8, 0x33, 0x7e, 0x73, 0xcd, 0x1a, 0xae, 0x39, 0xcf, 0x67, 0x03, - 0xf4, 0xd2, 0x6f, 0x87, 0x0b, 0x27, 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0x5e, 0x71, 0xaf, 0xf4, 0x36, 0xb3, 0x3f, 0xd1, 0x0f, - 0xc3, 0x31, 0xff, 0x52, 0xab, 0x7f, 0x09, 0xc3, 0xc1, 0xe2, 0x5e, 0xf9, 0xcd, 0x30, 0xa4, 0x7a, - 0xf0, 0x40, 0x3f, 0xed, 0x23, 0x30, 0x37, 0xfb, 0xd1, 0xe6, 0x5c, 0x83, 0xf3, 0xf3, 0xd8, 0x5f, - 0x25, 0x07, 0x51, 0x5a, 0x07, 0xee, 0xeb, 0x8e, 0x8b, 0xae, 0xc3, 0x18, 0x6d, 0xe7, 0xbd, 0x3a, - 0x01, 0x41, 0x9d, 0x60, 0x35, 0x87, 0xad, 0x8a, 0x35, 0x87, 0x41, 0x94, 0x03, 0x40, 0xec, 0x0e, - 0xb6, 0x22, 0xf4, 0xc0, 0xe8, 0x16, 0xc4, 0x4b, 0x0c, 0x8a, 0x35, 0x61, 0x56, 0xa1, 0xef, 0x32, - 0xfe, 0x42, 0x78, 0x62, 0x99, 0x14, 0xe1, 0xca, 0xbf, 0x25, 0x48, 0xf0, 0x1b, 0xfb, 0x80, 0xeb, - 0xb7, 0x00, 0x59, 0x3e, 0xac, 0x69, 0x14, 0xb8, 0xca, 0x77, 0x31, 0x4c, 0xd2, 0x02, 0xe0, 0x75, - 0x34, 0xd5, 0xa8, 0xa7, 0x96, 0xac, 0xe6, 0x35, 0x41, 0x9b, 0x99, 0x96, 0xc5, 0x64, 0x05, 0x16, - 0xda, 0x73, 0x3b, 0x97, 0x94, 0x7b, 0x03, 0xa6, 0xa9, 0xfb, 0xef, 0x60, 0xff, 0xc9, 0xa2, 0xcf, - 0x2e, 0x58, 0x79, 0x13, 0x10, 0x25, 0xcd, 0xd2, 0x66, 0x65, 0x50, 0xea, 0x2f, 0xc2, 0x1c, 0xa5, - 0x3e, 0x30, 0x4a, 0x4f, 0x44, 0x7f, 0x0b, 0xe4, 0x7d, 0xd7, 0xc6, 0x6a, 0x55, 0x37, 0xca, 0xcd, - 0x16, 0xbc, 0x08, 0x11, 0xa3, 0x56, 0xa5, 0x2c, 0xe2, 0xcc, 0x51, 0x46, 0xad, 0x2a, 0x3a, 0xca, - 0xa8, 0x55, 0x7d, 0xf5, 0xb7, 0x70, 0x05, 0xbb, 0x78, 0x50, 0xf1, 0x1f, 0x4b, 0x00, 0xec, 0xce, - 0x7c, 0xdb, 0x38, 0x34, 0xfb, 0x9e, 0x1c, 0x6e, 0x40, 0x8c, 0x06, 0xb4, 0x56, 0x38, 0x36, 0x69, - 0x73, 0x23, 0xad, 0x8e, 0xb2, 0x96, 0x9f, 0x81, 0x77, 0xcc, 0x50, 0x87, 0x03, 0x01, 0x94, 0x90, - 0x56, 0xb0, 0xea, 0x78, 0xa4, 0x91, 0x80, 0x94, 0x81, 0x9b, 0x49, 0x03, 0xa8, 0xf2, 0x18, 0x66, - 0x99, 0xaf, 0x2d, 0x4d, 0x75, 0x83, 0xc9, 0xf7, 0x0d, 0xf1, 0x6d, 0x2a, 0x7c, 0x18, 0xbb, 0x8d, - 0xe2, 0x03, 0x4c, 0x76, 0x35, 0x90, 0x33, 0xaa, 0x5b, 0x3a, 0x6a, 0x27, 0xfd, 0x3d, 0x88, 0x1f, - 0xaa, 0x7a, 0xc5, 0xbb, 0x85, 0xf5, 0x0e, 0x98, 0x1c, 0x68, 0x11, 0x26, 0x60, 0xa7, 0x9a, 0x91, - 0xbc, 0xd5, 0x9c, 0x26, 0x26, 0x45, 0xb8, 0x6f, 0x6f, 0x96, 0xde, 0xd3, 0x7d, 0x5e, 0xf6, 0x36, - 0x49, 0xef, 0x6d, 0x6f, 0x98, 0x60, 0x00, 0x7b, 0x63, 0x10, 0xcd, 0x19, 0xda, 0x03, 0xd5, 0x3e, - 0xc1, 0xb6, 0xf2, 0x91, 0x04, 0xf3, 0xe1, 0x93, 0xf1, 0x00, 0x3b, 0x8e, 0x5a, 0xc6, 0xe8, 0xff, - 0x06, 0xb3, 0xff, 0xee, 0x50, 0xf0, 0x24, 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0xb3, 0xe5, 0xa1, 0x3f, 0x7e, 0xb6, 0x3c, 0xf4, 0xe5, 0x57, 0xca, 0xba, 0x7b, 0x54, 0x2b, - 0xa6, 0x4b, 0x66, 0x75, 0x5d, 0xb5, 0xab, 0xaa, 0xa6, 0x5a, 0xb6, 0x79, 0x8c, 0x4b, 0x2e, 0xff, - 0x5a, 0xe7, 0xff, 0xb8, 0xff, 0x78, 0x78, 0x6e, 0x93, 0x02, 0xf6, 0xd8, 0x72, 0x7a, 0xdb, 0x4c, - 0x6f, 0x5a, 0x7a, 0x71, 0x8c, 0xea, 0xf0, 0xfa, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xb6, - 0x94, 0xb5, 0x5f, 0x30, 0x00, 0x00, +func (m *BatchQueueUpdateResponse) XXX_Size() int { + return m.Size() +} +func (m *BatchQueueUpdateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BatchQueueUpdateResponse.DiscardUnknown(m) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +var xxx_messageInfo_BatchQueueUpdateResponse proto.InternalMessageInfo -// QueueServiceClient is the client API for QueueService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueueServiceClient interface { - CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) - CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) - UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) - UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) - DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) - GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) - 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) +func (m *BatchQueueUpdateResponse) GetFailedQueues() []*QueueUpdateResponse { + if m != nil { + return m.FailedQueues + } + return nil } -type queueServiceClient struct { - cc *grpc.ClientConn +type QueueCreateResponse struct { + Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func NewQueueServiceClient(cc *grpc.ClientConn) QueueServiceClient { - return &queueServiceClient{cc} +func (m *QueueCreateResponse) Reset() { *m = QueueCreateResponse{} } +func (m *QueueCreateResponse) String() string { return proto.CompactTextString(m) } +func (*QueueCreateResponse) ProtoMessage() {} +func (*QueueCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{34} } - -func (c *queueServiceClient) CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.QueueService/CreateQueue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QueueCreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *queueServiceClient) CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) { - out := new(BatchQueueCreateResponse) - err := c.cc.Invoke(ctx, "/api.QueueService/CreateQueues", in, out, opts...) - if err != nil { - return nil, err +func (m *QueueCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueueCreateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil } - -func (c *queueServiceClient) UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.QueueService/UpdateQueue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QueueCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueueCreateResponse.Merge(m, src) +} +func (m *QueueCreateResponse) XXX_Size() int { + return m.Size() +} +func (m *QueueCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueueCreateResponse.DiscardUnknown(m) } -func (c *queueServiceClient) UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) { - out := new(BatchQueueUpdateResponse) - err := c.cc.Invoke(ctx, "/api.QueueService/UpdateQueues", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueueCreateResponse proto.InternalMessageInfo + +func (m *QueueCreateResponse) GetQueue() *Queue { + if m != nil { + return m.Queue } - return out, nil + return nil } -func (c *queueServiceClient) DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.QueueService/DeleteQueue", in, out, opts...) - if err != nil { - return nil, err +func (m *QueueCreateResponse) GetError() string { + if m != nil { + return m.Error } - return out, nil + return "" } -func (c *queueServiceClient) GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) { - out := new(Queue) - err := c.cc.Invoke(ctx, "/api.QueueService/GetQueue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type BatchQueueCreateResponse struct { + FailedQueues []*QueueCreateResponse `protobuf:"bytes,1,rep,name=failed_queues,json=failedQueues,proto3" json:"failedQueues,omitempty"` } -func (c *queueServiceClient) GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (QueueService_GetQueuesClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueueService_serviceDesc.Streams[0], "/api.QueueService/GetQueues", opts...) - if err != nil { - return nil, err - } - x := &queueServiceGetQueuesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err +func (m *BatchQueueCreateResponse) Reset() { *m = BatchQueueCreateResponse{} } +func (m *BatchQueueCreateResponse) String() string { return proto.CompactTextString(m) } +func (*BatchQueueCreateResponse) ProtoMessage() {} +func (*BatchQueueCreateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{35} +} +func (m *BatchQueueCreateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchQueueCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchQueueCreateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return x, nil } - -type QueueService_GetQueuesClient interface { - Recv() (*StreamingQueueMessage, error) - grpc.ClientStream +func (m *BatchQueueCreateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchQueueCreateResponse.Merge(m, src) } - -type queueServiceGetQueuesClient struct { - grpc.ClientStream +func (m *BatchQueueCreateResponse) XXX_Size() int { + return m.Size() } - -func (x *queueServiceGetQueuesClient) Recv() (*StreamingQueueMessage, error) { - m := new(StreamingQueueMessage) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil +func (m *BatchQueueCreateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BatchQueueCreateResponse.DiscardUnknown(m) } -func (c *queueServiceClient) CordonQueue(ctx context.Context, in *QueueCordonRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.QueueService/CordonQueue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} +var xxx_messageInfo_BatchQueueCreateResponse proto.InternalMessageInfo -func (c *queueServiceClient) UncordonQueue(ctx context.Context, in *QueueUncordonRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.QueueService/UncordonQueue", in, out, opts...) - if err != nil { - return nil, err +func (m *BatchQueueCreateResponse) GetFailedQueues() []*QueueCreateResponse { + if m != nil { + return m.FailedQueues } - return out, nil + return 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 +// Indicates the end of streams +type EndMarker struct { } -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 +func (m *EndMarker) Reset() { *m = EndMarker{} } +func (m *EndMarker) String() string { return proto.CompactTextString(m) } +func (*EndMarker) ProtoMessage() {} +func (*EndMarker) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{36} } - -// QueueServiceServer is the server API for QueueService service. -type QueueServiceServer interface { - CreateQueue(context.Context, *Queue) (*types.Empty, error) - CreateQueues(context.Context, *QueueList) (*BatchQueueCreateResponse, error) - UpdateQueue(context.Context, *Queue) (*types.Empty, error) - UpdateQueues(context.Context, *QueueList) (*BatchQueueUpdateResponse, error) - DeleteQueue(context.Context, *QueueDeleteRequest) (*types.Empty, error) - GetQueue(context.Context, *QueueGetRequest) (*Queue, error) - 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) +func (m *EndMarker) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -// UnimplementedQueueServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueueServiceServer struct { +func (m *EndMarker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EndMarker.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 (*UnimplementedQueueServiceServer) CreateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateQueue not implemented") +func (m *EndMarker) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndMarker.Merge(m, src) } -func (*UnimplementedQueueServiceServer) CreateQueues(ctx context.Context, req *QueueList) (*BatchQueueCreateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateQueues not implemented") +func (m *EndMarker) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueueServiceServer) UpdateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateQueue not implemented") +func (m *EndMarker) XXX_DiscardUnknown() { + xxx_messageInfo_EndMarker.DiscardUnknown(m) } -func (*UnimplementedQueueServiceServer) UpdateQueues(ctx context.Context, req *QueueList) (*BatchQueueUpdateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateQueues not implemented") + +var xxx_messageInfo_EndMarker proto.InternalMessageInfo + +type StreamingQueueMessage struct { + // Types that are valid to be assigned to Event: + // *StreamingQueueMessage_Queue + // *StreamingQueueMessage_End + Event isStreamingQueueMessage_Event `protobuf_oneof:"event"` } -func (*UnimplementedQueueServiceServer) DeleteQueue(ctx context.Context, req *QueueDeleteRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteQueue not implemented") + +func (m *StreamingQueueMessage) Reset() { *m = StreamingQueueMessage{} } +func (m *StreamingQueueMessage) String() string { return proto.CompactTextString(m) } +func (*StreamingQueueMessage) ProtoMessage() {} +func (*StreamingQueueMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_e998bacb27df16c1, []int{37} } -func (*UnimplementedQueueServiceServer) GetQueue(ctx context.Context, req *QueueGetRequest) (*Queue, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented") +func (m *StreamingQueueMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueueServiceServer) GetQueues(req *StreamingQueueGetRequest, srv QueueService_GetQueuesServer) error { - return status.Errorf(codes.Unimplemented, "method GetQueues not implemented") +func (m *StreamingQueueMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StreamingQueueMessage.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 (*UnimplementedQueueServiceServer) CordonQueue(ctx context.Context, req *QueueCordonRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CordonQueue not implemented") +func (m *StreamingQueueMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamingQueueMessage.Merge(m, src) } -func (*UnimplementedQueueServiceServer) UncordonQueue(ctx context.Context, req *QueueUncordonRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UncordonQueue not implemented") +func (m *StreamingQueueMessage) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueueServiceServer) PreemptOnQueue(ctx context.Context, req *QueuePreemptRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method PreemptOnQueue not implemented") +func (m *StreamingQueueMessage) XXX_DiscardUnknown() { + xxx_messageInfo_StreamingQueueMessage.DiscardUnknown(m) } -func (*UnimplementedQueueServiceServer) CancelOnQueue(ctx context.Context, req *QueueCancelRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelOnQueue not implemented") + +var xxx_messageInfo_StreamingQueueMessage proto.InternalMessageInfo + +type isStreamingQueueMessage_Event interface { + isStreamingQueueMessage_Event() + MarshalTo([]byte) (int, error) + Size() int } -func RegisterQueueServiceServer(s *grpc.Server, srv QueueServiceServer) { - s.RegisterService(&_QueueService_serviceDesc, srv) +type StreamingQueueMessage_Queue struct { + Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3,oneof" json:"queue,omitempty"` +} +type StreamingQueueMessage_End struct { + End *EndMarker `protobuf:"bytes,2,opt,name=end,proto3,oneof" json:"end,omitempty"` } -func _QueueService_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Queue) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).CreateQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/CreateQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).CreateQueue(ctx, req.(*Queue)) +func (*StreamingQueueMessage_Queue) isStreamingQueueMessage_Event() {} +func (*StreamingQueueMessage_End) isStreamingQueueMessage_Event() {} + +func (m *StreamingQueueMessage) GetEvent() isStreamingQueueMessage_Event { + if m != nil { + return m.Event } - return interceptor(ctx, in, info, handler) + return nil } -func _QueueService_CreateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueList) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).CreateQueues(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/CreateQueues", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).CreateQueues(ctx, req.(*QueueList)) +func (m *StreamingQueueMessage) GetQueue() *Queue { + if x, ok := m.GetEvent().(*StreamingQueueMessage_Queue); ok { + return x.Queue } - return interceptor(ctx, in, info, handler) + return nil } -func _QueueService_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Queue) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).UpdateQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/UpdateQueue", +func (m *StreamingQueueMessage) GetEnd() *EndMarker { + if x, ok := m.GetEvent().(*StreamingQueueMessage_End); ok { + return x.End } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).UpdateQueue(ctx, req.(*Queue)) + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*StreamingQueueMessage) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*StreamingQueueMessage_Queue)(nil), + (*StreamingQueueMessage_End)(nil), } - return interceptor(ctx, in, info, handler) } -func _QueueService_UpdateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueList) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).UpdateQueues(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/UpdateQueues", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).UpdateQueues(ctx, req.(*QueueList)) - } - return interceptor(ctx, in, info, handler) +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"` + // If empty, jobs on all pools will be preempted + Pools []string `protobuf:"bytes,3,rep,name=pools,proto3" json:"pools,omitempty"` } -func _QueueService_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueDeleteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).DeleteQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/DeleteQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).DeleteQueue(ctx, req.(*QueueDeleteRequest)) +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{38} +} +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 } - return interceptor(ctx, in, info, handler) +} +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) } -func _QueueService_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueGetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).GetQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/GetQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).GetQueue(ctx, req.(*QueueGetRequest)) +var xxx_messageInfo_QueuePreemptRequest proto.InternalMessageInfo + +func (m *QueuePreemptRequest) GetName() string { + if m != nil { + return m.Name } - return interceptor(ctx, in, info, handler) + return "" } -func _QueueService_GetQueues_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StreamingQueueGetRequest) - if err := stream.RecvMsg(m); err != nil { - return err +func (m *QueuePreemptRequest) GetPriorityClasses() []string { + if m != nil { + return m.PriorityClasses } - return srv.(QueueServiceServer).GetQueues(m, &queueServiceGetQueuesServer{stream}) + return nil } -type QueueService_GetQueuesServer interface { - Send(*StreamingQueueMessage) error - grpc.ServerStream +func (m *QueuePreemptRequest) GetPools() []string { + if m != nil { + return m.Pools + } + return nil } -type queueServiceGetQueuesServer struct { - grpc.ServerStream +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"` + // If empty, jobs on all pools will be cancelled + Pools []string `protobuf:"bytes,4,rep,name=pools,proto3" json:"pools,omitempty"` } -func (x *queueServiceGetQueuesServer) Send(m *StreamingQueueMessage) error { - return x.ServerStream.SendMsg(m) +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{39} } - -func _QueueService_CordonQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueCordonRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).CordonQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/CordonQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).CordonQueue(ctx, req.(*QueueCordonRequest)) +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 } - return interceptor(ctx, in, info, handler) +} +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) } -func _QueueService_UncordonQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueUncordonRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueueServiceServer).UncordonQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.QueueService/UncordonQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).UncordonQueue(ctx, req.(*QueueUncordonRequest)) +var xxx_messageInfo_QueueCancelRequest proto.InternalMessageInfo + +func (m *QueueCancelRequest) GetName() string { + if m != nil { + return m.Name } - return interceptor(ctx, in, info, handler) + return "" } -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)) +func (m *QueueCancelRequest) GetPriorityClasses() []string { + if m != nil { + return m.PriorityClasses } - return interceptor(ctx, in, info, handler) + return nil } -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", +func (m *QueueCancelRequest) GetJobStates() []JobState { + if m != nil { + return m.JobStates } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueueServiceServer).CancelOnQueue(ctx, req.(*QueueCancelRequest)) + return nil +} + +func (m *QueueCancelRequest) GetPools() []string { + if m != nil { + return m.Pools } - return interceptor(ctx, in, info, handler) + return nil } -var _QueueService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.QueueService", - HandlerType: (*QueueServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateQueue", - Handler: _QueueService_CreateQueue_Handler, - }, - { - MethodName: "CreateQueues", - Handler: _QueueService_CreateQueues_Handler, - }, - { - MethodName: "UpdateQueue", - Handler: _QueueService_UpdateQueue_Handler, - }, - { - MethodName: "UpdateQueues", - Handler: _QueueService_UpdateQueues_Handler, - }, - { - MethodName: "DeleteQueue", - Handler: _QueueService_DeleteQueue_Handler, - }, - { - MethodName: "GetQueue", - Handler: _QueueService_GetQueue_Handler, - }, - { - MethodName: "CordonQueue", - Handler: _QueueService_CordonQueue_Handler, - }, - { - MethodName: "UncordonQueue", - Handler: _QueueService_UncordonQueue_Handler, - }, - { - MethodName: "PreemptOnQueue", - Handler: _QueueService_PreemptOnQueue_Handler, - }, - { - MethodName: "CancelOnQueue", - Handler: _QueueService_CancelOnQueue_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "GetQueues", - Handler: _QueueService_GetQueues_Handler, - ServerStreams: true, - }, - }, - Metadata: "pkg/api/submit.proto", +func init() { + proto.RegisterEnum("api.IngressType", IngressType_name, IngressType_value) + proto.RegisterEnum("api.ServiceType", ServiceType_name, ServiceType_value) + proto.RegisterEnum("api.JobState", JobState_name, JobState_value) + proto.RegisterEnum("api.RetryAction", RetryAction_name, RetryAction_value) + proto.RegisterEnum("api.ExitCodeOperator", ExitCodeOperator_name, ExitCodeOperator_value) + proto.RegisterType((*JobSubmitRequestItem)(nil), "api.JobSubmitRequestItem") + proto.RegisterMapType((map[string]string)(nil), "api.JobSubmitRequestItem.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "api.JobSubmitRequestItem.LabelsEntry") + proto.RegisterMapType((map[string]string)(nil), "api.JobSubmitRequestItem.RequiredNodeLabelsEntry") + proto.RegisterType((*IngressConfig)(nil), "api.IngressConfig") + proto.RegisterMapType((map[string]string)(nil), "api.IngressConfig.AnnotationsEntry") + proto.RegisterType((*ServiceConfig)(nil), "api.ServiceConfig") + proto.RegisterType((*JobSubmitRequest)(nil), "api.JobSubmitRequest") + proto.RegisterType((*JobPreemptRequest)(nil), "api.JobPreemptRequest") + proto.RegisterType((*JobCancelRequest)(nil), "api.JobCancelRequest") + proto.RegisterType((*JobSetCancelRequest)(nil), "api.JobSetCancelRequest") + proto.RegisterType((*JobSetFilter)(nil), "api.JobSetFilter") + proto.RegisterType((*Job)(nil), "api.Job") + proto.RegisterMapType((map[string]string)(nil), "api.Job.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "api.Job.LabelsEntry") + proto.RegisterMapType((map[string]string)(nil), "api.Job.RequiredNodeLabelsEntry") + proto.RegisterType((*JobReprioritizeRequest)(nil), "api.JobReprioritizeRequest") + proto.RegisterType((*JobReprioritizeResponse)(nil), "api.JobReprioritizeResponse") + proto.RegisterMapType((map[string]string)(nil), "api.JobReprioritizeResponse.ReprioritizationResultsEntry") + proto.RegisterType((*JobSubmitResponseItem)(nil), "api.JobSubmitResponseItem") + proto.RegisterType((*JobSubmitResponse)(nil), "api.JobSubmitResponse") + proto.RegisterType((*Queue)(nil), "api.Queue") + proto.RegisterMapType((map[string]string)(nil), "api.Queue.LabelsEntry") + proto.RegisterMapType((map[string]*PriorityClassResourceLimits)(nil), "api.Queue.ResourceLimitsByPriorityClassNameEntry") + proto.RegisterMapType((map[string]float64)(nil), "api.Queue.ResourceLimitsEntry") + proto.RegisterType((*Queue_Permissions)(nil), "api.Queue.Permissions") + proto.RegisterType((*Queue_Permissions_Subject)(nil), "api.Queue.Permissions.Subject") + proto.RegisterType((*PriorityClassResourceLimits)(nil), "api.PriorityClassResourceLimits") + proto.RegisterMapType((map[string]*PriorityClassPoolResourceLimits)(nil), "api.PriorityClassResourceLimits.MaximumResourceFractionByPoolEntry") + proto.RegisterMapType((map[string]float64)(nil), "api.PriorityClassResourceLimits.MaximumResourceFractionEntry") + proto.RegisterType((*PriorityClassPoolResourceLimits)(nil), "api.PriorityClassPoolResourceLimits") + proto.RegisterMapType((map[string]float64)(nil), "api.PriorityClassPoolResourceLimits.MaximumResourceFractionEntry") + proto.RegisterType((*QueueList)(nil), "api.QueueList") + proto.RegisterType((*CancellationResult)(nil), "api.CancellationResult") + proto.RegisterType((*PreemptionResult)(nil), "api.PreemptionResult") + proto.RegisterMapType((map[string]string)(nil), "api.PreemptionResult.PreemptionResultsEntry") + proto.RegisterType((*RetryPolicy)(nil), "api.RetryPolicy") + proto.RegisterType((*RetryRule)(nil), "api.RetryRule") + proto.RegisterType((*RetryExitCodeMatcher)(nil), "api.RetryExitCodeMatcher") + proto.RegisterType((*RetryPolicyGetRequest)(nil), "api.RetryPolicyGetRequest") + proto.RegisterType((*RetryPolicyDeleteRequest)(nil), "api.RetryPolicyDeleteRequest") + proto.RegisterType((*RetryPolicyListRequest)(nil), "api.RetryPolicyListRequest") + proto.RegisterType((*RetryPolicyList)(nil), "api.RetryPolicyList") + proto.RegisterType((*QueueGetRequest)(nil), "api.QueueGetRequest") + proto.RegisterType((*QueueCordonRequest)(nil), "api.QueueCordonRequest") + proto.RegisterType((*QueueUncordonRequest)(nil), "api.QueueUncordonRequest") + proto.RegisterType((*StreamingQueueGetRequest)(nil), "api.StreamingQueueGetRequest") + proto.RegisterType((*QueueDeleteRequest)(nil), "api.QueueDeleteRequest") + proto.RegisterType((*JobSetInfo)(nil), "api.JobSetInfo") + proto.RegisterType((*QueueUpdateResponse)(nil), "api.QueueUpdateResponse") + proto.RegisterType((*BatchQueueUpdateResponse)(nil), "api.BatchQueueUpdateResponse") + proto.RegisterType((*QueueCreateResponse)(nil), "api.QueueCreateResponse") + 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") } -// SubmitClient is the client API for Submit service. +func init() { proto.RegisterFile("pkg/api/submit.proto", fileDescriptor_e998bacb27df16c1) } + +var fileDescriptor_e998bacb27df16c1 = []byte{ + // 3799 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4d, 0x6c, 0x23, 0x59, + 0x5a, 0x29, 0x3b, 0x7f, 0xfe, 0x1c, 0x27, 0xce, 0xeb, 0xfc, 0x38, 0x4e, 0x3a, 0xce, 0xd4, 0xec, + 0xf4, 0x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x89, 0x2d, 0xa7, 0xa4, 0x36, 0x71, + 0x20, 0x73, 0x72, 0x18, 0x7a, 0x08, 0x89, 0xb6, 0x8d, 0x95, 0x5a, 0xa3, 0x6d, 0x3b, 0xd8, 0x2a, + 0x96, 0x53, 0x93, 0x54, 0x62, 0xba, 0xdb, 0xc9, 0x2c, 0xb5, 0x6d, 0x9c, 0x77, 0xe1, 0x02, 0xf1, + 0x8c, 0x08, 0x7f, 0x5b, 0x81, 0x26, 0xff, 0xb1, 0x04, 0x89, 0xc0, 0xf1, 0x44, 0xf7, 0xfb, 0xec, + 0x39, 0xc7, 0xa0, 0x7b, 0x8e, 0x7a, 0xf7, 0x7c, 0xf4, 0x1d, 0xbf, 0x03, 0xe3, 0xd4, 0x9f, 0xac, + 0x80, 0x51, 0x96, 0x46, 0xd0, 0x97, 0x74, 0x5d, 0xfe, 0x57, 0x09, 0x92, 0xe1, 0x14, 0x4d, 0xe4, + 0x7c, 0xd1, 0xc6, 0x6d, 0xcc, 0x3d, 0x41, 0xe5, 0x50, 0x80, 0x28, 0x87, 0x02, 0xd0, 0x2f, 0x00, + 0x9c, 0x99, 0x55, 0xc5, 0xc6, 0xb4, 0xee, 0x45, 0xfc, 0xdd, 0x3b, 0x33, 0xab, 0x87, 0x38, 0x54, + 0xf7, 0x5c, 0x18, 0xd2, 0x60, 0x9e, 0x50, 0x59, 0x4c, 0x9e, 0x42, 0x10, 0xdc, 0xa8, 0x5c, 0x19, + 0x58, 0x35, 0x72, 0xb7, 0xbb, 0x9d, 0xcc, 0xca, 0x99, 0x59, 0x15, 0x60, 0xa2, 0xe5, 0x73, 0xa1, + 0x25, 0xf9, 0x9f, 0x24, 0x98, 0xdf, 0x37, 0xab, 0x65, 0x0b, 0x13, 0x84, 0xb7, 0x66, 0xdc, 0x77, + 0x61, 0x8a, 0x50, 0xe9, 0x1a, 0x33, 0x29, 0xc6, 0xca, 0xf5, 0x99, 0x59, 0x2d, 0x6a, 0x81, 0x72, + 0xcd, 0x20, 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0xc7, 0x05, 0x39, 0x84, 0xdd, 0x47, 0x30, 0xf9, 0x84, 0xfe, 0x47, 0x1e, 0x1a, 0xe0, + 0x86, 0x34, 0x4b, 0xcb, 0x0c, 0x29, 0x7f, 0x8a, 0x6b, 0xe7, 0xde, 0x7c, 0xfb, 0xe2, 0x1f, 0xbe, + 0x5a, 0x97, 0x7e, 0xfa, 0xd5, 0xba, 0xf4, 0x6f, 0x5f, 0xad, 0x4b, 0x3f, 0xfe, 0x7a, 0x7d, 0xec, + 0xa7, 0x5f, 0xaf, 0x8f, 0xfd, 0xcb, 0xd7, 0xeb, 0x63, 0x9f, 0x7f, 0xbb, 0xae, 0x3b, 0xa7, 0xed, + 0x6a, 0xb6, 0x66, 0x36, 0xb7, 0x55, 0xab, 0xa9, 0x6a, 0x6a, 0xcb, 0x32, 0xcf, 0x70, 0xcd, 0xe1, + 0x5f, 0xdb, 0xfc, 0xbf, 0x01, 0x7f, 0x12, 0x59, 0xd8, 0xa5, 0x80, 0x32, 0x5b, 0xce, 0x16, 0xcd, + 0xec, 0x6e, 0x4b, 0xaf, 0x4e, 0x52, 0x1d, 0x3e, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9d, + 0x63, 0xb6, 0x39, 0xfb, 0x38, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueueServiceClient is the client API for QueueService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SubmitClient interface { - SubmitJobs(ctx context.Context, in *JobSubmitRequest, opts ...grpc.CallOption) (*JobSubmitResponse, error) - CancelJobs(ctx context.Context, in *JobCancelRequest, opts ...grpc.CallOption) (*CancellationResult, error) - CancelJobSet(ctx context.Context, in *JobSetCancelRequest, opts ...grpc.CallOption) (*types.Empty, error) - ReprioritizeJobs(ctx context.Context, in *JobReprioritizeRequest, opts ...grpc.CallOption) (*JobReprioritizeResponse, error) - PreemptJobs(ctx context.Context, in *JobPreemptRequest, opts ...grpc.CallOption) (*PreemptionResult, error) +type QueueServiceClient interface { CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) - GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (Submit_GetQueuesClient, error) - Health(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) + 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 submitClient struct { +type queueServiceClient struct { cc *grpc.ClientConn } -func NewSubmitClient(cc *grpc.ClientConn) SubmitClient { - return &submitClient{cc} -} - -func (c *submitClient) SubmitJobs(ctx context.Context, in *JobSubmitRequest, opts ...grpc.CallOption) (*JobSubmitResponse, error) { - out := new(JobSubmitResponse) - err := c.cc.Invoke(ctx, "/api.Submit/SubmitJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *submitClient) CancelJobs(ctx context.Context, in *JobCancelRequest, opts ...grpc.CallOption) (*CancellationResult, error) { - out := new(CancellationResult) - err := c.cc.Invoke(ctx, "/api.Submit/CancelJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *submitClient) CancelJobSet(ctx context.Context, in *JobSetCancelRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.Submit/CancelJobSet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *submitClient) ReprioritizeJobs(ctx context.Context, in *JobReprioritizeRequest, opts ...grpc.CallOption) (*JobReprioritizeResponse, error) { - out := new(JobReprioritizeResponse) - err := c.cc.Invoke(ctx, "/api.Submit/ReprioritizeJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *submitClient) PreemptJobs(ctx context.Context, in *JobPreemptRequest, opts ...grpc.CallOption) (*PreemptionResult, error) { - out := new(PreemptionResult) - err := c.cc.Invoke(ctx, "/api.Submit/PreemptJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func NewQueueServiceClient(cc *grpc.ClientConn) QueueServiceClient { + return &queueServiceClient{cc} } -func (c *submitClient) CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { +func (c *queueServiceClient) CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.Submit/CreateQueue", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.QueueService/CreateQueue", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *submitClient) CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) { +func (c *queueServiceClient) CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) { out := new(BatchQueueCreateResponse) - err := c.cc.Invoke(ctx, "/api.Submit/CreateQueues", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.QueueService/CreateQueues", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *submitClient) UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { +func (c *queueServiceClient) UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.Submit/UpdateQueue", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.QueueService/UpdateQueue", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *submitClient) UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) { +func (c *queueServiceClient) UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) { out := new(BatchQueueUpdateResponse) - err := c.cc.Invoke(ctx, "/api.Submit/UpdateQueues", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.QueueService/UpdateQueues", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *submitClient) DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { +func (c *queueServiceClient) DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { out := new(types.Empty) - err := c.cc.Invoke(ctx, "/api.Submit/DeleteQueue", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.QueueService/DeleteQueue", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *submitClient) GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) { +func (c *queueServiceClient) GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) { out := new(Queue) - err := c.cc.Invoke(ctx, "/api.Submit/GetQueue", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.QueueService/GetQueue", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *submitClient) GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (Submit_GetQueuesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Submit_serviceDesc.Streams[0], "/api.Submit/GetQueues", opts...) +func (c *queueServiceClient) GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (QueueService_GetQueuesClient, error) { + stream, err := c.cc.NewStream(ctx, &_QueueService_serviceDesc.Streams[0], "/api.QueueService/GetQueues", opts...) if err != nil { return nil, err } - x := &submitGetQueuesClient{stream} + x := &queueServiceGetQueuesClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -3227,16 +3196,16 @@ func (c *submitClient) GetQueues(ctx context.Context, in *StreamingQueueGetReque return x, nil } -type Submit_GetQueuesClient interface { +type QueueService_GetQueuesClient interface { Recv() (*StreamingQueueMessage, error) grpc.ClientStream } -type submitGetQueuesClient struct { +type queueServiceGetQueuesClient struct { grpc.ClientStream } -func (x *submitGetQueuesClient) Recv() (*StreamingQueueMessage, error) { +func (x *queueServiceGetQueuesClient) Recv() (*StreamingQueueMessage, error) { m := new(StreamingQueueMessage) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -3244,381 +3213,1810 @@ func (x *submitGetQueuesClient) Recv() (*StreamingQueueMessage, error) { return m, nil } -func (c *submitClient) Health(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { - out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/api.Submit/Health", in, out, opts...) +func (c *queueServiceClient) CordonQueue(ctx context.Context, in *QueueCordonRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.QueueService/CordonQueue", in, out, opts...) if err != nil { return nil, err } return out, nil } -// SubmitServer is the server API for Submit service. -type SubmitServer interface { - SubmitJobs(context.Context, *JobSubmitRequest) (*JobSubmitResponse, error) - CancelJobs(context.Context, *JobCancelRequest) (*CancellationResult, error) - CancelJobSet(context.Context, *JobSetCancelRequest) (*types.Empty, error) - ReprioritizeJobs(context.Context, *JobReprioritizeRequest) (*JobReprioritizeResponse, error) - PreemptJobs(context.Context, *JobPreemptRequest) (*PreemptionResult, error) +func (c *queueServiceClient) UncordonQueue(ctx context.Context, in *QueueUncordonRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.QueueService/UncordonQueue", in, out, opts...) + if err != nil { + return nil, err + } + 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) CreateQueues(context.Context, *QueueList) (*BatchQueueCreateResponse, error) UpdateQueue(context.Context, *Queue) (*types.Empty, error) UpdateQueues(context.Context, *QueueList) (*BatchQueueUpdateResponse, error) DeleteQueue(context.Context, *QueueDeleteRequest) (*types.Empty, error) GetQueue(context.Context, *QueueGetRequest) (*Queue, error) - GetQueues(*StreamingQueueGetRequest, Submit_GetQueuesServer) error - Health(context.Context, *types.Empty) (*HealthCheckResponse, error) + 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) } -// UnimplementedSubmitServer can be embedded to have forward compatible implementations. -type UnimplementedSubmitServer struct { +// UnimplementedQueueServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueueServiceServer struct { } -func (*UnimplementedSubmitServer) SubmitJobs(ctx context.Context, req *JobSubmitRequest) (*JobSubmitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitJobs not implemented") +func (*UnimplementedQueueServiceServer) CreateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQueue not implemented") } -func (*UnimplementedSubmitServer) CancelJobs(ctx context.Context, req *JobCancelRequest) (*CancellationResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelJobs not implemented") +func (*UnimplementedQueueServiceServer) CreateQueues(ctx context.Context, req *QueueList) (*BatchQueueCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQueues not implemented") } -func (*UnimplementedSubmitServer) CancelJobSet(ctx context.Context, req *JobSetCancelRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelJobSet not implemented") +func (*UnimplementedQueueServiceServer) UpdateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQueue not implemented") } -func (*UnimplementedSubmitServer) ReprioritizeJobs(ctx context.Context, req *JobReprioritizeRequest) (*JobReprioritizeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReprioritizeJobs not implemented") +func (*UnimplementedQueueServiceServer) UpdateQueues(ctx context.Context, req *QueueList) (*BatchQueueUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQueues not implemented") } -func (*UnimplementedSubmitServer) PreemptJobs(ctx context.Context, req *JobPreemptRequest) (*PreemptionResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method PreemptJobs not implemented") +func (*UnimplementedQueueServiceServer) DeleteQueue(ctx context.Context, req *QueueDeleteRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteQueue not implemented") } -func (*UnimplementedSubmitServer) CreateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateQueue not implemented") -} -func (*UnimplementedSubmitServer) CreateQueues(ctx context.Context, req *QueueList) (*BatchQueueCreateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateQueues not implemented") -} -func (*UnimplementedSubmitServer) UpdateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateQueue not implemented") +func (*UnimplementedQueueServiceServer) GetQueue(ctx context.Context, req *QueueGetRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented") } -func (*UnimplementedSubmitServer) UpdateQueues(ctx context.Context, req *QueueList) (*BatchQueueUpdateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateQueues not implemented") +func (*UnimplementedQueueServiceServer) GetQueues(req *StreamingQueueGetRequest, srv QueueService_GetQueuesServer) error { + return status.Errorf(codes.Unimplemented, "method GetQueues not implemented") } -func (*UnimplementedSubmitServer) DeleteQueue(ctx context.Context, req *QueueDeleteRequest) (*types.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteQueue not implemented") +func (*UnimplementedQueueServiceServer) CordonQueue(ctx context.Context, req *QueueCordonRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CordonQueue not implemented") } -func (*UnimplementedSubmitServer) GetQueue(ctx context.Context, req *QueueGetRequest) (*Queue, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented") +func (*UnimplementedQueueServiceServer) UncordonQueue(ctx context.Context, req *QueueUncordonRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UncordonQueue not implemented") } -func (*UnimplementedSubmitServer) GetQueues(req *StreamingQueueGetRequest, srv Submit_GetQueuesServer) error { - return status.Errorf(codes.Unimplemented, "method GetQueues not implemented") +func (*UnimplementedQueueServiceServer) PreemptOnQueue(ctx context.Context, req *QueuePreemptRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PreemptOnQueue not implemented") } -func (*UnimplementedSubmitServer) Health(ctx context.Context, req *types.Empty) (*HealthCheckResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") +func (*UnimplementedQueueServiceServer) CancelOnQueue(ctx context.Context, req *QueueCancelRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelOnQueue not implemented") } -func RegisterSubmitServer(s *grpc.Server, srv SubmitServer) { - s.RegisterService(&_Submit_serviceDesc, srv) +func RegisterQueueServiceServer(s *grpc.Server, srv QueueServiceServer) { + s.RegisterService(&_QueueService_serviceDesc, srv) } -func _Submit_SubmitJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JobSubmitRequest) +func _QueueService_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Queue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).SubmitJobs(ctx, in) + return srv.(QueueServiceServer).CreateQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/SubmitJobs", + FullMethod: "/api.QueueService/CreateQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).SubmitJobs(ctx, req.(*JobSubmitRequest)) + return srv.(QueueServiceServer).CreateQueue(ctx, req.(*Queue)) } return interceptor(ctx, in, info, handler) } -func _Submit_CancelJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JobCancelRequest) +func _QueueService_CreateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueList) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).CancelJobs(ctx, in) + return srv.(QueueServiceServer).CreateQueues(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/CancelJobs", + FullMethod: "/api.QueueService/CreateQueues", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).CancelJobs(ctx, req.(*JobCancelRequest)) + return srv.(QueueServiceServer).CreateQueues(ctx, req.(*QueueList)) } return interceptor(ctx, in, info, handler) } -func _Submit_CancelJobSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JobSetCancelRequest) +func _QueueService_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Queue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).CancelJobSet(ctx, in) + return srv.(QueueServiceServer).UpdateQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/CancelJobSet", + FullMethod: "/api.QueueService/UpdateQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).CancelJobSet(ctx, req.(*JobSetCancelRequest)) + return srv.(QueueServiceServer).UpdateQueue(ctx, req.(*Queue)) } return interceptor(ctx, in, info, handler) } -func _Submit_ReprioritizeJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JobReprioritizeRequest) +func _QueueService_UpdateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueList) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).ReprioritizeJobs(ctx, in) + return srv.(QueueServiceServer).UpdateQueues(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/ReprioritizeJobs", + FullMethod: "/api.QueueService/UpdateQueues", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).ReprioritizeJobs(ctx, req.(*JobReprioritizeRequest)) + return srv.(QueueServiceServer).UpdateQueues(ctx, req.(*QueueList)) } return interceptor(ctx, in, info, handler) } -func _Submit_PreemptJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JobPreemptRequest) +func _QueueService_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueDeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).PreemptJobs(ctx, in) + return srv.(QueueServiceServer).DeleteQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/PreemptJobs", + FullMethod: "/api.QueueService/DeleteQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).PreemptJobs(ctx, req.(*JobPreemptRequest)) + return srv.(QueueServiceServer).DeleteQueue(ctx, req.(*QueueDeleteRequest)) } return interceptor(ctx, in, info, handler) } -func _Submit_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Queue) +func _QueueService_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueGetRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).CreateQueue(ctx, in) + return srv.(QueueServiceServer).GetQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/CreateQueue", + FullMethod: "/api.QueueService/GetQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).CreateQueue(ctx, req.(*Queue)) + return srv.(QueueServiceServer).GetQueue(ctx, req.(*QueueGetRequest)) } return interceptor(ctx, in, info, handler) } -func _Submit_CreateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueList) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubmitServer).CreateQueues(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.Submit/CreateQueues", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).CreateQueues(ctx, req.(*QueueList)) +func _QueueService_GetQueues_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamingQueueGetRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - return interceptor(ctx, in, info, handler) + return srv.(QueueServiceServer).GetQueues(m, &queueServiceGetQueuesServer{stream}) } -func _Submit_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Queue) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubmitServer).UpdateQueue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.Submit/UpdateQueue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).UpdateQueue(ctx, req.(*Queue)) - } - return interceptor(ctx, in, info, handler) +type QueueService_GetQueuesServer interface { + Send(*StreamingQueueMessage) error + grpc.ServerStream } -func _Submit_UpdateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueList) +type queueServiceGetQueuesServer struct { + grpc.ServerStream +} + +func (x *queueServiceGetQueuesServer) Send(m *StreamingQueueMessage) error { + return x.ServerStream.SendMsg(m) +} + +func _QueueService_CordonQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueCordonRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).UpdateQueues(ctx, in) + return srv.(QueueServiceServer).CordonQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/UpdateQueues", + FullMethod: "/api.QueueService/CordonQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).UpdateQueues(ctx, req.(*QueueList)) + return srv.(QueueServiceServer).CordonQueue(ctx, req.(*QueueCordonRequest)) } return interceptor(ctx, in, info, handler) } -func _Submit_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueDeleteRequest) +func _QueueService_UncordonQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueUncordonRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SubmitServer).DeleteQueue(ctx, in) + return srv.(QueueServiceServer).UncordonQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/DeleteQueue", + FullMethod: "/api.QueueService/UncordonQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).DeleteQueue(ctx, req.(*QueueDeleteRequest)) + return srv.(QueueServiceServer).UncordonQueue(ctx, req.(*QueueUncordonRequest)) } return interceptor(ctx, in, info, handler) } -func _Submit_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueueGetRequest) +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.(SubmitServer).GetQueue(ctx, in) + return srv.(QueueServiceServer).PreemptOnQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/GetQueue", + FullMethod: "/api.QueueService/PreemptOnQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).GetQueue(ctx, req.(*QueueGetRequest)) + return srv.(QueueServiceServer).PreemptOnQueue(ctx, req.(*QueuePreemptRequest)) } return interceptor(ctx, in, info, handler) } -func _Submit_GetQueues_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StreamingQueueGetRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(SubmitServer).GetQueues(m, &submitGetQueuesServer{stream}) -} - -type Submit_GetQueuesServer interface { - Send(*StreamingQueueMessage) error - grpc.ServerStream -} - -type submitGetQueuesServer struct { - grpc.ServerStream -} - -func (x *submitGetQueuesServer) Send(m *StreamingQueueMessage) error { - return x.ServerStream.SendMsg(m) -} - -func _Submit_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) +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.(SubmitServer).Health(ctx, in) + return srv.(QueueServiceServer).CancelOnQueue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.Submit/Health", + FullMethod: "/api.QueueService/CancelOnQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubmitServer).Health(ctx, req.(*types.Empty)) + return srv.(QueueServiceServer).CancelOnQueue(ctx, req.(*QueueCancelRequest)) } return interceptor(ctx, in, info, handler) } -var _Submit_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.Submit", - HandlerType: (*SubmitServer)(nil), +var _QueueService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.QueueService", + HandlerType: (*QueueServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitJobs", - Handler: _Submit_SubmitJobs_Handler, - }, - { - MethodName: "CancelJobs", - Handler: _Submit_CancelJobs_Handler, - }, - { - MethodName: "CancelJobSet", - Handler: _Submit_CancelJobSet_Handler, - }, - { - MethodName: "ReprioritizeJobs", - Handler: _Submit_ReprioritizeJobs_Handler, - }, - { - MethodName: "PreemptJobs", - Handler: _Submit_PreemptJobs_Handler, - }, { MethodName: "CreateQueue", - Handler: _Submit_CreateQueue_Handler, + Handler: _QueueService_CreateQueue_Handler, }, { MethodName: "CreateQueues", - Handler: _Submit_CreateQueues_Handler, + Handler: _QueueService_CreateQueues_Handler, }, { MethodName: "UpdateQueue", - Handler: _Submit_UpdateQueue_Handler, + Handler: _QueueService_UpdateQueue_Handler, }, { MethodName: "UpdateQueues", - Handler: _Submit_UpdateQueues_Handler, + Handler: _QueueService_UpdateQueues_Handler, }, { MethodName: "DeleteQueue", - Handler: _Submit_DeleteQueue_Handler, + Handler: _QueueService_DeleteQueue_Handler, }, { MethodName: "GetQueue", - Handler: _Submit_GetQueue_Handler, + Handler: _QueueService_GetQueue_Handler, }, { - MethodName: "Health", - Handler: _Submit_Health_Handler, + MethodName: "CordonQueue", + Handler: _QueueService_CordonQueue_Handler, + }, + { + MethodName: "UncordonQueue", + Handler: _QueueService_UncordonQueue_Handler, + }, + { + MethodName: "PreemptOnQueue", + Handler: _QueueService_PreemptOnQueue_Handler, + }, + { + MethodName: "CancelOnQueue", + Handler: _QueueService_CancelOnQueue_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetQueues", - Handler: _Submit_GetQueues_Handler, + Handler: _QueueService_GetQueues_Handler, ServerStreams: true, }, }, Metadata: "pkg/api/submit.proto", } -func (m *JobSubmitRequestItem) Marshal() (dAtA []byte, err error) { +// RetryPolicyServiceClient is the client API for RetryPolicyService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RetryPolicyServiceClient interface { + CreateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) + UpdateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) + DeleteRetryPolicy(ctx context.Context, in *RetryPolicyDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) + GetRetryPolicy(ctx context.Context, in *RetryPolicyGetRequest, opts ...grpc.CallOption) (*RetryPolicy, error) + GetRetryPolicies(ctx context.Context, in *RetryPolicyListRequest, opts ...grpc.CallOption) (*RetryPolicyList, error) +} + +type retryPolicyServiceClient struct { + cc *grpc.ClientConn +} + +func NewRetryPolicyServiceClient(cc *grpc.ClientConn) RetryPolicyServiceClient { + return &retryPolicyServiceClient{cc} +} + +func (c *retryPolicyServiceClient) CreateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.RetryPolicyService/CreateRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retryPolicyServiceClient) UpdateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.RetryPolicyService/UpdateRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retryPolicyServiceClient) DeleteRetryPolicy(ctx context.Context, in *RetryPolicyDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.RetryPolicyService/DeleteRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retryPolicyServiceClient) GetRetryPolicy(ctx context.Context, in *RetryPolicyGetRequest, opts ...grpc.CallOption) (*RetryPolicy, error) { + out := new(RetryPolicy) + err := c.cc.Invoke(ctx, "/api.RetryPolicyService/GetRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *retryPolicyServiceClient) GetRetryPolicies(ctx context.Context, in *RetryPolicyListRequest, opts ...grpc.CallOption) (*RetryPolicyList, error) { + out := new(RetryPolicyList) + err := c.cc.Invoke(ctx, "/api.RetryPolicyService/GetRetryPolicies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RetryPolicyServiceServer is the server API for RetryPolicyService service. +type RetryPolicyServiceServer interface { + CreateRetryPolicy(context.Context, *RetryPolicy) (*types.Empty, error) + UpdateRetryPolicy(context.Context, *RetryPolicy) (*types.Empty, error) + DeleteRetryPolicy(context.Context, *RetryPolicyDeleteRequest) (*types.Empty, error) + GetRetryPolicy(context.Context, *RetryPolicyGetRequest) (*RetryPolicy, error) + GetRetryPolicies(context.Context, *RetryPolicyListRequest) (*RetryPolicyList, error) +} + +// UnimplementedRetryPolicyServiceServer can be embedded to have forward compatible implementations. +type UnimplementedRetryPolicyServiceServer struct { +} + +func (*UnimplementedRetryPolicyServiceServer) CreateRetryPolicy(ctx context.Context, req *RetryPolicy) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRetryPolicy not implemented") +} +func (*UnimplementedRetryPolicyServiceServer) UpdateRetryPolicy(ctx context.Context, req *RetryPolicy) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRetryPolicy not implemented") +} +func (*UnimplementedRetryPolicyServiceServer) DeleteRetryPolicy(ctx context.Context, req *RetryPolicyDeleteRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRetryPolicy not implemented") +} +func (*UnimplementedRetryPolicyServiceServer) GetRetryPolicy(ctx context.Context, req *RetryPolicyGetRequest) (*RetryPolicy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRetryPolicy not implemented") +} +func (*UnimplementedRetryPolicyServiceServer) GetRetryPolicies(ctx context.Context, req *RetryPolicyListRequest) (*RetryPolicyList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRetryPolicies not implemented") +} + +func RegisterRetryPolicyServiceServer(s *grpc.Server, srv RetryPolicyServiceServer) { + s.RegisterService(&_RetryPolicyService_serviceDesc, srv) +} + +func _RetryPolicyService_CreateRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetryPolicyServiceServer).CreateRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RetryPolicyService/CreateRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetryPolicyServiceServer).CreateRetryPolicy(ctx, req.(*RetryPolicy)) + } + return interceptor(ctx, in, info, handler) +} + +func _RetryPolicyService_UpdateRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetryPolicyServiceServer).UpdateRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RetryPolicyService/UpdateRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetryPolicyServiceServer).UpdateRetryPolicy(ctx, req.(*RetryPolicy)) + } + return interceptor(ctx, in, info, handler) +} + +func _RetryPolicyService_DeleteRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicyDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetryPolicyServiceServer).DeleteRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RetryPolicyService/DeleteRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetryPolicyServiceServer).DeleteRetryPolicy(ctx, req.(*RetryPolicyDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RetryPolicyService_GetRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicyGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetryPolicyServiceServer).GetRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RetryPolicyService/GetRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetryPolicyServiceServer).GetRetryPolicy(ctx, req.(*RetryPolicyGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RetryPolicyService_GetRetryPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicyListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RetryPolicyServiceServer).GetRetryPolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.RetryPolicyService/GetRetryPolicies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RetryPolicyServiceServer).GetRetryPolicies(ctx, req.(*RetryPolicyListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RetryPolicyService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.RetryPolicyService", + HandlerType: (*RetryPolicyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateRetryPolicy", + Handler: _RetryPolicyService_CreateRetryPolicy_Handler, + }, + { + MethodName: "UpdateRetryPolicy", + Handler: _RetryPolicyService_UpdateRetryPolicy_Handler, + }, + { + MethodName: "DeleteRetryPolicy", + Handler: _RetryPolicyService_DeleteRetryPolicy_Handler, + }, + { + MethodName: "GetRetryPolicy", + Handler: _RetryPolicyService_GetRetryPolicy_Handler, + }, + { + MethodName: "GetRetryPolicies", + Handler: _RetryPolicyService_GetRetryPolicies_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/api/submit.proto", +} + +// SubmitClient is the client API for Submit service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SubmitClient interface { + SubmitJobs(ctx context.Context, in *JobSubmitRequest, opts ...grpc.CallOption) (*JobSubmitResponse, error) + CancelJobs(ctx context.Context, in *JobCancelRequest, opts ...grpc.CallOption) (*CancellationResult, error) + CancelJobSet(ctx context.Context, in *JobSetCancelRequest, opts ...grpc.CallOption) (*types.Empty, error) + ReprioritizeJobs(ctx context.Context, in *JobReprioritizeRequest, opts ...grpc.CallOption) (*JobReprioritizeResponse, error) + PreemptJobs(ctx context.Context, in *JobPreemptRequest, opts ...grpc.CallOption) (*PreemptionResult, error) + CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) + CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) + UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) + UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) + DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) + GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) + GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (Submit_GetQueuesClient, error) + CreateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) + UpdateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) + DeleteRetryPolicy(ctx context.Context, in *RetryPolicyDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) + GetRetryPolicy(ctx context.Context, in *RetryPolicyGetRequest, opts ...grpc.CallOption) (*RetryPolicy, error) + GetRetryPolicies(ctx context.Context, in *RetryPolicyListRequest, opts ...grpc.CallOption) (*RetryPolicyList, error) + Health(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) +} + +type submitClient struct { + cc *grpc.ClientConn +} + +func NewSubmitClient(cc *grpc.ClientConn) SubmitClient { + return &submitClient{cc} +} + +func (c *submitClient) SubmitJobs(ctx context.Context, in *JobSubmitRequest, opts ...grpc.CallOption) (*JobSubmitResponse, error) { + out := new(JobSubmitResponse) + err := c.cc.Invoke(ctx, "/api.Submit/SubmitJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) CancelJobs(ctx context.Context, in *JobCancelRequest, opts ...grpc.CallOption) (*CancellationResult, error) { + out := new(CancellationResult) + err := c.cc.Invoke(ctx, "/api.Submit/CancelJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) CancelJobSet(ctx context.Context, in *JobSetCancelRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/CancelJobSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) ReprioritizeJobs(ctx context.Context, in *JobReprioritizeRequest, opts ...grpc.CallOption) (*JobReprioritizeResponse, error) { + out := new(JobReprioritizeResponse) + err := c.cc.Invoke(ctx, "/api.Submit/ReprioritizeJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) PreemptJobs(ctx context.Context, in *JobPreemptRequest, opts ...grpc.CallOption) (*PreemptionResult, error) { + out := new(PreemptionResult) + err := c.cc.Invoke(ctx, "/api.Submit/PreemptJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) CreateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/CreateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) CreateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueCreateResponse, error) { + out := new(BatchQueueCreateResponse) + err := c.cc.Invoke(ctx, "/api.Submit/CreateQueues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) UpdateQueue(ctx context.Context, in *Queue, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/UpdateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) UpdateQueues(ctx context.Context, in *QueueList, opts ...grpc.CallOption) (*BatchQueueUpdateResponse, error) { + out := new(BatchQueueUpdateResponse) + err := c.cc.Invoke(ctx, "/api.Submit/UpdateQueues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) DeleteQueue(ctx context.Context, in *QueueDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/DeleteQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) GetQueue(ctx context.Context, in *QueueGetRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/api.Submit/GetQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) GetQueues(ctx context.Context, in *StreamingQueueGetRequest, opts ...grpc.CallOption) (Submit_GetQueuesClient, error) { + stream, err := c.cc.NewStream(ctx, &_Submit_serviceDesc.Streams[0], "/api.Submit/GetQueues", opts...) + if err != nil { + return nil, err + } + x := &submitGetQueuesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Submit_GetQueuesClient interface { + Recv() (*StreamingQueueMessage, error) + grpc.ClientStream +} + +type submitGetQueuesClient struct { + grpc.ClientStream +} + +func (x *submitGetQueuesClient) Recv() (*StreamingQueueMessage, error) { + m := new(StreamingQueueMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *submitClient) CreateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/CreateRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) UpdateRetryPolicy(ctx context.Context, in *RetryPolicy, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/UpdateRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) DeleteRetryPolicy(ctx context.Context, in *RetryPolicyDeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/api.Submit/DeleteRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) GetRetryPolicy(ctx context.Context, in *RetryPolicyGetRequest, opts ...grpc.CallOption) (*RetryPolicy, error) { + out := new(RetryPolicy) + err := c.cc.Invoke(ctx, "/api.Submit/GetRetryPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) GetRetryPolicies(ctx context.Context, in *RetryPolicyListRequest, opts ...grpc.CallOption) (*RetryPolicyList, error) { + out := new(RetryPolicyList) + err := c.cc.Invoke(ctx, "/api.Submit/GetRetryPolicies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *submitClient) Health(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + out := new(HealthCheckResponse) + err := c.cc.Invoke(ctx, "/api.Submit/Health", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SubmitServer is the server API for Submit service. +type SubmitServer interface { + SubmitJobs(context.Context, *JobSubmitRequest) (*JobSubmitResponse, error) + CancelJobs(context.Context, *JobCancelRequest) (*CancellationResult, error) + CancelJobSet(context.Context, *JobSetCancelRequest) (*types.Empty, error) + ReprioritizeJobs(context.Context, *JobReprioritizeRequest) (*JobReprioritizeResponse, error) + PreemptJobs(context.Context, *JobPreemptRequest) (*PreemptionResult, error) + CreateQueue(context.Context, *Queue) (*types.Empty, error) + CreateQueues(context.Context, *QueueList) (*BatchQueueCreateResponse, error) + UpdateQueue(context.Context, *Queue) (*types.Empty, error) + UpdateQueues(context.Context, *QueueList) (*BatchQueueUpdateResponse, error) + DeleteQueue(context.Context, *QueueDeleteRequest) (*types.Empty, error) + GetQueue(context.Context, *QueueGetRequest) (*Queue, error) + GetQueues(*StreamingQueueGetRequest, Submit_GetQueuesServer) error + CreateRetryPolicy(context.Context, *RetryPolicy) (*types.Empty, error) + UpdateRetryPolicy(context.Context, *RetryPolicy) (*types.Empty, error) + DeleteRetryPolicy(context.Context, *RetryPolicyDeleteRequest) (*types.Empty, error) + GetRetryPolicy(context.Context, *RetryPolicyGetRequest) (*RetryPolicy, error) + GetRetryPolicies(context.Context, *RetryPolicyListRequest) (*RetryPolicyList, error) + Health(context.Context, *types.Empty) (*HealthCheckResponse, error) +} + +// UnimplementedSubmitServer can be embedded to have forward compatible implementations. +type UnimplementedSubmitServer struct { +} + +func (*UnimplementedSubmitServer) SubmitJobs(ctx context.Context, req *JobSubmitRequest) (*JobSubmitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitJobs not implemented") +} +func (*UnimplementedSubmitServer) CancelJobs(ctx context.Context, req *JobCancelRequest) (*CancellationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelJobs not implemented") +} +func (*UnimplementedSubmitServer) CancelJobSet(ctx context.Context, req *JobSetCancelRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelJobSet not implemented") +} +func (*UnimplementedSubmitServer) ReprioritizeJobs(ctx context.Context, req *JobReprioritizeRequest) (*JobReprioritizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReprioritizeJobs not implemented") +} +func (*UnimplementedSubmitServer) PreemptJobs(ctx context.Context, req *JobPreemptRequest) (*PreemptionResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method PreemptJobs not implemented") +} +func (*UnimplementedSubmitServer) CreateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQueue not implemented") +} +func (*UnimplementedSubmitServer) CreateQueues(ctx context.Context, req *QueueList) (*BatchQueueCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQueues not implemented") +} +func (*UnimplementedSubmitServer) UpdateQueue(ctx context.Context, req *Queue) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQueue not implemented") +} +func (*UnimplementedSubmitServer) UpdateQueues(ctx context.Context, req *QueueList) (*BatchQueueUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQueues not implemented") +} +func (*UnimplementedSubmitServer) DeleteQueue(ctx context.Context, req *QueueDeleteRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteQueue not implemented") +} +func (*UnimplementedSubmitServer) GetQueue(ctx context.Context, req *QueueGetRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented") +} +func (*UnimplementedSubmitServer) GetQueues(req *StreamingQueueGetRequest, srv Submit_GetQueuesServer) error { + return status.Errorf(codes.Unimplemented, "method GetQueues not implemented") +} +func (*UnimplementedSubmitServer) CreateRetryPolicy(ctx context.Context, req *RetryPolicy) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRetryPolicy not implemented") +} +func (*UnimplementedSubmitServer) UpdateRetryPolicy(ctx context.Context, req *RetryPolicy) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRetryPolicy not implemented") +} +func (*UnimplementedSubmitServer) DeleteRetryPolicy(ctx context.Context, req *RetryPolicyDeleteRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRetryPolicy not implemented") +} +func (*UnimplementedSubmitServer) GetRetryPolicy(ctx context.Context, req *RetryPolicyGetRequest) (*RetryPolicy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRetryPolicy not implemented") +} +func (*UnimplementedSubmitServer) GetRetryPolicies(ctx context.Context, req *RetryPolicyListRequest) (*RetryPolicyList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRetryPolicies not implemented") +} +func (*UnimplementedSubmitServer) Health(ctx context.Context, req *types.Empty) (*HealthCheckResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") +} + +func RegisterSubmitServer(s *grpc.Server, srv SubmitServer) { + s.RegisterService(&_Submit_serviceDesc, srv) +} + +func _Submit_SubmitJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JobSubmitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).SubmitJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/SubmitJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).SubmitJobs(ctx, req.(*JobSubmitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_CancelJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JobCancelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).CancelJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/CancelJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).CancelJobs(ctx, req.(*JobCancelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_CancelJobSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JobSetCancelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).CancelJobSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/CancelJobSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).CancelJobSet(ctx, req.(*JobSetCancelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_ReprioritizeJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JobReprioritizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).ReprioritizeJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/ReprioritizeJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).ReprioritizeJobs(ctx, req.(*JobReprioritizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_PreemptJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JobPreemptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).PreemptJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/PreemptJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).PreemptJobs(ctx, req.(*JobPreemptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Queue) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).CreateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/CreateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).CreateQueue(ctx, req.(*Queue)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_CreateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueList) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).CreateQueues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/CreateQueues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).CreateQueues(ctx, req.(*QueueList)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Queue) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).UpdateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/UpdateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).UpdateQueue(ctx, req.(*Queue)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_UpdateQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueList) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).UpdateQueues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/UpdateQueues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).UpdateQueues(ctx, req.(*QueueList)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).DeleteQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/DeleteQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).DeleteQueue(ctx, req.(*QueueDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueueGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).GetQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/GetQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).GetQueue(ctx, req.(*QueueGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_GetQueues_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamingQueueGetRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(SubmitServer).GetQueues(m, &submitGetQueuesServer{stream}) +} + +type Submit_GetQueuesServer interface { + Send(*StreamingQueueMessage) error + grpc.ServerStream +} + +type submitGetQueuesServer struct { + grpc.ServerStream +} + +func (x *submitGetQueuesServer) Send(m *StreamingQueueMessage) error { + return x.ServerStream.SendMsg(m) +} + +func _Submit_CreateRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).CreateRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/CreateRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).CreateRetryPolicy(ctx, req.(*RetryPolicy)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_UpdateRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicy) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).UpdateRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/UpdateRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).UpdateRetryPolicy(ctx, req.(*RetryPolicy)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_DeleteRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicyDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).DeleteRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/DeleteRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).DeleteRetryPolicy(ctx, req.(*RetryPolicyDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_GetRetryPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicyGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).GetRetryPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/GetRetryPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).GetRetryPolicy(ctx, req.(*RetryPolicyGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_GetRetryPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryPolicyListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).GetRetryPolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/GetRetryPolicies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).GetRetryPolicies(ctx, req.(*RetryPolicyListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Submit_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitServer).Health(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.Submit/Health", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitServer).Health(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Submit_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.Submit", + HandlerType: (*SubmitServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SubmitJobs", + Handler: _Submit_SubmitJobs_Handler, + }, + { + MethodName: "CancelJobs", + Handler: _Submit_CancelJobs_Handler, + }, + { + MethodName: "CancelJobSet", + Handler: _Submit_CancelJobSet_Handler, + }, + { + MethodName: "ReprioritizeJobs", + Handler: _Submit_ReprioritizeJobs_Handler, + }, + { + MethodName: "PreemptJobs", + Handler: _Submit_PreemptJobs_Handler, + }, + { + MethodName: "CreateQueue", + Handler: _Submit_CreateQueue_Handler, + }, + { + MethodName: "CreateQueues", + Handler: _Submit_CreateQueues_Handler, + }, + { + MethodName: "UpdateQueue", + Handler: _Submit_UpdateQueue_Handler, + }, + { + MethodName: "UpdateQueues", + Handler: _Submit_UpdateQueues_Handler, + }, + { + MethodName: "DeleteQueue", + Handler: _Submit_DeleteQueue_Handler, + }, + { + MethodName: "GetQueue", + Handler: _Submit_GetQueue_Handler, + }, + { + MethodName: "CreateRetryPolicy", + Handler: _Submit_CreateRetryPolicy_Handler, + }, + { + MethodName: "UpdateRetryPolicy", + Handler: _Submit_UpdateRetryPolicy_Handler, + }, + { + MethodName: "DeleteRetryPolicy", + Handler: _Submit_DeleteRetryPolicy_Handler, + }, + { + MethodName: "GetRetryPolicy", + Handler: _Submit_GetRetryPolicy_Handler, + }, + { + MethodName: "GetRetryPolicies", + Handler: _Submit_GetRetryPolicies_Handler, + }, + { + MethodName: "Health", + Handler: _Submit_Health_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetQueues", + Handler: _Submit_GetQueues_Handler, + ServerStreams: true, + }, + }, + Metadata: "pkg/api/submit.proto", +} + +func (m *JobSubmitRequestItem) 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 *JobSubmitRequestItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JobSubmitRequestItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Scheduler) > 0 { + i -= len(m.Scheduler) + copy(dAtA[i:], m.Scheduler) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Scheduler))) + i-- + dAtA[i] = 0x5a + } + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Services[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.Ingress) > 0 { + for iNdEx := len(m.Ingress) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ingress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x42 + } + if len(m.PodSpecs) > 0 { + for iNdEx := len(m.PodSpecs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PodSpecs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.RequiredNodeLabels) > 0 { + for k := range m.RequiredNodeLabels { + v := m.RequiredNodeLabels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + } + if m.PodSpec != nil { + { + size, err := m.PodSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Priority != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Priority)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *IngressConfig) 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 *IngressConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UseClusterIP { + i-- + if m.UseClusterIP { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.CertName) > 0 { + i -= len(m.CertName) + copy(dAtA[i:], m.CertName) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.CertName))) + i-- + dAtA[i] = 0x2a + } + if m.TlsEnabled { + i-- + if m.TlsEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Ports) > 0 { + dAtA3 := make([]byte, len(m.Ports)*10) + var j2 int + for _, num := range m.Ports { + for num >= 1<<7 { + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j2++ + } + dAtA3[j2] = uint8(num) + j2++ + } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintSubmit(dAtA, i, uint64(j2)) + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = encodeVarintSubmit(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ServiceConfig) 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 *ServiceConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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] = 0x1a + } + if len(m.Ports) > 0 { + dAtA5 := make([]byte, len(m.Ports)*10) + var j4 int + for _, num := range m.Ports { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintSubmit(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = encodeVarintSubmit(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *JobSubmitRequest) 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 *JobSubmitRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JobSubmitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.JobRequestItems) > 0 { + for iNdEx := len(m.JobRequestItems) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.JobRequestItems[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.JobSetId) > 0 { + i -= len(m.JobSetId) + copy(dAtA[i:], m.JobSetId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Queue) > 0 { + i -= len(m.Queue) + copy(dAtA[i:], m.Queue) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *JobPreemptRequest) 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 *JobPreemptRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JobPreemptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x22 + } + if len(m.JobIds) > 0 { + for iNdEx := len(m.JobIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.JobIds[iNdEx]) + copy(dAtA[i:], m.JobIds[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobIds[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.JobSetId) > 0 { + i -= len(m.JobSetId) + copy(dAtA[i:], m.JobSetId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Queue) > 0 { + i -= len(m.Queue) + copy(dAtA[i:], m.Queue) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *JobCancelRequest) 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 *JobCancelRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JobCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x2a + } + if len(m.JobIds) > 0 { + for iNdEx := len(m.JobIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.JobIds[iNdEx]) + copy(dAtA[i:], m.JobIds[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Queue) > 0 { + i -= len(m.Queue) + copy(dAtA[i:], m.Queue) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + i-- + dAtA[i] = 0x1a + } + if len(m.JobSetId) > 0 { + i -= len(m.JobSetId) + copy(dAtA[i:], m.JobSetId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) + i-- + dAtA[i] = 0x12 + } + if len(m.JobId) > 0 { + i -= len(m.JobId) + copy(dAtA[i:], m.JobId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *JobSetCancelRequest) 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 *JobSetCancelRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JobSetCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x22 + } + if m.Filter != nil { + { + size, err := m.Filter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Queue) > 0 { + i -= len(m.Queue) + copy(dAtA[i:], m.Queue) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + i-- + dAtA[i] = 0x12 + } + if len(m.JobSetId) > 0 { + i -= len(m.JobSetId) + copy(dAtA[i:], m.JobSetId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *JobSetFilter) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3628,22 +5026,120 @@ func (m *JobSubmitRequestItem) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobSubmitRequestItem) MarshalTo(dAtA []byte) (int, error) { +func (m *JobSetFilter) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobSubmitRequestItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *JobSetFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.States) > 0 { + dAtA8 := make([]byte, len(m.States)*10) + var j7 int + for _, num := range m.States { + for num >= 1<<7 { + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + dAtA8[j7] = uint8(num) + j7++ + } + i -= j7 + copy(dAtA[i:], dAtA8[:j7]) + i = encodeVarintSubmit(dAtA, i, uint64(j7)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Job) 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 *Job) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Job) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.SchedulingResourceRequirements != nil { + { + size, err := m.SchedulingResourceRequirements.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } if len(m.Scheduler) > 0 { i -= len(m.Scheduler) copy(dAtA[i:], m.Scheduler) i = encodeVarintSubmit(dAtA, i, uint64(len(m.Scheduler))) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if len(m.CompressedQueueOwnershipUserGroups) > 0 { + i -= len(m.CompressedQueueOwnershipUserGroups) + copy(dAtA[i:], m.CompressedQueueOwnershipUserGroups) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.CompressedQueueOwnershipUserGroups))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if len(m.K8SService) > 0 { + for iNdEx := len(m.K8SService) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.K8SService[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + } + if len(m.K8SIngress) > 0 { + for iNdEx := len(m.K8SIngress) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.K8SIngress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } } if len(m.Services) > 0 { for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { @@ -3656,7 +5152,18 @@ func (m *JobSubmitRequestItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSubmit(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + } + if len(m.QueueOwnershipUserGroups) > 0 { + for iNdEx := len(m.QueueOwnershipUserGroups) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.QueueOwnershipUserGroups[iNdEx]) + copy(dAtA[i:], m.QueueOwnershipUserGroups[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.QueueOwnershipUserGroups[iNdEx]))) + i-- + dAtA[i] = 0x7a } } if len(m.Ingress) > 0 { @@ -3670,7 +5177,7 @@ func (m *JobSubmitRequestItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSubmit(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a + dAtA[i] = 0x72 } } if len(m.ClientId) > 0 { @@ -3678,7 +5185,7 @@ func (m *JobSubmitRequestItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.ClientId) i = encodeVarintSubmit(dAtA, i, uint64(len(m.ClientId))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x6a } if len(m.PodSpecs) > 0 { for iNdEx := len(m.PodSpecs) - 1; iNdEx >= 0; iNdEx-- { @@ -3691,140 +5198,27 @@ func (m *JobSubmitRequestItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSubmit(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a - } - } - if len(m.RequiredNodeLabels) > 0 { - for k := range m.RequiredNodeLabels { - v := m.RequiredNodeLabels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x1a - } - if m.PodSpec != nil { - { - size, err := m.PodSpec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Priority != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Priority)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *IngressConfig) 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 *IngressConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IngressConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UseClusterIP { - i-- - if m.UseClusterIP { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.CertName) > 0 { - i -= len(m.CertName) - copy(dAtA[i:], m.CertName) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.CertName))) - i-- - dAtA[i] = 0x2a + dAtA[i] = 0x62 + } } - if m.TlsEnabled { - i-- - if m.TlsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.RequiredNodeLabels) > 0 { + for k := range m.RequiredNodeLabels { + v := m.RequiredNodeLabels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x5a } - i-- - dAtA[i] = 0x20 } if len(m.Annotations) > 0 { for k := range m.Annotations { @@ -3842,121 +5236,78 @@ func (m *IngressConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x52 } } - if len(m.Ports) > 0 { - dAtA3 := make([]byte, len(m.Ports)*10) - var j2 int - for _, num := range m.Ports { - for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j2++ - } - dAtA3[j2] = uint8(num) - j2++ + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4a } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintSubmit(dAtA, i, uint64(j2)) - i-- - dAtA[i] = 0x12 } - if m.Type != 0 { - i = encodeVarintSubmit(dAtA, i, uint64(m.Type)) + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Owner))) i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ServiceConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x42 } - return dAtA[:n], nil -} - -func (m *ServiceConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Name))) + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Namespace))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x3a } - if len(m.Ports) > 0 { - dAtA5 := make([]byte, len(m.Ports)*10) - var j4 int - for _, num := range m.Ports { - for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j4++ + if m.Created != nil { + { + size, err := m.Created.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - dAtA5[j4] = uint8(num) - j4++ + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintSubmit(dAtA, i, uint64(j4)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 } - if m.Type != 0 { - i = encodeVarintSubmit(dAtA, i, uint64(m.Type)) + if m.PodSpec != nil { + { + size, err := m.PodSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x2a } - return len(dAtA) - i, nil -} - -func (m *JobSubmitRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Priority != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Priority)))) + i-- + dAtA[i] = 0x21 } - return dAtA[:n], nil -} - -func (m *JobSubmitRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JobSubmitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.JobRequestItems) > 0 { - for iNdEx := len(m.JobRequestItems) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.JobRequestItems[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } + if len(m.Queue) > 0 { + i -= len(m.Queue) + copy(dAtA[i:], m.Queue) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + i-- + dAtA[i] = 0x1a } if len(m.JobSetId) > 0 { i -= len(m.JobSetId) @@ -3965,17 +5316,17 @@ func (m *JobSubmitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Queue) > 0 { - i -= len(m.Queue) - copy(dAtA[i:], m.Queue) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JobPreemptRequest) Marshal() (dAtA []byte, err error) { +func (m *JobReprioritizeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3985,31 +5336,28 @@ func (m *JobPreemptRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobPreemptRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *JobReprioritizeRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobPreemptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *JobReprioritizeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Reason))) + if m.NewPriority != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NewPriority)))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x21 } - if len(m.JobIds) > 0 { - for iNdEx := len(m.JobIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.JobIds[iNdEx]) - copy(dAtA[i:], m.JobIds[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobIds[iNdEx]))) - i-- - dAtA[i] = 0x1a - } + if len(m.Queue) > 0 { + i -= len(m.Queue) + copy(dAtA[i:], m.Queue) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + i-- + dAtA[i] = 0x1a } if len(m.JobSetId) > 0 { i -= len(m.JobSetId) @@ -4018,17 +5366,19 @@ func (m *JobPreemptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Queue) > 0 { - i -= len(m.Queue) - copy(dAtA[i:], m.Queue) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) - i-- - dAtA[i] = 0xa + if len(m.JobIds) > 0 { + for iNdEx := len(m.JobIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.JobIds[iNdEx]) + copy(dAtA[i:], m.JobIds[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *JobCancelRequest) Marshal() (dAtA []byte, err error) { +func (m *JobReprioritizeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4038,57 +5388,39 @@ func (m *JobCancelRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobCancelRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *JobReprioritizeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *JobReprioritizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x2a - } - if len(m.JobIds) > 0 { - for iNdEx := len(m.JobIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.JobIds[iNdEx]) - copy(dAtA[i:], m.JobIds[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobIds[iNdEx]))) + if len(m.ReprioritizationResults) > 0 { + for k := range m.ReprioritizationResults { + v := m.ReprioritizationResults[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - if len(m.Queue) > 0 { - i -= len(m.Queue) - copy(dAtA[i:], m.Queue) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) - i-- - dAtA[i] = 0x1a - } - if len(m.JobSetId) > 0 { - i -= len(m.JobSetId) - copy(dAtA[i:], m.JobSetId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) - i-- - dAtA[i] = 0x12 - } - if len(m.JobId) > 0 { - i -= len(m.JobId) - copy(dAtA[i:], m.JobId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobId))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *JobSetCancelRequest) Marshal() (dAtA []byte, err error) { +func (m *JobSubmitResponseItem) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4098,53 +5430,34 @@ func (m *JobSetCancelRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobSetCancelRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *JobSubmitResponseItem) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobSetCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *JobSubmitResponseItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - } - if m.Filter != nil { - { - size, err := m.Filter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Queue) > 0 { - i -= len(m.Queue) - copy(dAtA[i:], m.Queue) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Error))) i-- dAtA[i] = 0x12 } - if len(m.JobSetId) > 0 { - i -= len(m.JobSetId) - copy(dAtA[i:], m.JobSetId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) + if len(m.JobId) > 0 { + i -= len(m.JobId) + copy(dAtA[i:], m.JobId) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JobSetFilter) Marshal() (dAtA []byte, err error) { +func (m *JobSubmitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4154,38 +5467,34 @@ func (m *JobSetFilter) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobSetFilter) MarshalTo(dAtA []byte) (int, error) { +func (m *JobSubmitResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobSetFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *JobSubmitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.States) > 0 { - dAtA8 := make([]byte, len(m.States)*10) - var j7 int - for _, num := range m.States { - for num >= 1<<7 { - dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j7++ + if len(m.JobResponseItems) > 0 { + for iNdEx := len(m.JobResponseItems) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.JobResponseItems[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) } - dAtA8[j7] = uint8(num) - j7++ + i-- + dAtA[i] = 0xa } - i -= j7 - copy(dAtA[i:], dAtA8[:j7]) - i = encodeVarintSubmit(dAtA, i, uint64(j7)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Job) Marshal() (dAtA []byte, err error) { +func (m *Queue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4195,130 +5504,91 @@ func (m *Job) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Job) MarshalTo(dAtA []byte) (int, error) { +func (m *Queue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Job) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Queue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.SchedulingResourceRequirements != nil { - { - size, err := m.SchedulingResourceRequirements.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.Scheduler) > 0 { - i -= len(m.Scheduler) - copy(dAtA[i:], m.Scheduler) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Scheduler))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if len(m.CompressedQueueOwnershipUserGroups) > 0 { - i -= len(m.CompressedQueueOwnershipUserGroups) - copy(dAtA[i:], m.CompressedQueueOwnershipUserGroups) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.CompressedQueueOwnershipUserGroups))) - i-- - dAtA[i] = 0x1 + if len(m.RetryPolicy) > 0 { + i -= len(m.RetryPolicy) + copy(dAtA[i:], m.RetryPolicy) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.RetryPolicy))) i-- - dAtA[i] = 0x9a + dAtA[i] = 0x5a } - if len(m.K8SService) > 0 { - for iNdEx := len(m.K8SService) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.K8SService[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintSubmit(dAtA, i, uint64(len(v))) i-- - dAtA[i] = 0x92 - } - } - if len(m.K8SIngress) > 0 { - for iNdEx := len(m.K8SIngress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.K8SIngress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) i-- - dAtA[i] = 0x1 + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x8a + dAtA[i] = 0x52 } } - if len(m.Services) > 0 { - for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Services[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 + if len(m.LabelsDeprecated) > 0 { + for iNdEx := len(m.LabelsDeprecated) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.LabelsDeprecated[iNdEx]) + copy(dAtA[i:], m.LabelsDeprecated[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.LabelsDeprecated[iNdEx]))) i-- - dAtA[i] = 0x82 + dAtA[i] = 0x4a } } - if len(m.QueueOwnershipUserGroups) > 0 { - for iNdEx := len(m.QueueOwnershipUserGroups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.QueueOwnershipUserGroups[iNdEx]) - copy(dAtA[i:], m.QueueOwnershipUserGroups[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.QueueOwnershipUserGroups[iNdEx]))) - i-- - dAtA[i] = 0x7a + if m.Cordoned { + i-- + if m.Cordoned { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x40 } - if len(m.Ingress) > 0 { - for iNdEx := len(m.Ingress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ingress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.ResourceLimitsByPriorityClassName) > 0 { + for k := range m.ResourceLimitsByPriorityClassName { + v := m.ResourceLimitsByPriorityClassName[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) i-- - dAtA[i] = 0x72 - } - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0x6a + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3a + } } - if len(m.PodSpecs) > 0 { - for iNdEx := len(m.PodSpecs) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Permissions) > 0 { + for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.PodSpecs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Permissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4326,18 +5596,17 @@ func (m *Job) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSubmit(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x62 + dAtA[i] = 0x32 } } - if len(m.RequiredNodeLabels) > 0 { - for k := range m.RequiredNodeLabels { - v := m.RequiredNodeLabels[k] + if len(m.ResourceLimits) > 0 { + for k := range m.ResourceLimits { + v := m.ResourceLimits[k] baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x11 i -= len(k) copy(dAtA[i:], k) i = encodeVarintSubmit(dAtA, i, uint64(len(k))) @@ -4345,116 +5614,127 @@ func (m *Job) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x2a } } - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + if len(m.GroupOwners) > 0 { + for iNdEx := len(m.GroupOwners) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GroupOwners[iNdEx]) + copy(dAtA[i:], m.GroupOwners[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.GroupOwners[iNdEx]))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x22 } } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + if len(m.UserOwners) > 0 { + for iNdEx := len(m.UserOwners) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UserOwners[iNdEx]) + copy(dAtA[i:], m.UserOwners[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.UserOwners[iNdEx]))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x1a } } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Owner))) + if m.PriorityFactor != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.PriorityFactor)))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x11 } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Namespace))) + 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] = 0x3a + dAtA[i] = 0xa } - if m.Created != nil { - { - size, err := m.Created.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) + return len(dAtA) - i, nil +} + +func (m *Queue_Permissions) 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 *Queue_Permissions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Queue_Permissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x32 } - if m.PodSpec != nil { - { - size, err := m.PodSpec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Subjects) > 0 { + for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x2a - } - if m.Priority != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Priority)))) - i-- - dAtA[i] = 0x21 } - if len(m.Queue) > 0 { - i -= len(m.Queue) - copy(dAtA[i:], m.Queue) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) - i-- - dAtA[i] = 0x1a + return len(dAtA) - i, nil +} + +func (m *Queue_Permissions_Subject) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.JobSetId) > 0 { - i -= len(m.JobSetId) - copy(dAtA[i:], m.JobSetId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) + return dAtA[:n], nil +} + +func (m *Queue_Permissions_Subject) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Queue_Permissions_Subject) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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] = 0x12 } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Id))) + if len(m.Kind) > 0 { + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.Kind))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *JobReprioritizeRequest) Marshal() (dAtA []byte, err error) { +func (m *PriorityClassResourceLimits) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4464,41 +5744,56 @@ func (m *JobReprioritizeRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobReprioritizeRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *PriorityClassResourceLimits) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobReprioritizeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PriorityClassResourceLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.NewPriority != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NewPriority)))) - i-- - dAtA[i] = 0x21 - } - if len(m.Queue) > 0 { - i -= len(m.Queue) - copy(dAtA[i:], m.Queue) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Queue))) - i-- - dAtA[i] = 0x1a - } - if len(m.JobSetId) > 0 { - i -= len(m.JobSetId) - copy(dAtA[i:], m.JobSetId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobSetId))) - i-- - dAtA[i] = 0x12 + if len(m.MaximumResourceFractionByPool) > 0 { + for k := range m.MaximumResourceFractionByPool { + v := m.MaximumResourceFractionByPool[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } } - if len(m.JobIds) > 0 { - for iNdEx := len(m.JobIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.JobIds[iNdEx]) - copy(dAtA[i:], m.JobIds[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobIds[iNdEx]))) + if len(m.MaximumResourceFraction) > 0 { + for k := range m.MaximumResourceFraction { + v := m.MaximumResourceFraction[k] + baseI := i + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i-- + dAtA[i] = 0x11 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSubmit(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -4506,7 +5801,7 @@ func (m *JobReprioritizeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *JobReprioritizeResponse) Marshal() (dAtA []byte, err error) { +func (m *PriorityClassPoolResourceLimits) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4516,25 +5811,24 @@ func (m *JobReprioritizeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobReprioritizeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *PriorityClassPoolResourceLimits) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobReprioritizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PriorityClassPoolResourceLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ReprioritizationResults) > 0 { - for k := range m.ReprioritizationResults { - v := m.ReprioritizationResults[k] + if len(m.MaximumResourceFraction) > 0 { + for k := range m.MaximumResourceFraction { + v := m.MaximumResourceFraction[k] baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x11 i -= len(k) copy(dAtA[i:], k) i = encodeVarintSubmit(dAtA, i, uint64(len(k))) @@ -4548,7 +5842,7 @@ func (m *JobReprioritizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *JobSubmitResponseItem) Marshal() (dAtA []byte, err error) { +func (m *QueueList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4558,34 +5852,34 @@ func (m *JobSubmitResponseItem) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobSubmitResponseItem) MarshalTo(dAtA []byte) (int, error) { +func (m *QueueList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobSubmitResponseItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueueList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if len(m.JobId) > 0 { - i -= len(m.JobId) - copy(dAtA[i:], m.JobId) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.JobId))) - i-- - dAtA[i] = 0xa + if len(m.Queues) > 0 { + for iNdEx := len(m.Queues) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Queues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *JobSubmitResponse) Marshal() (dAtA []byte, err error) { +func (m *CancellationResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4595,26 +5889,21 @@ func (m *JobSubmitResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *JobSubmitResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *CancellationResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *JobSubmitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *CancellationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.JobResponseItems) > 0 { - for iNdEx := len(m.JobResponseItems) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.JobResponseItems[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } + if len(m.CancelledIds) > 0 { + for iNdEx := len(m.CancelledIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CancelledIds[iNdEx]) + copy(dAtA[i:], m.CancelledIds[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.CancelledIds[iNdEx]))) i-- dAtA[i] = 0xa } @@ -4622,7 +5911,7 @@ func (m *JobSubmitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Queue) Marshal() (dAtA []byte, err error) { +func (m *PreemptionResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4632,19 +5921,19 @@ func (m *Queue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Queue) MarshalTo(dAtA []byte) (int, error) { +func (m *PreemptionResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Queue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PreemptionResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] + if len(m.PreemptionResults) > 0 { + for k := range m.PreemptionResults { + v := m.PreemptionResults[k] baseI := i i -= len(v) copy(dAtA[i:], v) @@ -4658,121 +5947,13 @@ func (m *Queue) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x52 - } - } - if len(m.LabelsDeprecated) > 0 { - for iNdEx := len(m.LabelsDeprecated) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.LabelsDeprecated[iNdEx]) - copy(dAtA[i:], m.LabelsDeprecated[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.LabelsDeprecated[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if m.Cordoned { - i-- - if m.Cordoned { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.ResourceLimitsByPriorityClassName) > 0 { - for k := range m.ResourceLimitsByPriorityClassName { - v := m.ResourceLimitsByPriorityClassName[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Permissions) > 0 { - for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Permissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.ResourceLimits) > 0 { - for k := range m.ResourceLimits { - v := m.ResourceLimits[k] - baseI := i - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.GroupOwners) > 0 { - for iNdEx := len(m.GroupOwners) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.GroupOwners[iNdEx]) - copy(dAtA[i:], m.GroupOwners[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.GroupOwners[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.UserOwners) > 0 { - for iNdEx := len(m.UserOwners) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UserOwners[iNdEx]) - copy(dAtA[i:], m.UserOwners[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.UserOwners[iNdEx]))) - i-- - dAtA[i] = 0x1a } } - if m.PriorityFactor != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.PriorityFactor)))) - i-- - dAtA[i] = 0x11 - } - 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 *Queue_Permissions) Marshal() (dAtA []byte, err error) { +func (m *RetryPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4782,29 +5963,20 @@ func (m *Queue_Permissions) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Queue_Permissions) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Queue_Permissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Verbs) > 0 { - for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Verbs[iNdEx]) - copy(dAtA[i:], m.Verbs[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Verbs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4812,13 +5984,30 @@ func (m *Queue_Permissions) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSubmit(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x22 } } + if m.DefaultAction != 0 { + i = encodeVarintSubmit(dAtA, i, uint64(m.DefaultAction)) + i-- + dAtA[i] = 0x18 + } + if m.RetryLimit != 0 { + i = encodeVarintSubmit(dAtA, i, uint64(m.RetryLimit)) + i-- + dAtA[i] = 0x10 + } + 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 *Queue_Permissions_Subject) Marshal() (dAtA []byte, err error) { +func (m *RetryRule) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4828,34 +6017,62 @@ func (m *Queue_Permissions_Subject) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Queue_Permissions_Subject) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryRule) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Queue_Permissions_Subject) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Name))) + if len(m.OnCategories) > 0 { + for iNdEx := len(m.OnCategories) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OnCategories[iNdEx]) + copy(dAtA[i:], m.OnCategories[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.OnCategories[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.OnTerminationMessagePattern) > 0 { + i -= len(m.OnTerminationMessagePattern) + copy(dAtA[i:], m.OnTerminationMessagePattern) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.OnTerminationMessagePattern))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x22 + } + if m.OnExitCodes != nil { + { + size, err := m.OnExitCodes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - if len(m.Kind) > 0 { - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.Kind))) + if len(m.OnConditions) > 0 { + for iNdEx := len(m.OnConditions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OnConditions[iNdEx]) + copy(dAtA[i:], m.OnConditions[iNdEx]) + i = encodeVarintSubmit(dAtA, i, uint64(len(m.OnConditions[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Action != 0 { + i = encodeVarintSubmit(dAtA, i, uint64(m.Action)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *PriorityClassResourceLimits) Marshal() (dAtA []byte, err error) { +func (m *RetryExitCodeMatcher) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4865,64 +6082,44 @@ func (m *PriorityClassResourceLimits) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PriorityClassResourceLimits) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryExitCodeMatcher) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PriorityClassResourceLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryExitCodeMatcher) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.MaximumResourceFractionByPool) > 0 { - for k := range m.MaximumResourceFractionByPool { - v := m.MaximumResourceFractionByPool[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if len(m.Values) > 0 { + dAtA16 := make([]byte, len(m.Values)*10) + var j15 int + for _, num1 := range m.Values { + num := uint64(num1) + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 + dAtA16[j15] = uint8(num) + j15++ } + i -= j15 + copy(dAtA[i:], dAtA16[:j15]) + i = encodeVarintSubmit(dAtA, i, uint64(j15)) + i-- + dAtA[i] = 0x12 } - if len(m.MaximumResourceFraction) > 0 { - for k := range m.MaximumResourceFraction { - v := m.MaximumResourceFraction[k] - baseI := i - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } + if m.Operator != 0 { + i = encodeVarintSubmit(dAtA, i, uint64(m.Operator)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *PriorityClassPoolResourceLimits) Marshal() (dAtA []byte, err error) { +func (m *RetryPolicyGetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4932,38 +6129,27 @@ func (m *PriorityClassPoolResourceLimits) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PriorityClassPoolResourceLimits) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryPolicyGetRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PriorityClassPoolResourceLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryPolicyGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.MaximumResourceFraction) > 0 { - for k := range m.MaximumResourceFraction { - v := m.MaximumResourceFraction[k] - baseI := i - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } + 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 *QueueList) Marshal() (dAtA []byte, err error) { +func (m *RetryPolicyDeleteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4973,34 +6159,27 @@ func (m *QueueList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueueList) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryPolicyDeleteRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueueList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryPolicyDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Queues) > 0 { - for iNdEx := len(m.Queues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Queues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSubmit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + 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 *CancellationResult) Marshal() (dAtA []byte, err error) { +func (m *RetryPolicyListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5010,29 +6189,20 @@ func (m *CancellationResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CancellationResult) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryPolicyListRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CancellationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryPolicyListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.CancelledIds) > 0 { - for iNdEx := len(m.CancelledIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CancelledIds[iNdEx]) - copy(dAtA[i:], m.CancelledIds[iNdEx]) - i = encodeVarintSubmit(dAtA, i, uint64(len(m.CancelledIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } -func (m *PreemptionResult) Marshal() (dAtA []byte, err error) { +func (m *RetryPolicyList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5042,31 +6212,26 @@ func (m *PreemptionResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PreemptionResult) MarshalTo(dAtA []byte) (int, error) { +func (m *RetryPolicyList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PreemptionResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RetryPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.PreemptionResults) > 0 { - for k := range m.PreemptionResults { - v := m.PreemptionResults[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintSubmit(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintSubmit(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintSubmit(dAtA, i, uint64(baseI-i)) + if len(m.RetryPolicies) > 0 { + for iNdEx := len(m.RetryPolicies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RetryPolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubmit(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -5595,20 +6760,20 @@ func (m *QueueCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } if len(m.JobStates) > 0 { - dAtA19 := make([]byte, len(m.JobStates)*10) - var j18 int + dAtA22 := make([]byte, len(m.JobStates)*10) + var j21 int for _, num := range m.JobStates { for num >= 1<<7 { - dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) + dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j18++ + j21++ } - dAtA19[j18] = uint8(num) - j18++ + dAtA22[j21] = uint8(num) + j21++ } - i -= j18 - copy(dAtA[i:], dAtA19[:j18]) - i = encodeVarintSubmit(dAtA, i, uint64(j18)) + i -= j21 + copy(dAtA[i:], dAtA22[:j21]) + i = encodeVarintSubmit(dAtA, i, uint64(j21)) i-- dAtA[i] = 0x1a } @@ -6154,6 +7319,10 @@ func (m *Queue) Size() (n int) { n += mapEntrySize + 1 + sovSubmit(uint64(mapEntrySize)) } } + l = len(m.RetryPolicy) + if l > 0 { + n += 1 + l + sovSubmit(uint64(l)) + } return n } @@ -6257,33 +7426,159 @@ func (m *QueueList) Size() (n int) { return n } -func (m *CancellationResult) Size() (n int) { +func (m *CancellationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CancelledIds) > 0 { + for _, s := range m.CancelledIds { + l = len(s) + n += 1 + l + sovSubmit(uint64(l)) + } + } + return n +} + +func (m *PreemptionResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PreemptionResults) > 0 { + for k, v := range m.PreemptionResults { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovSubmit(uint64(len(k))) + 1 + len(v) + sovSubmit(uint64(len(v))) + n += mapEntrySize + 1 + sovSubmit(uint64(mapEntrySize)) + } + } + return n +} + +func (m *RetryPolicy) 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 m.RetryLimit != 0 { + n += 1 + sovSubmit(uint64(m.RetryLimit)) + } + if m.DefaultAction != 0 { + n += 1 + sovSubmit(uint64(m.DefaultAction)) + } + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovSubmit(uint64(l)) + } + } + return n +} + +func (m *RetryRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Action != 0 { + n += 1 + sovSubmit(uint64(m.Action)) + } + if len(m.OnConditions) > 0 { + for _, s := range m.OnConditions { + l = len(s) + n += 1 + l + sovSubmit(uint64(l)) + } + } + if m.OnExitCodes != nil { + l = m.OnExitCodes.Size() + n += 1 + l + sovSubmit(uint64(l)) + } + l = len(m.OnTerminationMessagePattern) + if l > 0 { + n += 1 + l + sovSubmit(uint64(l)) + } + if len(m.OnCategories) > 0 { + for _, s := range m.OnCategories { + l = len(s) + n += 1 + l + sovSubmit(uint64(l)) + } + } + return n +} + +func (m *RetryExitCodeMatcher) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Operator != 0 { + n += 1 + sovSubmit(uint64(m.Operator)) + } + if len(m.Values) > 0 { + l = 0 + for _, e := range m.Values { + l += sovSubmit(uint64(e)) + } + n += 1 + sovSubmit(uint64(l)) + l + } + return n +} + +func (m *RetryPolicyGetRequest) 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)) + } + return n +} + +func (m *RetryPolicyDeleteRequest) 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)) + } + return n +} + +func (m *RetryPolicyListRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.CancelledIds) > 0 { - for _, s := range m.CancelledIds { - l = len(s) - n += 1 + l + sovSubmit(uint64(l)) - } - } return n } -func (m *PreemptionResult) Size() (n int) { +func (m *RetryPolicyList) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.PreemptionResults) > 0 { - for k, v := range m.PreemptionResults { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovSubmit(uint64(len(k))) + 1 + len(v) + sovSubmit(uint64(len(v))) - n += mapEntrySize + 1 + sovSubmit(uint64(mapEntrySize)) + if len(m.RetryPolicies) > 0 { + for _, e := range m.RetryPolicies { + l = e.Size() + n += 1 + l + sovSubmit(uint64(l)) } } return n @@ -6639,22 +7934,276 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredNodeLabels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6681,8 +8230,8 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) + if m.RequiredNodeLabels == nil { + m.RequiredNodeLabels = make(map[string]string) } var mapkey string var mapvalue string @@ -6777,13 +8326,229 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + m.RequiredNodeLabels[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSpecs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSpecs = append(m.PodSpecs, &v1.PodSpec{}) + if err := m.PodSpecs[len(m.PodSpecs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", 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.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ingress = append(m.Ingress, &IngressConfig{}) + if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, &ServiceConfig{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scheduler", 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.Scheduler = 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 *IngressConfig) 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: IngressConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -6793,29 +8558,14 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Type |= IngressType(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Annotations == nil { - m.Annotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 + case 2: + if wireType == 0 { + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -6825,43 +8575,51 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.Ports = append(m.Ports, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit + if iNdEx >= l { + return io.ErrUnexpectedEOF } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF + } + if packedLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 + } + elementCount = count + if elementCount != 0 && len(m.Ports) == 0 { + m.Ports = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -6871,44 +8629,19 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + v |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + m.Ports = append(m.Ports, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequiredNodeLabels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6935,8 +8668,8 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequiredNodeLabels == nil { - m.RequiredNodeLabels = make(map[string]string) + if m.Annotations == nil { + m.Annotations = make(map[string]string) } var mapkey string var mapvalue string @@ -7025,119 +8758,19 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubmit } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.RequiredNodeLabels[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSpecs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodSpecs = append(m.PodSpecs, &v1.PodSpec{}) - if err := m.PodSpecs[len(m.PodSpecs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", 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.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ingress = append(m.Ingress, &IngressConfig{}) - if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Annotations[mapkey] = mapvalue iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TlsEnabled", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7147,29 +8780,15 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Services = append(m.Services, &ServiceConfig{}) - if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: + m.TlsEnabled = bool(v != 0) + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheduler", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7197,8 +8816,28 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Scheduler = string(dAtA[iNdEx:postIndex]) + m.CertName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UseClusterIP", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UseClusterIP = bool(v != 0) default: iNdEx = preIndex skippy, err := skipSubmit(dAtA[iNdEx:]) @@ -7220,7 +8859,7 @@ func (m *JobSubmitRequestItem) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressConfig) Unmarshal(dAtA []byte) error { +func (m *ServiceConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7243,10 +8882,10 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressConfig: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ServiceConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7263,7 +8902,7 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= IngressType(b&0x7F) << shift + m.Type |= ServiceType(b&0x7F) << shift if b < 0x80 { break } @@ -7346,9 +8985,9 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7358,124 +8997,79 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Annotations == nil { - m.Annotations = make(map[string]string) + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsEnabled", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - var v int + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JobSubmitRequest) 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: JobSubmitRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobSubmitRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7485,15 +9079,27 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.TlsEnabled = bool(v != 0) - case 5: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7521,13 +9127,13 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CertName = string(dAtA[iNdEx:postIndex]) + m.JobSetId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UseClusterIP", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobRequestItems", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7537,12 +9143,26 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.UseClusterIP = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JobRequestItems = append(m.JobRequestItems, &JobSubmitRequestItem{}) + if err := m.JobRequestItems[len(m.JobRequestItems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSubmit(dAtA[iNdEx:]) @@ -7564,7 +9184,7 @@ func (m *IngressConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceConfig) Unmarshal(dAtA []byte) error { +func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7587,17 +9207,17 @@ func (m *ServiceConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceConfig: wiretype end group for non-group") + return fmt.Errorf("proto: JobPreemptRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JobPreemptRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) } - m.Type = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7607,90 +9227,91 @@ func (m *ServiceConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= ServiceType(b&0x7F) << shift + 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.Queue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit } - m.Ports = append(m.Ports, 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 iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return ErrInvalidLengthSubmit + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthSubmit + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JobSetId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Ports) == 0 { - m.Ports = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ports = append(m.Ports, v) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) } - case 3: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JobIds = append(m.JobIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7718,7 +9339,7 @@ func (m *ServiceConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Reason = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7741,7 +9362,7 @@ func (m *ServiceConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *JobSubmitRequest) Unmarshal(dAtA []byte) error { +func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7764,15 +9385,15 @@ func (m *JobSubmitRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobSubmitRequest: wiretype end group for non-group") + return fmt.Errorf("proto: JobCancelRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobSubmitRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JobCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7800,7 +9421,7 @@ func (m *JobSubmitRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Queue = string(dAtA[iNdEx:postIndex]) + m.JobId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -7836,9 +9457,73 @@ func (m *JobSubmitRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobRequestItems", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) } - var msglen int + 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.Queue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobIds", 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.JobIds = append(m.JobIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7848,25 +9533,23 @@ func (m *JobSubmitRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobRequestItems = append(m.JobRequestItems, &JobSubmitRequestItem{}) - if err := m.JobRequestItems[len(m.JobRequestItems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Reason = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7889,7 +9572,7 @@ func (m *JobSubmitRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { +func (m *JobSetCancelRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7912,15 +9595,15 @@ func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobPreemptRequest: wiretype end group for non-group") + return fmt.Errorf("proto: JobSetCancelRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobPreemptRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JobSetCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7948,11 +9631,11 @@ func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Queue = string(dAtA[iNdEx:postIndex]) + m.JobSetId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7980,13 +9663,13 @@ func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.JobSetId = string(dAtA[iNdEx:postIndex]) + m.Queue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -7996,23 +9679,27 @@ func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobIds = append(m.JobIds, string(dAtA[iNdEx:postIndex])) + if m.Filter == nil { + m.Filter = &JobSetFilter{} + } + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { @@ -8067,7 +9754,7 @@ func (m *JobPreemptRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { +func (m *JobSetFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8090,15 +9777,134 @@ func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobCancelRequest: wiretype end group for non-group") + return fmt.Errorf("proto: JobSetFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JobSetFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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.States = append(m.States, 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.States) == 0 { + m.States = 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.States = append(m.States, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field States", 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 (m *Job) 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: Job: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8126,7 +9932,7 @@ func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.JobId = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -8192,9 +9998,92 @@ func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { } m.Queue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Priority = float64(math.Float64frombits(v)) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSpec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PodSpec == nil { + m.PodSpec = &v1.PodSpec{} + } + if err := m.PodSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Created == nil { + m.Created = &types.Timestamp{} + } + if err := m.Created.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8222,11 +10111,11 @@ func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.JobIds = append(m.JobIds, string(dAtA[iNdEx:postIndex])) + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8254,63 +10143,13 @@ func (m *JobCancelRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Reason = string(dAtA[iNdEx:postIndex]) + m.Owner = 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 *JobSetCancelRequest) 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: JobSetCancelRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobSetCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -8320,29 +10159,124 @@ func (m *JobSetCancelRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobSetId = string(dAtA[iNdEx:postIndex]) + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 2: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -8352,27 +10286,122 @@ func (m *JobSetCancelRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(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.Queue = string(dAtA[iNdEx:postIndex]) + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue iNdEx = postIndex - case 3: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequiredNodeLabels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8399,98 +10428,14 @@ func (m *JobSetCancelRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Filter == nil { - m.Filter = &JobSetFilter{} - } - if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = 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 *JobSetFilter) 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 + if m.RequiredNodeLabels == nil { + m.RequiredNodeLabels = make(map[string]string) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobSetFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobSetFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v JobState + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -8500,44 +10445,43 @@ func (m *JobSetFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= JobState(b&0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.States = append(m.States, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit } - } - 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.States) == 0 { - m.States = make([]JobState, 0, elementCount) - } - for iNdEx < postIndex { - var v JobState + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -8547,69 +10491,78 @@ func (m *JobSetFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= JobState(b&0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.States = append(m.States, v) + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field States", wireType) } - default: - iNdEx = preIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err + m.RequiredNodeLabels[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSpecs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Job) 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.PodSpecs = append(m.PodSpecs, &v1.PodSpec{}) + if err := m.PodSpecs[len(m.PodSpecs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Job: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8637,13 +10590,13 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.ClientId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -8653,27 +10606,29 @@ func (m *Job) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobSetId = string(dAtA[iNdEx:postIndex]) + m.Ingress = append(m.Ingress, &IngressConfig{}) + if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueueOwnershipUserGroups", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8701,22 +10656,45 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Queue = string(dAtA[iNdEx:postIndex]) + m.QueueOwnershipUserGroups = append(m.QueueOwnershipUserGroups, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) } - var v uint64 - if (iNdEx + 8) > l { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Priority = float64(math.Float64frombits(v)) - case 5: + m.Services = append(m.Services, &ServiceConfig{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSpec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field K8SIngress", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8743,16 +10721,14 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PodSpec == nil { - m.PodSpec = &v1.PodSpec{} - } - if err := m.PodSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.K8SIngress = append(m.K8SIngress, &v11.Ingress{}) + if err := m.K8SIngress[len(m.K8SIngress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 18: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field K8SService", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8779,16 +10755,48 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Created == nil { - m.Created = &types.Timestamp{} - } - if err := m.Created.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.K8SService = append(m.K8SService, &v1.Service{}) + if err := m.K8SService[len(m.K8SService)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: + case 19: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CompressedQueueOwnershipUserGroups", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompressedQueueOwnershipUserGroups = append(m.CompressedQueueOwnershipUserGroups[:0], dAtA[iNdEx:postIndex]...) + if m.CompressedQueueOwnershipUserGroups == nil { + m.CompressedQueueOwnershipUserGroups = []byte{} + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scheduler", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8816,11 +10824,97 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: + m.Scheduler = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchedulingResourceRequirements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SchedulingResourceRequirements == nil { + m.SchedulingResourceRequirements = &v1.ResourceRequirements{} + } + if err := m.SchedulingResourceRequirements.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *JobReprioritizeRequest) 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: JobReprioritizeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobReprioritizeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8848,13 +10942,13 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + m.JobIds = append(m.JobIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 9: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -8864,249 +10958,120 @@ func (m *Job) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue + m.JobSetId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Annotations == nil { - m.Annotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + return fmt.Errorf("proto: wrong wireType = %d for field Queue", 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 } } - m.Annotations[mapkey] = mapvalue + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPriority", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.NewPriority = float64(math.Float64frombits(v)) + 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 *JobReprioritizeResponse) 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: JobReprioritizeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobReprioritizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequiredNodeLabels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReprioritizationResults", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9133,8 +11098,8 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequiredNodeLabels == nil { - m.RequiredNodeLabels = make(map[string]string) + if m.ReprioritizationResults == nil { + m.ReprioritizationResults = make(map[string]string) } var mapkey string var mapvalue string @@ -9229,45 +11194,61 @@ func (m *Job) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.RequiredNodeLabels[mapkey] = mapvalue + m.ReprioritizationResults[mapkey] = mapvalue iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSpecs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JobSubmitResponseItem) 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 } - m.PodSpecs = append(m.PodSpecs, &v1.PodSpec{}) - if err := m.PodSpecs[len(m.PodSpecs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 13: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JobSubmitResponseItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobSubmitResponseItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9295,13 +11276,13 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ClientId = string(dAtA[iNdEx:postIndex]) + m.JobId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 14: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -9311,61 +11292,77 @@ func (m *Job) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.Ingress = append(m.Ingress, &IngressConfig{}) - if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueueOwnershipUserGroups", 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 - } + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSubmit + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JobSubmitResponse) 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 } - m.QueueOwnershipUserGroups = append(m.QueueOwnershipUserGroups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 16: + 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: JobSubmitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobSubmitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JobResponseItems", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9392,50 +11389,66 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Services = append(m.Services, &ServiceConfig{}) - if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.JobResponseItems = append(m.JobResponseItems, &JobSubmitResponseItem{}) + if err := m.JobResponseItems[len(m.JobResponseItems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field K8SIngress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Queue) 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 } - m.K8SIngress = append(m.K8SIngress, &v11.Ingress{}) - if err := m.K8SIngress[len(m.K8SIngress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 18: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Queue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Queue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field K8SService", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -9445,31 +11458,40 @@ func (m *Job) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.K8SService = append(m.K8SService, &v1.Service{}) - if err := m.K8SService[len(m.K8SService)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 19: + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityFactor", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.PriorityFactor = float64(math.Float64frombits(v)) + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompressedQueueOwnershipUserGroups", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UserOwners", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -9479,29 +11501,27 @@ func (m *Job) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.CompressedQueueOwnershipUserGroups = append(m.CompressedQueueOwnershipUserGroups[:0], dAtA[iNdEx:postIndex]...) - if m.CompressedQueueOwnershipUserGroups == nil { - m.CompressedQueueOwnershipUserGroups = []byte{} - } + m.UserOwners = append(m.UserOwners, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 20: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheduler", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupOwners", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9529,11 +11549,11 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Scheduler = string(dAtA[iNdEx:postIndex]) + m.GroupOwners = append(m.GroupOwners, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 21: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchedulingResourceRequirements", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceLimits", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9560,68 +11580,88 @@ func (m *Job) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SchedulingResourceRequirements == nil { - m.SchedulingResourceRequirements = &v1.ResourceRequirements{} - } - if err := m.SchedulingResourceRequirements.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *JobReprioritizeRequest) 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 + if m.ResourceLimits == nil { + m.ResourceLimits = make(map[string]float64) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobReprioritizeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobReprioritizeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.ResourceLimits[mapkey] = mapvalue + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobIds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -9631,29 +11671,31 @@ func (m *JobReprioritizeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobIds = append(m.JobIds, string(dAtA[iNdEx:postIndex])) + m.Permissions = append(m.Permissions, &Queue_Permissions{}) + if err := m.Permissions[len(m.Permissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobSetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceLimitsByPriorityClassName", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -9663,27 +11705,144 @@ func (m *JobReprioritizeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobSetId = string(dAtA[iNdEx:postIndex]) + if m.ResourceLimitsByPriorityClassName == nil { + m.ResourceLimitsByPriorityClassName = make(map[string]*PriorityClassResourceLimits) + } + var mapkey string + var mapvalue *PriorityClassResourceLimits + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthSubmit + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthSubmit + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &PriorityClassResourceLimits{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ResourceLimitsByPriorityClassName[mapkey] = mapvalue iNdEx = postIndex - case 3: + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cordoned", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Cordoned = bool(v != 0) + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LabelsDeprecated", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9711,72 +11870,11 @@ func (m *JobReprioritizeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Queue = string(dAtA[iNdEx:postIndex]) + m.LabelsDeprecated = append(m.LabelsDeprecated, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NewPriority", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.NewPriority = float64(math.Float64frombits(v)) - 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 *JobReprioritizeResponse) 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: JobReprioritizeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobReprioritizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReprioritizationResults", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9803,8 +11901,8 @@ func (m *JobReprioritizeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ReprioritizationResults == nil { - m.ReprioritizationResults = make(map[string]string) + if m.Labels == nil { + m.Labels = make(map[string]string) } var mapkey string var mapvalue string @@ -9899,7 +11997,39 @@ func (m *JobReprioritizeResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ReprioritizationResults[mapkey] = mapvalue + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RetryPolicy", 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.RetryPolicy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9922,7 +12052,7 @@ func (m *JobReprioritizeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *JobSubmitResponseItem) Unmarshal(dAtA []byte) error { +func (m *Queue_Permissions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9945,17 +12075,17 @@ func (m *JobSubmitResponseItem) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobSubmitResponseItem: wiretype end group for non-group") + return fmt.Errorf("proto: Permissions: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobSubmitResponseItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -9965,27 +12095,29 @@ func (m *JobSubmitResponseItem) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobId = string(dAtA[iNdEx:postIndex]) + m.Subjects = append(m.Subjects, &Queue_Permissions_Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10013,7 +12145,7 @@ func (m *JobSubmitResponseItem) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Error = string(dAtA[iNdEx:postIndex]) + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -10036,7 +12168,7 @@ func (m *JobSubmitResponseItem) Unmarshal(dAtA []byte) error { } return nil } -func (m *JobSubmitResponse) Unmarshal(dAtA []byte) error { +func (m *Queue_Permissions_Subject) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10059,17 +12191,17 @@ func (m *JobSubmitResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobSubmitResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Subject: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobSubmitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobResponseItems", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -10079,25 +12211,55 @@ func (m *JobSubmitResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.JobResponseItems = append(m.JobResponseItems, &JobSubmitResponseItem{}) - if err := m.JobResponseItems[len(m.JobResponseItems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 default: iNdEx = preIndex @@ -10120,7 +12282,7 @@ func (m *JobSubmitResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *Queue) Unmarshal(dAtA []byte) error { +func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10143,60 +12305,17 @@ func (m *Queue) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Queue: wiretype end group for non-group") + return fmt.Errorf("proto: PriorityClassResourceLimits: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Queue: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PriorityClassResourceLimits: 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 != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field PriorityFactor", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.PriorityFactor = float64(math.Float64frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserOwners", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaximumResourceFraction", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -10206,59 +12325,101 @@ func (m *Queue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.UserOwners = append(m.UserOwners, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupOwners", wireType) + if m.MaximumResourceFraction == nil { + m.MaximumResourceFraction = make(map[string]float64) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := 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 + } } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSubmit + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSubmit + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubmit + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupOwners = append(m.GroupOwners, string(dAtA[iNdEx:postIndex])) + m.MaximumResourceFraction[mapkey] = mapvalue iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLimits", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaximumResourceFractionByPool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10285,11 +12446,11 @@ func (m *Queue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceLimits == nil { - m.ResourceLimits = make(map[string]float64) + if m.MaximumResourceFractionByPool == nil { + m.MaximumResourceFractionByPool = make(map[string]*PriorityClassPoolResourceLimits) } var mapkey string - var mapvalue float64 + var mapvalue *PriorityClassPoolResourceLimits for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -10338,13 +12499,36 @@ func (m *Queue) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthSubmit + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthSubmit + } + if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) + mapvalue = &PriorityClassPoolResourceLimits{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipSubmit(dAtA[iNdEx:]) @@ -10360,45 +12544,61 @@ func (m *Queue) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ResourceLimits[mapkey] = mapvalue + m.MaximumResourceFractionByPool[mapkey] = mapvalue iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipSubmit(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PriorityClassPoolResourceLimits) 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 } - m.Permissions = append(m.Permissions, &Queue_Permissions{}) - if err := m.Permissions[len(m.Permissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 7: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PriorityClassPoolResourceLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriorityClassPoolResourceLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLimitsByPriorityClassName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaximumResourceFraction", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10425,11 +12625,11 @@ func (m *Queue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceLimitsByPriorityClassName == nil { - m.ResourceLimitsByPriorityClassName = make(map[string]*PriorityClassResourceLimits) + if m.MaximumResourceFraction == nil { + m.MaximumResourceFraction = make(map[string]float64) } var mapkey string - var mapvalue *PriorityClassResourceLimits + var mapvalue float64 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -10478,36 +12678,13 @@ func (m *Queue) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthSubmit - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthSubmit - } - if postmsgIndex > l { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - mapvalue = &PriorityClassResourceLimits{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) } else { iNdEx = entryPreIndex skippy, err := skipSubmit(dAtA[iNdEx:]) @@ -10523,31 +12700,145 @@ func (m *Queue) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ResourceLimitsByPriorityClassName[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Cordoned", wireType) + m.MaximumResourceFraction[mapkey] = mapvalue + 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 *QueueList) 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: QueueList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueueList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queues", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queues = append(m.Queues, &Queue{}) + if err := m.Queues[len(m.Queues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *CancellationResult) 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 } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.Cordoned = bool(v != 0) - case 9: + 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: CancellationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancellationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelsDeprecated", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CancelledIds", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10575,11 +12866,61 @@ func (m *Queue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LabelsDeprecated = append(m.LabelsDeprecated, string(dAtA[iNdEx:postIndex])) + m.CancelledIds = append(m.CancelledIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 10: + 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 *PreemptionResult) 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: PreemptionResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreemptionResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreemptionResults", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10606,8 +12947,8 @@ func (m *Queue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) + if m.PreemptionResults == nil { + m.PreemptionResults = make(map[string]string) } var mapkey string var mapvalue string @@ -10702,7 +13043,7 @@ func (m *Queue) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Labels[mapkey] = mapvalue + m.PreemptionResults[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -10725,7 +13066,7 @@ func (m *Queue) Unmarshal(dAtA []byte) error { } return nil } -func (m *Queue_Permissions) Unmarshal(dAtA []byte) error { +func (m *RetryPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10748,17 +13089,17 @@ func (m *Queue_Permissions) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Permissions: wiretype end group for non-group") + return fmt.Errorf("proto: RetryPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RetryPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -10768,31 +13109,67 @@ func (m *Queue_Permissions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.Subjects = append(m.Subjects, &Queue_Permissions_Subject{}) - if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RetryLimit", wireType) + } + m.RetryLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RetryLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultAction", wireType) + } + m.DefaultAction = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DefaultAction |= RetryAction(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -10802,23 +13179,25 @@ func (m *Queue_Permissions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + m.Rules = append(m.Rules, &RetryRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -10841,7 +13220,7 @@ func (m *Queue_Permissions) Unmarshal(dAtA []byte) error { } return nil } -func (m *Queue_Permissions_Subject) Unmarshal(dAtA []byte) error { +func (m *RetryRule) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10851,28 +13230,115 @@ func (m *Queue_Permissions_Subject) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowSubmit } - if iNdEx >= l { + 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: RetryRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RetryRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + m.Action = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Action |= RetryAction(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OnConditions", 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.OnConditions = append(m.OnConditions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OnExitCodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubmit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.OnExitCodes == nil { + m.OnExitCodes = &RetryExitCodeMatcher{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if err := m.OnExitCodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OnTerminationMessagePattern", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10900,11 +13366,11 @@ func (m *Queue_Permissions_Subject) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + m.OnTerminationMessagePattern = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OnCategories", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10932,7 +13398,7 @@ func (m *Queue_Permissions_Subject) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.OnCategories = append(m.OnCategories, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -10955,7 +13421,7 @@ func (m *Queue_Permissions_Subject) Unmarshal(dAtA []byte) error { } return nil } -func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { +func (m *RetryExitCodeMatcher) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10978,17 +13444,17 @@ func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PriorityClassResourceLimits: wiretype end group for non-group") + return fmt.Errorf("proto: RetryExitCodeMatcher: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PriorityClassResourceLimits: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RetryExitCodeMatcher: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumResourceFraction", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } - var msglen int + m.Operator = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -10998,29 +13464,14 @@ func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Operator |= ExitCodeOperator(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaximumResourceFraction == nil { - m.MaximumResourceFraction = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 + case 2: + if wireType == 0 { + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -11030,103 +13481,14 @@ func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MaximumResourceFraction[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumResourceFractionByPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSubmit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSubmit - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaximumResourceFractionByPool == nil { - m.MaximumResourceFractionByPool = make(map[string]*PriorityClassPoolResourceLimits) - } - var mapkey string - var mapvalue *PriorityClassPoolResourceLimits - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 + m.Values = append(m.Values, v) + } else if wireType == 2 { + var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -11136,89 +13498,53 @@ func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF + if packedLen < 0 { + return ErrInvalidLengthSubmit + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthSubmit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int + } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit } if iNdEx >= l { return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthSubmit - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthSubmit - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &PriorityClassPoolResourceLimits{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx += skippy + m.Values = append(m.Values, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - m.MaximumResourceFractionByPool[mapkey] = mapvalue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSubmit(dAtA[iNdEx:]) @@ -11240,7 +13566,7 @@ func (m *PriorityClassResourceLimits) Unmarshal(dAtA []byte) error { } return nil } -func (m *PriorityClassPoolResourceLimits) Unmarshal(dAtA []byte) error { +func (m *RetryPolicyGetRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11263,17 +13589,17 @@ func (m *PriorityClassPoolResourceLimits) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PriorityClassPoolResourceLimits: wiretype end group for non-group") + return fmt.Errorf("proto: RetryPolicyGetRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PriorityClassPoolResourceLimits: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RetryPolicyGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumResourceFraction", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -11283,97 +13609,23 @@ func (m *PriorityClassPoolResourceLimits) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - if m.MaximumResourceFraction == nil { - m.MaximumResourceFraction = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MaximumResourceFraction[mapkey] = mapvalue + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11396,7 +13648,7 @@ func (m *PriorityClassPoolResourceLimits) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueueList) Unmarshal(dAtA []byte) error { +func (m *RetryPolicyDeleteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11419,17 +13671,17 @@ func (m *QueueList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueueList: wiretype end group for non-group") + return fmt.Errorf("proto: RetryPolicyDeleteRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueueList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RetryPolicyDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSubmit @@ -11439,25 +13691,23 @@ func (m *QueueList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSubmit } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSubmit } if postIndex > l { return io.ErrUnexpectedEOF } - m.Queues = append(m.Queues, &Queue{}) - if err := m.Queues[len(m.Queues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11480,7 +13730,7 @@ func (m *QueueList) Unmarshal(dAtA []byte) error { } return nil } -func (m *CancellationResult) Unmarshal(dAtA []byte) error { +func (m *RetryPolicyListRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11503,44 +13753,12 @@ func (m *CancellationResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CancellationResult: wiretype end group for non-group") + return fmt.Errorf("proto: RetryPolicyListRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CancellationResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RetryPolicyListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CancelledIds", 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.CancelledIds = append(m.CancelledIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSubmit(dAtA[iNdEx:]) @@ -11562,7 +13780,7 @@ func (m *CancellationResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *PreemptionResult) Unmarshal(dAtA []byte) error { +func (m *RetryPolicyList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11585,15 +13803,15 @@ func (m *PreemptionResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PreemptionResult: wiretype end group for non-group") + return fmt.Errorf("proto: RetryPolicyList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PreemptionResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RetryPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreemptionResults", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RetryPolicies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11620,103 +13838,10 @@ func (m *PreemptionResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PreemptionResults == nil { - m.PreemptionResults = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSubmit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthSubmit - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthSubmit - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipSubmit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSubmit - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + m.RetryPolicies = append(m.RetryPolicies, &RetryPolicy{}) + if err := m.RetryPolicies[len(m.RetryPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.PreemptionResults[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex diff --git a/pkg/api/submit.pb.gw.go b/pkg/api/submit.pb.gw.go index 59e891d3e3f..1a23b457971 100644 --- a/pkg/api/submit.pb.gw.go +++ b/pkg/api/submit.pb.gw.go @@ -511,6 +511,236 @@ func request_Submit_GetQueues_0(ctx context.Context, marshaler runtime.Marshaler } +func request_Submit_CreateRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client SubmitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicy + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateRetryPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Submit_CreateRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server SubmitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicy + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateRetryPolicy(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Submit_UpdateRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client SubmitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicy + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.UpdateRetryPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Submit_UpdateRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server SubmitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicy + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.UpdateRetryPolicy(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Submit_DeleteRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client SubmitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicyDeleteRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.DeleteRetryPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Submit_DeleteRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server SubmitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicyDeleteRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.DeleteRetryPolicy(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Submit_GetRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client SubmitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicyGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetRetryPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Submit_GetRetryPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server SubmitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicyGetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetRetryPolicy(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Submit_GetRetryPolicies_0(ctx context.Context, marshaler runtime.Marshaler, client SubmitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicyListRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetRetryPolicies(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Submit_GetRetryPolicies_0(ctx context.Context, marshaler runtime.Marshaler, server SubmitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryPolicyListRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetRetryPolicies(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSubmitHandlerServer registers the http handlers for service Submit to "mux". // UnaryRPC :call SubmitServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -777,6 +1007,121 @@ func RegisterSubmitHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return }) + mux.Handle("POST", pattern_Submit_CreateRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Submit_CreateRetryPolicy_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_CreateRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Submit_UpdateRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Submit_UpdateRetryPolicy_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_UpdateRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Submit_DeleteRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Submit_DeleteRetryPolicy_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_DeleteRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Submit_GetRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Submit_GetRetryPolicy_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_GetRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Submit_GetRetryPolicies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Submit_GetRetryPolicies_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_GetRetryPolicies_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1058,6 +1403,106 @@ func RegisterSubmitHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli }) + mux.Handle("POST", pattern_Submit_CreateRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Submit_CreateRetryPolicy_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_CreateRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Submit_UpdateRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Submit_UpdateRetryPolicy_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_UpdateRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Submit_DeleteRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Submit_DeleteRetryPolicy_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_DeleteRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Submit_GetRetryPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Submit_GetRetryPolicy_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_GetRetryPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Submit_GetRetryPolicies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Submit_GetRetryPolicies_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Submit_GetRetryPolicies_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1085,6 +1530,16 @@ var ( pattern_Submit_GetQueue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "queue", "name"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Submit_GetQueues_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "batched", "queues"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Submit_CreateRetryPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "retry-policy"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Submit_UpdateRetryPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "retry-policy", "name"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Submit_DeleteRetryPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "retry-policy", "name"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Submit_GetRetryPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "retry-policy", "name"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Submit_GetRetryPolicies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "retry-policies"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1111,4 +1566,14 @@ var ( forward_Submit_GetQueue_0 = runtime.ForwardResponseMessage forward_Submit_GetQueues_0 = runtime.ForwardResponseStream + + forward_Submit_CreateRetryPolicy_0 = runtime.ForwardResponseMessage + + forward_Submit_UpdateRetryPolicy_0 = runtime.ForwardResponseMessage + + forward_Submit_DeleteRetryPolicy_0 = runtime.ForwardResponseMessage + + forward_Submit_GetRetryPolicy_0 = runtime.ForwardResponseMessage + + forward_Submit_GetRetryPolicies_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/api/submit.proto b/pkg/api/submit.proto index 49598fbed6c..b587db27181 100644 --- a/pkg/api/submit.proto +++ b/pkg/api/submit.proto @@ -199,6 +199,7 @@ message Queue { // A list of Kubernetes-like key-value labels, e.g. armadaproject.io/priority=critical repeated string labels_deprecated = 9 [deprecated=true]; map labels = 10; + string retry_policy = 11; } message PriorityClassResourceLimits { @@ -229,6 +230,54 @@ message PreemptionResult { map preemption_results = 1; } +// RetryPolicy defines rules that determine whether failed jobs should be retried. +// Operators create policies and assign them to queues by name. +message RetryPolicy { + string name = 1; + uint32 retry_limit = 2; + RetryAction default_action = 3; + repeated RetryRule rules = 4; +} + +enum RetryAction { + RETRY_ACTION_UNSPECIFIED = 0; + RETRY_ACTION_FAIL = 1; + RETRY_ACTION_RETRY = 2; +} + +message RetryRule { + RetryAction action = 1; + repeated string on_conditions = 2; + RetryExitCodeMatcher on_exit_codes = 3; + string on_termination_message_pattern = 4; + repeated string on_categories = 5; +} + +enum ExitCodeOperator { + EXIT_CODE_OPERATOR_UNSPECIFIED = 0; + EXIT_CODE_OPERATOR_IN = 1; + EXIT_CODE_OPERATOR_NOT_IN = 2; +} + +message RetryExitCodeMatcher { + ExitCodeOperator operator = 1; + repeated int32 values = 2; +} + +message RetryPolicyGetRequest { + string name = 1; +} + +message RetryPolicyDeleteRequest { + string name = 1; +} + +message RetryPolicyListRequest {} + +message RetryPolicyList { + repeated RetryPolicy retry_policies = 1; +} + //swagger:model message QueueGetRequest { string name = 1; @@ -318,6 +367,14 @@ service QueueService { rpc CancelOnQueue (QueueCancelRequest) returns (google.protobuf.Empty) {} } +service RetryPolicyService { + rpc CreateRetryPolicy(RetryPolicy) returns (google.protobuf.Empty); + rpc UpdateRetryPolicy(RetryPolicy) returns (google.protobuf.Empty); + rpc DeleteRetryPolicy(RetryPolicyDeleteRequest) returns (google.protobuf.Empty); + rpc GetRetryPolicy(RetryPolicyGetRequest) returns (RetryPolicy); + rpc GetRetryPolicies(RetryPolicyListRequest) returns (RetryPolicyList); +} + service Submit { rpc SubmitJobs (JobSubmitRequest) returns (JobSubmitResponse) { option (google.api.http) = { @@ -388,5 +445,32 @@ service Submit { get: "/v1/batched/queues" }; } + rpc CreateRetryPolicy(RetryPolicy) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/retry-policy" + body: "*" + }; + } + rpc UpdateRetryPolicy(RetryPolicy) returns (google.protobuf.Empty) { + option (google.api.http) = { + put: "/v1/retry-policy/{name}" + body: "*" + }; + } + rpc DeleteRetryPolicy(RetryPolicyDeleteRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/retry-policy/{name}" + }; + } + rpc GetRetryPolicy(RetryPolicyGetRequest) returns (RetryPolicy) { + option (google.api.http) = { + get: "/v1/retry-policy/{name}" + }; + } + rpc GetRetryPolicies(RetryPolicyListRequest) returns (RetryPolicyList) { + option (google.api.http) = { + get: "/v1/retry-policies" + }; + } rpc Health(google.protobuf.Empty) returns (HealthCheckResponse); } diff --git a/pkg/client/queue/queue.go b/pkg/client/queue/queue.go index effb16b6422..af69a01892d 100644 --- a/pkg/client/queue/queue.go +++ b/pkg/client/queue/queue.go @@ -14,6 +14,7 @@ type Queue struct { ResourceLimitsByPriorityClassName map[string]api.PriorityClassResourceLimits Cordoned bool `json:"cordoned"` Labels map[string]string `json:"labels"` + RetryPolicy string `json:"retryPolicy"` } // NewQueue returns new Queue using the in parameter. Error is returned if @@ -62,6 +63,7 @@ func NewQueue(in *api.Queue) (Queue, error) { ResourceLimitsByPriorityClassName: resourceLimitsByPriorityClassName, Cordoned: in.Cordoned, Labels: in.Labels, + RetryPolicy: in.RetryPolicy, }, nil } @@ -75,8 +77,9 @@ func (q Queue) ToAPI() *api.Queue { func(p api.PriorityClassResourceLimits) *api.PriorityClassResourceLimits { return &p }), - Cordoned: q.Cordoned, - Labels: q.Labels, + Cordoned: q.Cordoned, + Labels: q.Labels, + RetryPolicy: q.RetryPolicy, } for _, permission := range q.Permissions { rv.Permissions = append(rv.Permissions, permission.ToAPI()) diff --git a/pkg/client/resource.go b/pkg/client/resource.go index 6d08f7a5900..1b37d2b5aa3 100644 --- a/pkg/client/resource.go +++ b/pkg/client/resource.go @@ -13,16 +13,18 @@ type Resource struct { type ResourceKind string const ( - ResourceKindQueue ResourceKind = "Queue" + ResourceKindQueue ResourceKind = "Queue" + ResourceKindRetryPolicy ResourceKind = "RetryPolicy" ) func NewResourceKind(in string) (ResourceKind, error) { - validValues := []ResourceKind{ResourceKindQueue} - if in != string(ResourceKindQueue) { + validValues := []ResourceKind{ResourceKindQueue, ResourceKindRetryPolicy} + switch in { + case string(ResourceKindQueue), string(ResourceKindRetryPolicy): + return ResourceKind(in), nil + default: return "", fmt.Errorf("invalid kind: %s. Valid values: %v", in, validValues) } - - return ResourceKind(in), nil } func (kind *ResourceKind) UnmarshalJSON(data []byte) error { diff --git a/pkg/client/retrypolicy/create.go b/pkg/client/retrypolicy/create.go new file mode 100644 index 00000000000..a97fd8ff95e --- /dev/null +++ b/pkg/client/retrypolicy/create.go @@ -0,0 +1,35 @@ +package retrypolicy + +import ( + "fmt" + + "github.com/armadaproject/armada/internal/common" + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" +) + +type CreateAPI func(policy *api.RetryPolicy) error + +func Create(getConnectionDetails client.ConnectionDetails) CreateAPI { + return func(policy *api.RetryPolicy) 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() + + c := api.NewRetryPolicyServiceClient(conn) + if _, err := c.CreateRetryPolicy(ctx, policy); err != nil { + return fmt.Errorf("create retry policy request failed: %s", err) + } + + return nil + } +} diff --git a/pkg/client/retrypolicy/delete.go b/pkg/client/retrypolicy/delete.go new file mode 100644 index 00000000000..9d1fbce7c33 --- /dev/null +++ b/pkg/client/retrypolicy/delete.go @@ -0,0 +1,35 @@ +package retrypolicy + +import ( + "fmt" + + "github.com/armadaproject/armada/internal/common" + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" +) + +type DeleteAPI func(name string) error + +func Delete(getConnectionDetails client.ConnectionDetails) DeleteAPI { + return func(name 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() + + c := api.NewRetryPolicyServiceClient(conn) + if _, err = c.DeleteRetryPolicy(ctx, &api.RetryPolicyDeleteRequest{Name: name}); err != nil { + return fmt.Errorf("delete retry policy request failed: %s", err) + } + + return nil + } +} diff --git a/pkg/client/retrypolicy/get.go b/pkg/client/retrypolicy/get.go new file mode 100644 index 00000000000..1e43b02d59e --- /dev/null +++ b/pkg/client/retrypolicy/get.go @@ -0,0 +1,63 @@ +package retrypolicy + +import ( + "fmt" + + "github.com/armadaproject/armada/internal/common" + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" +) + +type GetAPI func(name string) (*api.RetryPolicy, error) + +func Get(getConnectionDetails client.ConnectionDetails) GetAPI { + return func(name string) (*api.RetryPolicy, error) { + connectionDetails, err := getConnectionDetails() + if err != nil { + return nil, fmt.Errorf("failed to obtain api connection details: %s", err) + } + conn, err := client.CreateApiConnection(connectionDetails) + if err != nil { + return nil, fmt.Errorf("failed to connect to api because %s", err) + } + defer conn.Close() + + ctx, cancel := common.ContextWithDefaultTimeout() + defer cancel() + + c := api.NewRetryPolicyServiceClient(conn) + policy, err := c.GetRetryPolicy(ctx, &api.RetryPolicyGetRequest{Name: name}) + if err != nil { + return nil, fmt.Errorf("get retry policy request failed: %s", err) + } + + return policy, nil + } +} + +type GetAllAPI func() ([]*api.RetryPolicy, error) + +func GetAll(getConnectionDetails client.ConnectionDetails) GetAllAPI { + return func() ([]*api.RetryPolicy, error) { + connectionDetails, err := getConnectionDetails() + if err != nil { + return nil, fmt.Errorf("failed to obtain api connection details: %s", err) + } + conn, err := client.CreateApiConnection(connectionDetails) + if err != nil { + return nil, fmt.Errorf("failed to connect to api because %s", err) + } + defer conn.Close() + + ctx, cancel := common.ContextWithDefaultTimeout() + defer cancel() + + c := api.NewRetryPolicyServiceClient(conn) + list, err := c.GetRetryPolicies(ctx, &api.RetryPolicyListRequest{}) + if err != nil { + return nil, fmt.Errorf("get retry policies request failed: %s", err) + } + + return list.RetryPolicies, nil + } +} diff --git a/pkg/client/retrypolicy/update.go b/pkg/client/retrypolicy/update.go new file mode 100644 index 00000000000..967b0ad053f --- /dev/null +++ b/pkg/client/retrypolicy/update.go @@ -0,0 +1,34 @@ +package retrypolicy + +import ( + "fmt" + + "github.com/armadaproject/armada/internal/common" + "github.com/armadaproject/armada/pkg/api" + "github.com/armadaproject/armada/pkg/client" +) + +type UpdateAPI func(policy *api.RetryPolicy) error + +func Update(getConnectionDetails client.ConnectionDetails) UpdateAPI { + return func(policy *api.RetryPolicy) 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() + + c := api.NewRetryPolicyServiceClient(conn) + if _, err = c.UpdateRetryPolicy(ctx, policy); err != nil { + return fmt.Errorf("update retry policy request failed: %s", err) + } + return nil + } +}