Allowed workflow reruns from a specific node
This commit is contained in:
@@ -647,7 +647,15 @@ func getDockerImage(resp http.ResponseWriter, request *http.Request) {
|
||||
alternativeName = strings.Join(alternativeNameSplit[1:3], "/")
|
||||
}
|
||||
|
||||
log.Printf("[INFO] Trying to download image: %s. Alt: %s", version.Name, alternativeName)
|
||||
if len(version.Name) == 0 {
|
||||
log.Printf("[ERROR] No image name provided for download: %s", version.Name)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "message": "No image name"}`)))
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
log.Printf("[INFO] Trying to download image: '%s'. Alt name: %#v", version.Name, alternativeName)
|
||||
|
||||
for _, image := range images {
|
||||
for _, tag := range image.RepoTags {
|
||||
|
||||
@@ -3041,9 +3041,16 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
log.Printf("[INFO] Starting validation of execution %s", workflowExecution.ExecutionId)
|
||||
|
||||
if shouldRerun {
|
||||
log.Printf("[DEBUG] Returning single action execution ID for rerun: %s", workflowExecution.ExecutionId)
|
||||
resp.WriteHeader(200)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": true, "execution_id": "%s", "authorization": "%s"}`, workflowExecution.ExecutionId, workflowExecution.Authorization)))
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[INFO] Starting validation of execution %s", workflowExecution.ExecutionId)
|
||||
time.Sleep(2 * time.Second)
|
||||
returnBody := shuffle.HandleRetValidation(ctx, workflowExecution, 1)
|
||||
returnBytes, err := json.Marshal(returnBody)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user