github.com/pachyderm/pachyderm@v1.13.4/src/client/admin/v1_11/pps/pps.proto (about)

     1  syntax = "proto3";
     2  
     3  package pps_1_11;
     4  option go_package = "github.com/pachyderm/pachyderm/src/client/admin/v1_11/pps";
     5  
     6  import "google/protobuf/empty.proto";
     7  import "google/protobuf/timestamp.proto";
     8  import "google/protobuf/duration.proto";
     9  
    10  import "gogoproto/gogo.proto";
    11  
    12  import "client/admin/v1_11/pfs/pfs.proto";
    13  
    14  message SecretMount {
    15    // Name must be the name of the secret in kubernetes.
    16    string name = 1;
    17    // Key of the secret to load into env_var, this field only has meaning if EnvVar != "".
    18    string key = 4;
    19    string mount_path = 2;
    20    string env_var = 3;
    21  }
    22  
    23  message Transform {
    24    string image = 1;
    25    repeated string cmd = 2;
    26    repeated string err_cmd = 13;
    27    map<string, string> env = 3;
    28    repeated SecretMount secrets = 4;
    29    repeated string image_pull_secrets = 9;
    30    repeated string stdin = 5;
    31    repeated string err_stdin = 14;
    32    repeated int64 accept_return_code = 6;
    33    bool debug = 7;
    34    string user = 10;
    35    string working_dir = 11;
    36    string dockerfile = 12;
    37    BuildSpec build = 15;
    38  }
    39  
    40  message BuildSpec {
    41    string path = 1;
    42    string language = 2;
    43    string image = 3;
    44  }
    45  
    46  message TFJob {
    47    // tf_job  is a serialized Kubeflow TFJob spec. Pachyderm sends this directly
    48    // to a kubernetes cluster on which kubeflow has been installed, instead of
    49    // creating a pipeline ReplicationController as it normally would.
    50    string tf_job = 1 [(gogoproto.customname) = "TFJob"];
    51  }
    52  
    53  message Egress {
    54    string URL = 1;
    55  }
    56  
    57  message Job {
    58    string id = 1 [(gogoproto.customname) = "ID"];
    59  }
    60  
    61  enum JobState {
    62    JOB_STARTING = 0;
    63    JOB_RUNNING = 1;
    64    JOB_FAILURE = 2;
    65    JOB_SUCCESS = 3;
    66    JOB_KILLED = 4;
    67    JOB_MERGING = 5;
    68    JOB_EGRESSING = 6;
    69  }
    70  
    71  message Metadata {
    72    map<string, string> annotations = 1;
    73    map<string, string> labels = 2;
    74  }
    75  
    76  message Service {
    77    int32 internal_port = 1;
    78    int32 external_port = 2;
    79    string ip = 3 [(gogoproto.customname) = "IP"];
    80    string type = 4;
    81  }
    82  
    83  message Spout {
    84    bool overwrite = 1;
    85    Service service = 2;
    86    string marker = 3;
    87  }
    88  
    89  message PFSInput {
    90    string name = 1;
    91    string repo = 2;
    92    string branch = 3;
    93    string commit = 4;
    94    string glob = 5;
    95    string join_on = 8;
    96    bool lazy = 6;
    97    // EmptyFiles, if true, will cause files from this PFS input to be
    98    // presented as empty files. This is useful in shuffle pipelines where you
    99    // want to read the names of files and reorganize them using symlinks.
   100    bool empty_files = 7;
   101    // S3, if true, will cause the worker to NOT download or link files from this
   102    // input into the /pfs directory. Instead, an instance of our S3 gateway
   103    // service will run on each of the sidecars, and data can be retrieved from
   104    // this input by querying
   105    // http://<pipeline>-s3.<namespace>/<job id>.<input>/my/file
   106    bool s3 = 9;
   107  }
   108  
   109  message CronInput {
   110    string name = 1;
   111    string repo = 2;
   112    string commit = 3;
   113    string spec = 4;
   114    // Overwrite, if true, will expose a single datum that gets overwritten each
   115    // tick. If false, it will create a new datum for each tick.
   116    bool overwrite = 6;
   117    google.protobuf.Timestamp start = 5;
   118  }
   119  
   120  message GitInput {
   121    string name = 1;
   122    string url = 2 [(gogoproto.customname) = "URL"];
   123    string branch = 3;
   124    string commit = 4;
   125  }
   126  
   127  message Input {
   128    PFSInput pfs = 6;
   129    repeated Input join = 7;
   130    repeated Input cross = 2;
   131    repeated Input union = 3;
   132    CronInput cron = 4;
   133    GitInput git = 5;
   134  }
   135  
   136  message JobInput {
   137    string name = 4;
   138    pfs_1_11.Commit commit = 1;
   139    string glob = 2;
   140    bool lazy = 3;
   141  }
   142  
   143  message ParallelismSpec {
   144    reserved 1;
   145  
   146    // Starts the pipeline/job with a 'constant' workers, unless 'constant' is
   147    // zero. If 'constant' is zero (which is the zero value of ParallelismSpec),
   148    // then Pachyderm will choose the number of workers that is started,
   149    // (currently it chooses the number of workers in the cluster)
   150    uint64 constant = 2;
   151  
   152    // Starts the pipeline/job with number of workers equal to 'coefficient' * N,
   153    // where N is the number of nodes in the kubernetes cluster.
   154    //
   155    // For example, if each Kubernetes node has four CPUs, you might set
   156    // 'coefficient' to four, so that there are four Pachyderm workers per
   157    // Kubernetes node, and each Pachyderm worker gets one CPU. If you want to
   158    // reserve half the nodes in your cluster for other tasks, you might set
   159    // 'coefficient' to 0.5.
   160    double coefficient = 3;
   161  }
   162  
   163  // HashTreeSpec sets the number of shards into which pps splits a pipeline's
   164  // output commits (sharded commits are implemented in Pachyderm 1.8+ only)
   165  message HashtreeSpec {
   166    uint64 constant = 1;
   167  }
   168  
   169  message InputFile {
   170    // This file's absolute path within its pfs repo.
   171    string path = 4;
   172  
   173    // This file's hash
   174    bytes hash = 5;
   175  }
   176  
   177  message Datum {
   178    // ID is the hash computed from all the files
   179    string id = 1 [(gogoproto.customname) = "ID"];
   180    Job job = 2;
   181  }
   182  
   183  enum DatumState {
   184      FAILED = 0;
   185      SUCCESS = 1;
   186      SKIPPED = 2;
   187      STARTING = 3;
   188      RECOVERED = 4;
   189  }
   190  
   191  message DatumInfo {
   192    Datum datum = 1;
   193    DatumState state = 2;
   194    ProcessStats stats = 3;
   195    pfs_1_11.File pfs_state = 4;
   196    repeated pfs_1_11.FileInfo data = 5;
   197  }
   198  
   199  message Aggregate {
   200    int64 count = 1;
   201    double mean = 2;
   202    double stddev = 3;
   203    double fifth_percentile = 4;
   204    double ninety_fifth_percentile = 5;
   205  }
   206  
   207  message ProcessStats {
   208    google.protobuf.Duration download_time = 1;
   209    google.protobuf.Duration process_time = 2;
   210    google.protobuf.Duration upload_time = 3;
   211    uint64 download_bytes = 4;
   212    uint64 upload_bytes = 5;
   213  }
   214  
   215  message AggregateProcessStats {
   216    Aggregate download_time = 1;
   217    Aggregate process_time = 2;
   218    Aggregate upload_time = 3;
   219    Aggregate download_bytes = 4;
   220    Aggregate upload_bytes = 5;
   221  }
   222  
   223  message WorkerStatus {
   224    string worker_id = 1 [(gogoproto.customname) = "WorkerID"];
   225    string job_id = 2 [(gogoproto.customname) = "JobID"];
   226    repeated InputFile data = 3;
   227    // Started is the time processing on the current datum began.
   228    google.protobuf.Timestamp started = 4;
   229    ProcessStats stats = 5;
   230    int64 queue_size = 6;
   231  }
   232  
   233  // ResourceSpec describes the amount of resources that pipeline pods should
   234  // request from kubernetes, for scheduling.
   235  message ResourceSpec {
   236    reserved 3;
   237  
   238    // The number of CPUs each worker needs (partial values are allowed, and
   239    // encouraged)
   240    float cpu = 1;
   241  
   242    // The amount of memory each worker needs (in bytes, with allowed
   243    // SI suffixes (M, K, G, Mi, Ki, Gi, etc).
   244    string memory = 2;
   245  
   246    // The spec for GPU resources.
   247    GPUSpec gpu = 5;
   248  
   249    // The amount of ephemeral storage each worker needs (in bytes, with allowed
   250    // SI suffixes (M, K, G, Mi, Ki, Gi, etc).
   251    string disk = 4;
   252  }
   253  
   254  message GPUSpec {
   255    // The type of GPU (nvidia.com/gpu or amd.com/gpu for example).
   256    string type = 1;
   257    // The number of GPUs to request.
   258    int64 number = 2;
   259  }
   260  
   261  // EtcdJobInfo is the portion of the JobInfo that gets stored in etcd during
   262  // job execution. It contains fields which change over the lifetime of the job
   263  // but aren't used in the execution of the job.
   264  message EtcdJobInfo {
   265    Job job = 1;
   266    Pipeline pipeline = 2;
   267    pfs_1_11.Commit output_commit = 3;
   268    // Job restart count (e.g. due to datum failure)
   269    uint64 restart = 4;
   270  
   271    // Counts of how many times we processed or skipped a datum
   272    int64 data_processed = 5;
   273    int64 data_skipped = 6;
   274    int64 data_total = 7;
   275    int64 data_failed = 8;
   276    int64 data_recovered = 15;
   277  
   278    // Download/process/upload time and download/upload bytes
   279    ProcessStats stats = 9;
   280  
   281    pfs_1_11.Commit stats_commit = 10;
   282    JobState state = 11;
   283    string reason = 12;
   284    google.protobuf.Timestamp started = 13;
   285    google.protobuf.Timestamp finished = 14;
   286  }
   287  
   288  message JobInfo {
   289    reserved 4, 5, 28, 34;
   290    Job job = 1;
   291    Transform transform = 2;                     // requires ListJobRequest.Full
   292    Pipeline pipeline = 3;
   293    uint64 pipeline_version = 13;                // requires ListJobRequest.Full
   294    pfs_1_11.Commit spec_commit = 47;
   295    ParallelismSpec parallelism_spec = 12;       // requires ListJobRequest.Full
   296    Egress egress = 15;                          // requires ListJobRequest.Full
   297    Job parent_job = 6;
   298    google.protobuf.Timestamp started = 7;
   299    google.protobuf.Timestamp finished = 8;
   300    pfs_1_11.Commit output_commit = 9;
   301    JobState state = 10;
   302    string reason = 35;  // reason explains why the job is in the current state
   303    Service service = 14;                        // requires ListJobRequest.Full
   304    Spout spout = 45;                            // requires ListJobRequest.Full
   305    pfs_1_11.Repo output_repo = 18;
   306    string output_branch = 17;                   // requires ListJobRequest.Full
   307    uint64 restart = 20;
   308    int64 data_processed = 22;
   309    int64 data_skipped = 30;
   310    int64 data_failed = 40;
   311    int64 data_recovered = 46;
   312    int64 data_total = 23;
   313    ProcessStats stats = 31;
   314    repeated WorkerStatus worker_status = 24;
   315    ResourceSpec resource_requests = 25;         // requires ListJobRequest.Full
   316    ResourceSpec resource_limits = 36;           // requires ListJobRequest.Full
   317    ResourceSpec sidecar_resource_limits = 48;  // requires ListJobRequest.Full
   318    Input input = 26;                            // requires ListJobRequest.Full
   319    pfs_1_11.BranchInfo new_branch = 27;
   320    pfs_1_11.Commit stats_commit = 29;
   321    bool enable_stats = 32;                      // requires ListJobRequest.Full
   322    string salt = 33;                            // requires ListJobRequest.Full
   323    ChunkSpec chunk_spec = 37;                   // requires ListJobRequest.Full
   324    google.protobuf.Duration datum_timeout = 38; // requires ListJobRequest.Full
   325    google.protobuf.Duration job_timeout = 39;   // requires ListJobRequest.Full
   326    int64 datum_tries = 41;                      // requires ListJobRequest.Full
   327    SchedulingSpec scheduling_spec = 42;         // requires ListJobRequest.Full
   328    string pod_spec = 43;                        // requires ListJobRequest.Full
   329    string pod_patch = 44;                       // requires ListJobRequest.Full
   330  }
   331  
   332  enum WorkerState {
   333    POD_RUNNING = 0;
   334    POD_SUCCESS = 1;
   335    POD_FAILED = 2;
   336  }
   337  
   338  message Worker {
   339    string name = 1;
   340    WorkerState state = 2;
   341  }
   342  
   343  message JobInfos {
   344    repeated JobInfo job_info = 1;
   345  }
   346  
   347  message Pipeline {
   348    string name = 1;
   349  }
   350  
   351  enum PipelineState {
   352    // There is an EtcdPipelineInfo + spec commit, but no RC
   353    // This happens when a pipeline has been created but not yet picked up by a
   354    // PPS server.
   355    PIPELINE_STARTING = 0;
   356    // A pipeline has a spec commit and a service + RC
   357    // This is the normal state of a pipeline.
   358    PIPELINE_RUNNING = 1;
   359    // Equivalent to STARTING (there is an EtcdPipelineInfo + commit, but no RC)
   360    // After some error caused runPipeline to exit, but before the pipeline is
   361    // re-run. This is when the exponential backoff is in effect.
   362    PIPELINE_RESTARTING = 2;
   363    // The pipeline has encountered unrecoverable errors and is no longer being
   364    // retried. It won't leave this state until the pipeline is updated.
   365    PIPELINE_FAILURE = 3;
   366    // The pipeline has been explicitly paused by the user (the pipeline spec's
   367    // Stopped field should be true if the pipeline is in this state)
   368    PIPELINE_PAUSED = 4;
   369    // The pipeline is fully functional, but there are no commits to process.
   370    PIPELINE_STANDBY = 5;
   371    // The pipeline's workers are crashing, or failing to come up, this may
   372    // resolve itself, the pipeline may make progress while in this state if the
   373    // problem is only being experienced by some workers.
   374    PIPELINE_CRASHING = 6;
   375  }
   376  
   377  // EtcdPipelineInfo is proto that Pachd stores in etcd for each pipeline. It
   378  // tracks the state of the pipeline, and points to its metadata in PFS (and,
   379  // by pointing to a PFS commit, de facto tracks the pipeline's version)
   380  message EtcdPipelineInfo {
   381    PipelineState state = 1;
   382    string reason = 4;
   383    pfs_1_11.Commit spec_commit = 2;
   384    map<int32, int32> job_counts = 3;
   385    string auth_token = 5;
   386    JobState last_job_state = 6;
   387  
   388    // parallelism tracks the literal number of workers that this pipeline should
   389    // run. Unlike PipelineInfo.ParallelismSpec, this accounts for the number of
   390    // nodes in the k8s cluster if Coefficient parallelism is used (i.e. if
   391    // Coefficient is 2 and the cluster has 5 nodes, this will be set to 10 by
   392    // pachd). This allows the worker master to shard work correctly without
   393    // k8s privileges and without knowing the number of cluster nodes in the
   394    // Coefficient case.
   395    uint64 parallelism = 7;
   396  }
   397  
   398  message PipelineInfo {
   399    reserved 3, 4, 22, 26, 27, 18;
   400    string id = 17 [(gogoproto.customname) = "ID"];
   401    Pipeline pipeline = 1;
   402    uint64 version = 11;
   403    Transform transform = 2;
   404    // tf_job encodes a Kubeflow TFJob spec. Pachyderm uses this to create TFJobs
   405    // when running in a kubernetes cluster on which kubeflow has been installed.
   406    // Exactly one of 'tf_job' and 'transform' should be set
   407    TFJob tf_job = 46 [(gogoproto.customname) = "TFJob"];
   408    ParallelismSpec parallelism_spec = 10;
   409    HashtreeSpec hashtree_spec = 42;
   410    Egress egress = 15;
   411    google.protobuf.Timestamp created_at = 6;
   412  
   413    // state indicates the current state of the pipeline. This is not stored in
   414    // PFS along with the rest of this data structure--PPS.InspectPipeline fills
   415    // it in
   416    PipelineState state = 7;
   417    // same for stopped field
   418    bool stopped = 38;
   419    string recent_error = 8;
   420  
   421    int64 workers_requested = 49;
   422    int64 workers_available = 50;
   423  
   424    // job_counts and last_job_state indicates the number of jobs within this
   425    // pipeline in a given state and the state of the most recently created job,
   426    // respectively. This is not stored in PFS along with the rest of this data
   427    // structure--PPS.InspectPipeline fills it in from the EtcdPipelineInfo.
   428    map<int32, int32> job_counts = 9;
   429    JobState last_job_state = 43;
   430  
   431    string output_branch = 16;
   432    ResourceSpec resource_requests = 19;
   433    ResourceSpec resource_limits = 31;
   434    ResourceSpec sidecar_resource_limits = 51;
   435    Input input = 20;
   436    string description = 21;
   437    string cache_size = 23;
   438    bool enable_stats = 24;
   439    string salt = 25;
   440  
   441    // reason includes any error messages associated with a failed pipeline
   442    string reason = 28;
   443    int64 max_queue_size = 29;
   444    Service service = 30;
   445    Spout spout = 45;
   446    ChunkSpec chunk_spec = 32;
   447    google.protobuf.Duration datum_timeout = 33;
   448    google.protobuf.Duration job_timeout = 34;
   449    string githook_url = 35 [(gogoproto.customname) = "GithookURL"];
   450    pfs_1_11.Commit spec_commit = 36;
   451    bool standby = 37;
   452    int64 datum_tries = 39;
   453    SchedulingSpec scheduling_spec = 40;
   454    string pod_spec = 41;
   455    string pod_patch = 44;
   456    bool s3_out = 47;
   457    Metadata metadata = 48;
   458  }
   459  
   460  message PipelineInfos {
   461    repeated PipelineInfo pipeline_info = 1;
   462  }
   463  
   464  message CreateJobRequest {
   465    reserved 3, 4, 1, 10, 7, 9, 8, 12, 11, 13, 14, 21, 15, 16, 17, 18, 19, 20, 22, 23, 24;
   466    Pipeline pipeline = 2;
   467    pfs_1_11.Commit output_commit = 25;
   468  
   469    // Fields below should only be set when restoring an extracted job.
   470    uint64 restart = 26;
   471  
   472    // Counts of how many times we processed or skipped a datum
   473    int64 data_processed = 27;
   474    int64 data_skipped = 28;
   475    int64 data_total = 29;
   476    int64 data_failed = 30;
   477    int64 data_recovered = 31;
   478  
   479    // Download/process/upload time and download/upload bytes
   480    ProcessStats stats = 32;
   481  
   482    pfs_1_11.Commit stats_commit = 33;
   483    JobState state = 34;
   484    string reason = 35;
   485    google.protobuf.Timestamp started = 36;
   486    google.protobuf.Timestamp finished = 37;
   487  }
   488  
   489  message InspectJobRequest {
   490    // Callers should set either Job or OutputCommit, not both.
   491    Job job = 1;
   492    pfs_1_11.Commit output_commit = 3;
   493    bool block_state = 2; // block until state is either JOB_STATE_FAILURE or JOB_STATE_SUCCESS
   494    bool full = 4;
   495  }
   496  
   497  message ListJobRequest {
   498    Pipeline pipeline = 1;                // nil means all pipelines
   499    repeated pfs_1_11.Commit input_commit = 2; // nil means all inputs
   500    pfs_1_11.Commit output_commit = 3;         // nil means all outputs
   501  
   502    // History indicates return jobs from historical versions of pipelines
   503    // semantics are:
   504    // 0: Return jobs from the current version of the pipeline or pipelines.
   505    // 1: Return the above and jobs from the next most recent version
   506    // 2: etc.
   507    //-1: Return jobs from all historical versions.
   508    int64 history = 4;
   509  
   510    // Full indicates whether the result should include all pipeline details in
   511    // each JobInfo, or limited information including name and status, but
   512    // excluding information in the pipeline spec. Leaving this "false" can make
   513    // the call significantly faster in clusters with a large number of pipelines
   514    // and jobs.
   515    // Note that if 'input_commit' is set, this field is coerced to "true"
   516    bool full = 5;
   517  }
   518  
   519  message FlushJobRequest {
   520    repeated pfs_1_11.Commit commits = 1;
   521    repeated Pipeline to_pipelines = 2;
   522  }
   523  
   524  message DeleteJobRequest {
   525    Job job = 1;
   526  }
   527  
   528  message StopJobRequest {
   529    Job job = 1;
   530  }
   531  
   532  message UpdateJobStateRequest {
   533    Job job = 1;
   534    JobState state = 2;
   535    string reason = 3;
   536    uint64 restart = 4;
   537    int64 data_processed = 5;
   538    int64 data_skipped = 6;
   539    int64 data_failed = 7;
   540    int64 data_recovered = 8;
   541    int64 data_total = 9;
   542    ProcessStats stats = 10;
   543  }
   544  
   545  message GetLogsRequest {
   546    reserved 4;
   547    // The pipeline from which we want to get logs (required if the job in 'job'
   548    // was created as part of a pipeline. To get logs from a non-orphan job
   549    // without the pipeline that created it, you need to use ElasticSearch).
   550    Pipeline pipeline = 2;
   551  
   552    // The job from which we want to get logs.
   553    Job job = 1;
   554  
   555    // Names of input files from which we want processing logs. This may contain
   556    // multiple files, to query pipelines that contain multiple inputs. Each
   557    // filter may be an absolute path of a file within a pps repo, or it may be
   558    // a hash for that file (to search for files at specific versions)
   559    repeated string data_filters = 3;
   560  
   561    Datum datum = 6;
   562  
   563    // If true get logs from the master process
   564    bool master = 5;
   565  
   566    // Continue to follow new logs as they become available.
   567    bool follow = 7;
   568  
   569    // If nonzero, the number of lines from the end of the logs to return.  Note:
   570    // tail applies per container, so you will get tail * <number of pods> total
   571    // lines back.
   572    int64 tail = 8;
   573  
   574    // UseLokiBackend causes the logs request to go through the loki backend
   575    // rather than through kubernetes. This behavior can also be achieved by
   576    // setting the LOKI_LOGGING feature flag.
   577    bool use_loki_backend = 9;
   578  }
   579  
   580  // LogMessage is a log line from a PPS worker, annotated with metadata
   581  // indicating when and why the line was logged.
   582  message LogMessage {
   583    // The job and pipeline for which a PFS file is being processed (if the job
   584    // is an orphan job, pipeline name and ID will be unset)
   585    string pipeline_name = 1;
   586    string job_id = 3 [(gogoproto.customname) = "JobID"];
   587    string worker_id = 7 [(gogoproto.customname) = "WorkerID"];
   588    string datum_id = 9 [(gogoproto.customname) = "DatumID"];
   589    bool master = 10;
   590  
   591    // The PFS files being processed (one per pipeline/job input)
   592    repeated InputFile data = 4;
   593  
   594    // User is true if log message comes from the users code.
   595    bool user = 8;
   596  
   597    // The message logged, and the time at which it was logged
   598    google.protobuf.Timestamp ts = 5;
   599    string message = 6;
   600  }
   601  
   602  message RestartDatumRequest {
   603    Job job = 1;
   604    repeated string data_filters = 2;
   605  }
   606  
   607  message InspectDatumRequest {
   608    Datum datum = 1;
   609  }
   610  
   611  message ListDatumRequest {
   612    Job job = 1;
   613    int64 page_size = 2;
   614    int64 page = 3;
   615  }
   616  
   617  message ListDatumResponse {
   618    repeated DatumInfo datum_infos = 1;
   619    int64 total_pages = 2;
   620    int64 page = 3;
   621  }
   622  
   623  // ListDatumStreamResponse is identical to ListDatumResponse, except that only
   624  // one DatumInfo is present (as these responses are streamed)
   625  message ListDatumStreamResponse {
   626    DatumInfo datum_info = 1;
   627    // total_pages is only set in the first response (and set to 0 in all other
   628    // responses)
   629    int64 total_pages = 2;
   630    // page is only set in the first response (and set to 0 in all other
   631    // responses)
   632    int64 page = 3;
   633  }
   634  
   635  // ChunkSpec specifies how a pipeline should chunk its datums.
   636  message ChunkSpec {
   637    // number, if nonzero, specifies that each chunk should contain `number`
   638    // datums. Chunks may contain fewer if the total number of datums don't
   639    // divide evenly.
   640    int64 number = 1;
   641    // size_bytes, if nonzero, specifies a target size for each chunk of datums.
   642    // Chunks may be larger or smaller than size_bytes, but will usually be
   643    // pretty close to size_bytes in size.
   644    int64 size_bytes = 2;
   645  }
   646  
   647  message SchedulingSpec {
   648    map<string, string> node_selector = 1;
   649    string priority_class_name = 2;
   650  }
   651  
   652  message CreatePipelineRequest {
   653    reserved 3, 4, 11, 15, 19;
   654    Pipeline pipeline = 1;
   655    // tf_job encodes a Kubeflow TFJob spec. Pachyderm uses this to create TFJobs
   656    // when running in a kubernetes cluster on which kubeflow has been installed.
   657    // Exactly one of 'tf_job' and 'transform' should be set
   658    TFJob tf_job = 35 [(gogoproto.customname) = "TFJob"];
   659    Transform transform = 2;
   660    ParallelismSpec parallelism_spec = 7;
   661    HashtreeSpec hashtree_spec = 31;
   662    Egress egress = 9;
   663    bool update = 5;
   664    string output_branch = 10;
   665    // s3_out, if set, requires a pipeline's user to write to its output repo
   666    // via Pachyderm's s3 gateway (if set, workers will serve Pachyderm's s3
   667    // gateway API at http://<pipeline>-s3.<namespace>/<job id>.out/my/file).
   668    // In this mode /pfs/out won't be walked or uploaded, and the s3 gateway
   669    // service in the workers will allow writes to the job's output commit
   670    bool s3_out = 36;
   671    ResourceSpec resource_requests = 12;
   672    ResourceSpec resource_limits = 22;
   673    ResourceSpec sidecar_resource_limits = 47;
   674    Input input = 13;
   675    string description = 14;
   676    string cache_size = 16;
   677    bool enable_stats = 17;
   678    // Reprocess forces the pipeline to reprocess all datums.
   679    // It only has meaning if Update is true
   680    bool reprocess = 18;
   681    int64 max_queue_size = 20;
   682    Service service = 21;
   683    Spout spout = 33;
   684    ChunkSpec chunk_spec = 23;
   685    google.protobuf.Duration datum_timeout = 24;
   686    google.protobuf.Duration job_timeout = 25;
   687    string salt = 26;
   688    bool standby = 27;
   689    int64 datum_tries = 28;
   690    SchedulingSpec scheduling_spec = 29;
   691    string pod_spec = 30; // deprecated, use pod_patch below
   692    string pod_patch = 32; // a json patch will be applied to the pipeline's pod_spec before it's created;
   693    pfs_1_11.Commit spec_commit = 34;
   694    Metadata metadata = 46;
   695  }
   696  
   697  message InspectPipelineRequest {
   698    Pipeline pipeline = 1;
   699  }
   700  
   701  message ListPipelineRequest {
   702    // If non-nil, only return info about a single pipeline, this is redundant
   703    // with InspectPipeline unless history is non-zero.
   704    Pipeline pipeline = 1;
   705    // History indicates how many historical versions you want returned. Its
   706    // semantics are:
   707    // 0: Return the current version of the pipeline or pipelines.
   708    // 1: Return the above and the next most recent version
   709    // 2: etc.
   710    //-1: Return all historical versions.
   711    int64 history = 2;
   712  }
   713  
   714  message DeletePipelineRequest {
   715    reserved 2, 3;
   716    Pipeline pipeline = 1;
   717    bool all = 4;
   718    bool force = 5;
   719    bool keep_repo = 6;
   720  }
   721  
   722  message StartPipelineRequest {
   723    Pipeline pipeline = 1;
   724  }
   725  
   726  message StopPipelineRequest {
   727    Pipeline pipeline = 1;
   728  }
   729  
   730  message RunPipelineRequest {
   731    reserved 3;
   732    Pipeline pipeline = 1;
   733    repeated pfs_1_11.CommitProvenance provenance = 2;
   734    string job_id = 4 [(gogoproto.customname) = "JobID"];
   735  }
   736  
   737  message RunCronRequest {
   738    Pipeline pipeline = 1;
   739  }
   740  
   741  message CreateSecretRequest {
   742    bytes file = 1;
   743  }
   744  
   745  message DeleteSecretRequest {
   746    Secret secret  = 1;
   747  }
   748  
   749  message InspectSecretRequest {
   750    Secret secret = 1;
   751  }
   752  
   753  message Secret {
   754    string name = 1;
   755  }
   756  
   757  message SecretInfo {
   758    Secret secret = 1;
   759    string type = 2;
   760    google.protobuf.Timestamp creation_timestamp = 3;
   761  }
   762  
   763  message SecretInfos {
   764    repeated SecretInfo secret_info = 1;
   765  }
   766  
   767  message GarbageCollectRequest {
   768      // Memory is how much memory to use in computing which objects are alive. A
   769      // larger number will result in more precise garbage collection (at the
   770      // cost of more memory usage).
   771      int64 memory_bytes = 1;
   772  }
   773  message GarbageCollectResponse {}
   774  
   775  message ActivateAuthRequest {}
   776  message ActivateAuthResponse {}
   777  
   778  service API {
   779    rpc CreateJob(CreateJobRequest) returns (Job) {}
   780    rpc InspectJob(InspectJobRequest) returns (JobInfo) {}
   781    // ListJob returns information about current and past Pachyderm jobs. This is
   782    // deprecated in favor of ListJobStream
   783    rpc ListJob(ListJobRequest) returns (JobInfos) {}
   784    // ListJobStream returns information about current and past Pachyderm jobs.
   785    rpc ListJobStream(ListJobRequest) returns (stream JobInfo) {}
   786    rpc FlushJob(FlushJobRequest) returns (stream JobInfo) {}
   787    rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {}
   788    rpc StopJob(StopJobRequest) returns (google.protobuf.Empty) {}
   789    rpc InspectDatum(InspectDatumRequest) returns (DatumInfo) {}
   790    // ListDatum returns information about each datum fed to a Pachyderm job. This
   791    // is deprecated in favor of ListDatumStream
   792    rpc ListDatum(ListDatumRequest) returns (ListDatumResponse) {}
   793    // ListDatumStream returns information about each datum fed to a Pachyderm job
   794    rpc ListDatumStream(ListDatumRequest) returns (stream ListDatumStreamResponse) {}
   795    rpc RestartDatum(RestartDatumRequest) returns (google.protobuf.Empty) {}
   796  
   797    rpc CreatePipeline(CreatePipelineRequest) returns (google.protobuf.Empty) {}
   798    rpc InspectPipeline(InspectPipelineRequest) returns (PipelineInfo) {}
   799    rpc ListPipeline(ListPipelineRequest) returns (PipelineInfos) {}
   800    rpc DeletePipeline(DeletePipelineRequest) returns (google.protobuf.Empty) {}
   801    rpc StartPipeline(StartPipelineRequest) returns (google.protobuf.Empty) {}
   802    rpc StopPipeline(StopPipelineRequest) returns (google.protobuf.Empty) {}
   803    rpc RunPipeline(RunPipelineRequest) returns (google.protobuf.Empty) {}
   804    rpc RunCron(RunCronRequest) returns (google.protobuf.Empty) {}
   805  
   806    rpc CreateSecret(CreateSecretRequest) returns (google.protobuf.Empty) {}
   807    rpc DeleteSecret(DeleteSecretRequest) returns (google.protobuf.Empty) {}
   808    rpc ListSecret(google.protobuf.Empty) returns (SecretInfos) {}
   809    rpc InspectSecret(InspectSecretRequest) returns (SecretInfo) {}
   810  
   811    // DeleteAll deletes everything
   812    rpc DeleteAll(google.protobuf.Empty) returns (google.protobuf.Empty) {}
   813    rpc GetLogs(GetLogsRequest) returns (stream LogMessage) {}
   814  
   815    // Garbage collection
   816    rpc GarbageCollect(GarbageCollectRequest) returns (GarbageCollectResponse) {}
   817  
   818    // An internal call that causes PPS to put itself into an auth-enabled state
   819    // (all pipeline have tokens, correct permissions, etcd)
   820    rpc ActivateAuth(ActivateAuthRequest) returns (ActivateAuthResponse) {}
   821  
   822    // An internal call used to move a job from one state to another
   823    rpc UpdateJobState(UpdateJobStateRequest) returns(google.protobuf.Empty) {}
   824  }