Skip to content

Conversation

@stephanos
Copy link
Collaborator

@stephanos stephanos commented Oct 24, 2025

What was changed

(1) Added new flag --continue-on-error to 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 WorkflowExecutionAlreadyStarted handling 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

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@stephanos stephanos force-pushed the post-scenario branch 2 times, most recently from bb0f0b6 to 91d849d Compare October 24, 2025 00:41

if isResuming {
info.Logger.Info(fmt.Sprintf("Resuming scenario from state: %#v", currentState))
info.Configuration.StartFromIteration = int(currentState.CompletedIterations) + 1
Copy link
Collaborator Author

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()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved into ExecutorState.

Comment on lines -191 to -193
if err := loadgen.InitSearchAttribute(ctx, info, ThroughputStressScenarioIdSearchAttribute); err != nil {
return err
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved into WorkflowCompletionChecker

@stephanos stephanos force-pushed the post-scenario branch 2 times, most recently from 1bb6ad1 to 5aad566 Compare October 24, 2025 00:48
)

type KitchenSinkExecutor struct {
GenericExecutor
Copy link
Collaborator Author

@stephanos stephanos Oct 24, 2025

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.

@stephanos stephanos force-pushed the post-scenario branch 14 times, most recently from 1f59ddd to c3ace37 Compare October 28, 2025 00:59
@semgrep-managed-scans
Copy link

Semgrep found 1 missing-explicit-permissions finding:

No explicit GITHUB_TOKEN permissions found at the workflow or job level. Add a permissions: block at the workflow root (applies to all jobs) or per job with least privilege (e.g., contents: read and only specific writes like pull-requests: write if needed).

@stephanos stephanos force-pushed the post-scenario branch 7 times, most recently from bf3b6df to d3bc44d Compare October 28, 2025 05:32
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]>
Signed-off-by: Stephan Behnke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants