Skip to content

Commit

Permalink
fix: pass running context
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
  • Loading branch information
vsukhin committed Feb 11, 2025
1 parent a6cd4f5 commit 8be0740
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/app/api/v1/testworkflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,21 @@ func (s *TestkubeAPI) ReRunTestWorkflowHandler() fiber.Handler {

errPrefix := "failed to rerun test workflow"

// Load the execution request
var rContext testkube.TestWorkflowRunningContext
err = c.BodyParser(&rContext)
if err != nil && !errors.Is(err, fiber.ErrUnprocessableEntity) {
return s.BadRequest(c, errPrefix, "invalid body", err)
}

execution, err := s.TestWorkflowResults.Get(ctx, executionID)
if err != nil {
return s.ClientError(c, "get execution", err)
}

// Load the execution request
request := testkube.TestWorkflowExecutionRequest{
RunningContext: &rContext,
Tags: execution.Tags,
DisableWebhooks: execution.DisableWebhooks,
}
Expand Down

0 comments on commit 8be0740

Please sign in to comment.