Skip to content

Commit

Permalink
Merge pull request #2925 from docker/feature-jobs
Browse files Browse the repository at this point in the history
[Jobs] Merge Jobs Support into Master
  • Loading branch information
dperny committed Jan 13, 2020
2 parents 24fb4cf + eae24f8 commit ef128ab
Show file tree
Hide file tree
Showing 253 changed files with 201,534 additions and 910 deletions.
83 changes: 83 additions & 0 deletions api/api.pb.txt
Expand Up @@ -4305,6 +4305,28 @@ file {
}
}
}
message_type {
name: "JobStatus"
field {
name: "job_iteration"
number: 1
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.Version"
options {
65001: 0
}
json_name: "jobIteration"
}
field {
name: "last_execution"
number: 2
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".google.protobuf.Timestamp"
json_name: "lastExecution"
}
}
enum_type {
name: "ResourceType"
value {
Expand Down Expand Up @@ -4613,6 +4635,24 @@ file {
oneof_index: 0
json_name: "global"
}
field {
name: "replicated_job"
number: 10
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.ReplicatedJob"
oneof_index: 0
json_name: "replicatedJob"
}
field {
name: "global_job"
number: 11
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.GlobalJob"
oneof_index: 0
json_name: "globalJob"
}
field {
name: "update"
number: 6
Expand Down Expand Up @@ -4665,6 +4705,26 @@ file {
message_type {
name: "GlobalService"
}
message_type {
name: "ReplicatedJob"
field {
name: "max_concurrent"
number: 1
label: LABEL_OPTIONAL
type: TYPE_UINT64
json_name: "maxConcurrent"
}
field {
name: "total_completions"
number: 2
label: LABEL_OPTIONAL
type: TYPE_UINT64
json_name: "totalCompletions"
}
}
message_type {
name: "GlobalJob"
}
message_type {
name: "TaskSpec"
field {
Expand Down Expand Up @@ -5948,6 +6008,14 @@ file {
type_name: ".docker.swarmkit.v1.UpdateStatus"
json_name: "updateStatus"
}
field {
name: "job_status"
number: 12
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.JobStatus"
json_name: "jobStatus"
}
field {
name: "pending_delete"
number: 7
Expand Down Expand Up @@ -6148,6 +6216,14 @@ file {
type_name: ".docker.swarmkit.v1.GenericResource"
json_name: "assignedGenericResources"
}
field {
name: "job_iteration"
number: 16
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.Version"
json_name: "jobIteration"
}
options {
70001 {
1 {
Expand Down Expand Up @@ -7242,6 +7318,13 @@ file {
type: TYPE_UINT64
json_name: "runningTasks"
}
field {
name: "completed_tasks"
number: 4
label: LABEL_OPTIONAL
type: TYPE_UINT64
json_name: "completedTasks"
}
}
}
message_type {
Expand Down
383 changes: 209 additions & 174 deletions api/control.pb.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions api/control.proto
Expand Up @@ -433,6 +433,13 @@ message ListServiceStatusesResponse {
// request time. This may be larger than desired tasks if, for example, a
// service has been scaled down.
uint64 running_tasks = 3;

// CompletedTasks is the number of tasks in state Completed, if this
// service is in mode ReplicatedJob or GlobalJob. This must be
// cross-referenced with the service type, because the default value of 0
// may mean that a service is not in a Job mode, or it may mean the Job has
// yet to complete any Tasks.
uint64 completed_tasks = 4;
}

repeated ServiceStatus statuses = 1;
Expand Down
439 changes: 280 additions & 159 deletions api/objects.pb.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions api/objects.proto
Expand Up @@ -127,6 +127,10 @@ message Service {
// progress.
UpdateStatus update_status = 5;

// JobStatus contains the status of a Service that is in one of the Job
// modes. It is absent on Replicated and Global services.
JobStatus job_status = 12;

// PendingDelete indicates that this service's deletion has been requested.
// Services, as well as all service-level resources, can only be deleted
// after all of the service's containers have properly shut down.
Expand Down Expand Up @@ -261,6 +265,10 @@ message Task {
Driver log_driver = 13;

repeated GenericResource assigned_generic_resources = 15;

// JobIteration is the iteration number of the Job-mode Service that this
// task belongs to.
Version job_iteration = 16;
}

// NetworkAttachment specifies the network parameters of attachment to
Expand Down

0 comments on commit ef128ab

Please sign in to comment.