Enhance linter and errors (#1572)

Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
Anbraten
2023-11-03 11:44:03 +01:00
committed by GitHub
parent 4c4fdff5f7
commit 5ff006614f
55 changed files with 912 additions and 342 deletions

View File

@@ -3951,8 +3951,11 @@ const docTemplate = `{
"enqueued_at": {
"type": "integer"
},
"error": {
"type": "string"
"errors": {
"type": "array",
"items": {
"$ref": "#/definitions/errors.PipelineError"
}
},
"event": {
"$ref": "#/definitions/WebhookEvent"
@@ -4248,6 +4251,17 @@ const docTemplate = `{
"blocked",
"declined"
],
"x-enum-comments": {
"StatusBlocked": "waiting for approval",
"StatusDeclined": "blocked and declined",
"StatusError": "error with the config / while parsing / some other system problem",
"StatusFailure": "failed to finish (exit code != 0)",
"StatusKilled": "killed by user",
"StatusPending": "pending to be executed",
"StatusRunning": "currently running",
"StatusSkipped": "skipped as another step failed",
"StatusSuccess": "successfully finished"
},
"x-enum-varnames": [
"StatusSkipped",
"StatusPending",
@@ -4407,6 +4421,42 @@ const docTemplate = `{
"EventManual"
]
},
"errors.PipelineError": {
"type": "object",
"properties": {
"data": {},
"is_warning": {
"type": "boolean"
},
"message": {
"type": "string"
},
"type": {
"$ref": "#/definitions/errors.PipelineErrorType"
}
}
},
"errors.PipelineErrorType": {
"type": "string",
"enum": [
"linter",
"deprecation",
"compiler",
"generic"
],
"x-enum-comments": {
"PipelineErrorTypeCompiler": "some error with the config semantics",
"PipelineErrorTypeDeprecation": "using some deprecated feature",
"PipelineErrorTypeGeneric": "some generic error",
"PipelineErrorTypeLinter": "some error with the config syntax"
},
"x-enum-varnames": [
"PipelineErrorTypeLinter",
"PipelineErrorTypeDeprecation",
"PipelineErrorTypeCompiler",
"PipelineErrorTypeGeneric"
]
},
"model.Workflow": {
"type": "object",
"properties": {