Ensured orborus is now in line with latest docker API's and golang apis
This commit is contained in:
@@ -4,13 +4,13 @@ go 1.23.0
|
||||
|
||||
toolchain go1.23.1
|
||||
|
||||
replace github.com/shuffle/shuffle-shared => ../../../../shuffle-shared
|
||||
//replace github.com/shuffle/shuffle-shared => ../../../../shuffle-shared
|
||||
|
||||
require (
|
||||
github.com/docker/docker v28.0.4+incompatible
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.8.37
|
||||
github.com/shuffle/shuffle-shared v0.8.38
|
||||
k8s.io/api v0.32.3
|
||||
k8s.io/apimachinery v0.32.3
|
||||
k8s.io/client-go v0.32.3
|
||||
|
||||
@@ -298,6 +298,8 @@ github.com/sendgrid/sendgrid-go v3.14.0+incompatible h1:KDSasSTktAqMJCYClHVE94Fc
|
||||
github.com/sendgrid/sendgrid-go v3.14.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||
github.com/shuffle/shuffle-shared v0.8.38 h1:/V3jqOXT1IEn4XIvZP+Pa+rDvQfN7HY/wF68Ct1P74s=
|
||||
github.com/shuffle/shuffle-shared v0.8.38/go.mod h1:KFMepkCunjhYmzbyEW6CRP85yH/li8ogNGpc1qjRbm4=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
|
||||
@@ -157,7 +157,7 @@ func setWorkflowExecution(ctx context.Context, workflowExecution shuffle.Workflo
|
||||
log.Printf("[ERROR] Failed marshalling shutdowndata during set: %s", err)
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG][%s] Sending result (set)", workflowExecution.ExecutionId)
|
||||
log.Printf("[DEBUG][%s] Sending result (set). Status: %s, Actions: %d, Results: %d", workflowExecution.ExecutionId, workflowExecution.Status, len(workflowExecution.Workflow.Actions), len(workflowExecution.Results))
|
||||
sendResult(workflowExecution, shutdownData)
|
||||
return nil
|
||||
}
|
||||
@@ -1831,6 +1831,8 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
|
||||
}
|
||||
|
||||
func executionInit(workflowExecution shuffle.WorkflowExecution) error {
|
||||
ctx := context.Background()
|
||||
|
||||
parents := map[string][]string{}
|
||||
children := map[string][]string{}
|
||||
nextActions := []string{}
|
||||
@@ -1851,6 +1853,20 @@ func executionInit(workflowExecution shuffle.WorkflowExecution) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Validates RERUN of single actions
|
||||
// Identified by:
|
||||
// 1. Predefined result from previous exec
|
||||
// 2. Only ONE action
|
||||
// 3. Every predefined result having result.Action.Category == "rerun"
|
||||
/*
|
||||
if len(workflowExecution.Workflow.Actions) == 1 && len(workflowExecution.Results) > 0 {
|
||||
finished := shuffle.ValidateFinished(ctx, extra, workflowExecution)
|
||||
if finished {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
nextActions = append(nextActions, startAction)
|
||||
for _, branch := range workflowExecution.Workflow.Branches {
|
||||
// Check what the parent is first. If it's trigger - skip
|
||||
@@ -1938,7 +1954,6 @@ func executionInit(workflowExecution shuffle.WorkflowExecution) error {
|
||||
//log.Printf("Successfully downloaded and built %s", image)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
visited := []string{}
|
||||
executed := []string{}
|
||||
@@ -2628,7 +2643,7 @@ func sendSelfRequest(actionResult shuffle.ActionResult) {
|
||||
if err != nil {
|
||||
log.Printf("[ERROR][%s] Failed reading body: %s", actionResult.ExecutionId, err)
|
||||
} else {
|
||||
log.Printf("[DEBUG][%s] NEWRESP (from backend): %s", actionResult.ExecutionId, string(body))
|
||||
log.Printf("[DEBUG][%s] NEWRESP (from backend - 2): %s", actionResult.ExecutionId, string(body))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3822,10 +3837,10 @@ func checkStandaloneRun() {
|
||||
|
||||
log.Printf("[DEBUG][%s] Got %d results with status %s. Running full reset IF status is not executing.", workflowExecution.ExecutionId, len(workflowExecution.Results), workflowExecution.Status)
|
||||
|
||||
// Just continue as per usual
|
||||
if workflowExecution.Status == "EXECUTING" {
|
||||
return
|
||||
}
|
||||
// Just continue as per usual?
|
||||
//if workflowExecution.Status == "EXECUTING" {
|
||||
// return
|
||||
//}
|
||||
|
||||
workflowExecution.Status = "EXECUTING"
|
||||
|
||||
@@ -3847,6 +3862,7 @@ func checkStandaloneRun() {
|
||||
|
||||
workflowExecution.Results = newResults
|
||||
workflowExecution.Status = "EXECUTING"
|
||||
workflowExecution.CompletedAt = 0
|
||||
|
||||
marshalledResult, err := json.Marshal(workflowExecution)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user