Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job priority #1466

Merged
merged 35 commits into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
332 changes: 331 additions & 1 deletion core/api-server/api/rest-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "HKube API",
"description": "HKube RESTful API",
"version": "2.2.5",
"version": "2.2.6",
"contact": {
"email": "[email protected]"
},
Expand Down Expand Up @@ -12385,6 +12385,257 @@
}
}
},
"/driver-queue/preferred": {
"get": {
"tags": [
"Preferred"
],
"summary": "Get preferred",
"description": "Get preferred",
"responses": {
"200": {
"description": "Get preferred",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"hits": {
"type": "array",
"description": "the actual result records",
"items": {}
},
"cursor": {
"type": "string",
"description": "this cursor to the next query can be used for pagination"
},
"timeTook": {
"type": "string",
"description": "the query completion time took in milliseconds"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
},
"post": {
"tags": [
"Preferred"
],
"summary": "Add to preferred",
"description": "Add to preferred",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"addedJobs": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
}
},
"position": {
"type": "string",
"enum": [
"first",
"last",
"before",
"after"
]
},
"query": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Unique identifier representing a specific tag",
"minLength": 1,
"maxLength": 32
},
"jobId": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
},
"pipeline": {
"type": "string",
"description": "Unique identifier representing a specific pipeline",
"minLength": 1,
"format": "pipeline-name"
}
}
}
},
"required": [
"ids",
"position"
]
},
"removedJobs": {
"type": "array",
"items": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
}
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "start board response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"addedJobs": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
}
},
"position": {
"type": "string",
"enum": [
"first",
"last",
"before",
"after"
]
},
"query": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Unique identifier representing a specific tag",
"minLength": 1,
"maxLength": 32
},
"jobId": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
},
"pipeline": {
"type": "string",
"description": "Unique identifier representing a specific pipeline",
"minLength": 1,
"format": "pipeline-name"
}
}
}
},
"required": [
"ids",
"position"
]
},
"removedJobs": {
"type": "array",
"items": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
}
}
}
}
}
}
},
"400": {
"description": "bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/builds/status/{buildId}": {
"get": {
"tags": [
Expand Down Expand Up @@ -17896,6 +18147,85 @@
}
}
},
"updatePreferredRequest": {
"type": "object",
"properties": {
"addedJobs": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
}
},
"position": {
"type": "string",
"enum": [
"first",
"last",
"before",
"after"
]
},
"query": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Unique identifier representing a specific tag",
"minLength": 1,
"maxLength": 32
},
"jobId": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
},
"pipeline": {
"type": "string",
"description": "Unique identifier representing a specific pipeline",
"minLength": 1,
"format": "pipeline-name"
}
}
}
},
"required": [
"ids",
"position"
]
},
"removedJobs": {
"type": "array",
"items": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
}
}
}
},
"preferredQuery": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Unique identifier representing a specific tag",
"minLength": 1,
"maxLength": 32
},
"jobId": {
"type": "string",
"description": "Unique identifier representing pipeline execution"
},
"pipeline": {
"type": "string",
"description": "Unique identifier representing a specific pipeline",
"minLength": 1,
"format": "pipeline-name"
}
}
},
"buildId": {
"type": "object",
"properties": {
Expand Down
13 changes: 9 additions & 4 deletions core/api-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@hkube/config": "^2.0.11",
"@hkube/consts": "^1.0.39",
"@hkube/dag": "^2.1.25",
"@hkube/db": "^1.0.44",
"@hkube/db": "^1.0.47",
"@hkube/etcd": "^5.1.6",
"@hkube/logger": "^2.0.2",
"@hkube/metrics": "^1.0.42",
Expand Down
Loading