-
Notifications
You must be signed in to change notification settings - Fork 16
Overhaul workflow verification #236
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
base: main
Are you sure you want to change the base?
Conversation
bb0f0b6 to
91d849d
Compare
|
|
||
| if isResuming { | ||
| info.Logger.Info(fmt.Sprintf("Resuming scenario from state: %#v", currentState)) | ||
| info.Configuration.StartFromIteration = int(currentState.CompletedIterations) + 1 |
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.
This was technically a good idea, but easily causes one-off issues. For example, when the all iterations were created but the run crashes and resumes, it would error since the start iteration cannot be larger than the target number of iterations. And now with the WorkflowExecutionAlreadyStarted handling, this is safe.
| t.runID = info.RunID | ||
|
|
||
| // Track start time of current run | ||
| currentRunStartTime := time.Now() |
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.
Moved into ExecutorState.
| if err := loadgen.InitSearchAttribute(ctx, info, ThroughputStressScenarioIdSearchAttribute); err != nil { | ||
| return err | ||
| } |
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.
Moved into WorkflowCompletionChecker
1bb6ad1 to
5aad566
Compare
| ) | ||
|
|
||
| type KitchenSinkExecutor struct { | ||
| GenericExecutor |
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.
So it inherits the Resumable and Verifyable behavior.
1f59ddd to
c3ace37
Compare
|
Semgrep found 1 No explicit |
bf3b6df to
d3bc44d
Compare
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
724b3ed to
cef31f3
Compare
Signed-off-by: Stephan Behnke <[email protected]>
Signed-off-by: Stephan Behnke <[email protected]>
What was changed
(1) Added new flag
--continue-on-errorto run scenario.(2) Extracted workflow completion check into reusable component.
(3) Moved state for completion check into executor.
(4) Consolidated Search Attribute for completion checking.
(5) Added
WorkflowExecutionAlreadyStartedhandling for completion checking.(6) Consolidated post-scenario verification.
Why?
(1) It is very useful to move past any non-transient errors during a scenario run and keep going; reporting the errors at the end. This helps with runs where a single workflow fails to complete and would block further execution.
(2-6) Checking workflow completion is a crucial verification step; this change make it easier to re-use across scenarios.
Checklist
Closes
How was this tested: