-
Notifications
You must be signed in to change notification settings - Fork 132
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
feat: running context model for test workflows #5633
Changes from all commits
29ba776
a0ed48a
7fd49ad
6911023
c3b438e
ee741fb
6e49ecb
d54ca82
2b7b2b6
66c39d5
8e467d0
48042d7
c5d9641
6b537c2
581d826
b1b25cc
235dfb7
e751657
e6f9a62
eb5d7d2
60e5ebd
88866c4
6e5d1e3
b68824d
b5052ef
f459b3b
d972b1a
3269f3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7154,10 +7154,80 @@ components: | |
- testsuite | ||
- testtrigger | ||
- scheduler | ||
- testworkflow | ||
context: | ||
type: string | ||
description: Context value depending from its type | ||
|
||
TestWorkflowRunningContext: | ||
description: running context for test workflow execution | ||
type: object | ||
required: | ||
- interface | ||
- actor | ||
properties: | ||
interface: | ||
$ref: "#/components/schemas/TestWorkflowRunningContextInterface" | ||
actor: | ||
$ref: "#/components/schemas/TestWorkflowRunningContextActor" | ||
|
||
TestWorkflowRunningContextInterface: | ||
description: running context interface for test workflow execution | ||
type: object | ||
required: | ||
- type | ||
properties: | ||
name: | ||
type: string | ||
description: interface name | ||
type: | ||
$ref: "#/components/schemas/TestWorkflowRunningContextInterfaceType" | ||
|
||
TestWorkflowRunningContextActor: | ||
description: running context actor for test workflow execution | ||
type: object | ||
required: | ||
- type | ||
properties: | ||
name: | ||
type: string | ||
description: actor name | ||
username: | ||
type: string | ||
description: actor username | ||
email: | ||
type: string | ||
description: actor email | ||
executionId: | ||
type: string | ||
description: test workflow execution id | ||
executionPath: | ||
type: string | ||
description: all test workflow execution ids starting from the root | ||
type: | ||
$ref: "#/components/schemas/TestWorkflowRunningContextActorType" | ||
|
||
TestWorkflowRunningContextInterfaceType: | ||
description: supported interfaces for test workflow running context | ||
type: string | ||
enum: | ||
- cli | ||
- ui | ||
- api | ||
- ci/cd | ||
- internal | ||
|
||
TestWorkflowRunningContextActorType: | ||
description: supported actors for test workflow running context | ||
type: string | ||
enum: | ||
- cron | ||
- testrigger | ||
- user | ||
- testworkflow | ||
- testworkflowexecution | ||
- program | ||
|
||
Webhook: | ||
description: CRD based webhook data | ||
type: object | ||
|
@@ -8015,6 +8085,14 @@ components: | |
default: false | ||
tags: | ||
$ref: "#/components/schemas/TestWorkflowTagValue" | ||
runningContext: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest designing a new replacement for the existing Running Context, as it's very limiting - having only type and context (= i.e. execution name/ID) string is limiting a lot, as we can't i.e. build the proper tree, or even build URLs (as when there is execution name, you cannot deduct workflow name from it). Additionally, take in account that we would like to have multiple context information for auditing likely, i.e. User who has scheduled it. Such solution shouldn't be designed after, but instead - otherwise we will hit either hard limitations, or lack of backwards compatibility, which will result in broken data. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, do we have a list of required fields? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not aware of any solid research conducted on this topic, but we rather don't have anything like that yet There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hey @jmorante-ks need some imput about what is required to store besides what we do now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm agree that it would be better do design this first from UX PoV. @fivenp @TheBrunoLopes any thoughts? Currently our "context" is more about OSS. I think for now we have only one customer requirements about this: We know at least that some customers are missing here:
|
||
description: running context for the test workflow execution (Pro edition only) | ||
$ref: "#/components/schemas/TestWorkflowRunningContext" | ||
parentExecutionIds: | ||
type: array | ||
description: parent execution ids | ||
items: | ||
type: string | ||
|
||
TestWorkflowWithExecution: | ||
type: object | ||
|
@@ -8108,6 +8186,9 @@ components: | |
- false | ||
tags: | ||
$ref: "#/components/schemas/TestWorkflowTagValue" | ||
runningContext: | ||
description: running context for the test workflow execution (Pro edition only) | ||
$ref: "#/components/schemas/TestWorkflowRunningContext" | ||
required: | ||
- id | ||
- name | ||
|
@@ -8142,6 +8223,9 @@ components: | |
$ref: "#/components/schemas/TestWorkflowSummary" | ||
tags: | ||
$ref: "#/components/schemas/TestWorkflowTagValue" | ||
runningContext: | ||
description: running context for the test workflow execution (Pro edition only) | ||
$ref: "#/components/schemas/TestWorkflowRunningContext" | ||
required: | ||
- id | ||
- name | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Testkube API | ||
* | ||
* Testkube provides a Kubernetes-native framework for test definition, execution and results | ||
* | ||
* API version: 1.0.0 | ||
* Contact: [email protected] | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
package testkube | ||
|
||
// running context for test workflow execution | ||
type TestWorkflowRunningContext struct { | ||
Interface_ *TestWorkflowRunningContextInterface `json:"interface"` | ||
Actor *TestWorkflowRunningContextActor `json:"actor"` | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Testkube API | ||
* | ||
* Testkube provides a Kubernetes-native framework for test definition, execution and results | ||
* | ||
* API version: 1.0.0 | ||
* Contact: [email protected] | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
package testkube | ||
|
||
// running context actor for test workflow execution | ||
type TestWorkflowRunningContextActor struct { | ||
// actor name | ||
Name string `json:"name,omitempty"` | ||
// actor username | ||
Username string `json:"username,omitempty"` | ||
// actor email | ||
Email string `json:"email,omitempty"` | ||
// test workflow execution id | ||
ExecutionId string `json:"executionId,omitempty"` | ||
// all test workflow execution ids starting from the root | ||
ExecutionPath string `json:"executionPath,omitempty"` | ||
Type_ *TestWorkflowRunningContextActorType `json:"type"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actor should rather have detailed information about actor.