Skip to content

Commit

Permalink
Revert "fix(controller): Failure tolerant workflow archiving and offl…
Browse files Browse the repository at this point in the history
…oading. Fixes argoproj#3786 and argoproj#3837 (argoproj#3787)"

This reverts commit ee84892.

Signed-off-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexec committed Nov 10, 2020
1 parent 19df510 commit a37b532
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
8 changes: 6 additions & 2 deletions test/e2e/argo_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,9 @@ spec:
templates:
- name: run-archie
container:
image: argoproj/argosay:v2`).
image: argoproj/argosay:v2
command: [cowsay, ":) Hello Argo!"]
imagePullPolicy: IfNotPresent`).
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToBeArchived).
Expand All @@ -1221,7 +1223,9 @@ spec:
templates:
- name: run-betty
container:
image: argoproj/argosay:v2`).
image: argoproj/argosay:v2
command: [cowsay, ":) Hello Argo!"]
imagePullPolicy: IfNotPresent`).
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToBeArchived, "to be archived")
Expand Down
2 changes: 1 addition & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@ func (woc *wfOperationCtx) markWorkflowPhase(phase wfv1.NodePhase, message strin
woc.log.Infof("Marking workflow as pending archiving")
woc.wf.Labels[common.LabelKeyWorkflowArchivingStatus] = "Pending"
} else {
woc.log.Infof("Doesn't match with archive label selector. Skipping Archive")
woc.log.Infof("Does't match with archive label selector. Skipping Archive")
}
}
woc.updated = true
Expand Down
14 changes: 2 additions & 12 deletions workflow/hydrator/hydrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"os"

log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/util/retry"

"github.com/argoproj/argo/persist/sqldb"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
Expand Down Expand Up @@ -53,11 +51,7 @@ func (h hydrator) Hydrate(wf *wfv1.Workflow) error {
return err
}
if wf.Status.IsOffloadNodeStatus() {
var offloadedNodes wfv1.Nodes
err := wait.ExponentialBackoff(retry.DefaultBackoff, func() (bool, error) {
offloadedNodes, err = h.offloadNodeStatusRepo.Get(string(wf.UID), wf.GetOffloadNodeStatusVersion())
return err == nil, err
})
offloadedNodes, err := h.offloadNodeStatusRepo.Get(string(wf.UID), wf.GetOffloadNodeStatusVersion())
if err != nil {
return err
}
Expand All @@ -79,11 +73,7 @@ func (h hydrator) Dehydrate(wf *wfv1.Workflow) error {
}
}
if packer.IsTooLargeError(err) || alwaysOffloadNodeStatus {
var offloadVersion string
err := wait.ExponentialBackoff(retry.DefaultBackoff, func() (bool, error) {
offloadVersion, err = h.offloadNodeStatusRepo.Save(string(wf.UID), wf.Namespace, wf.Status.Nodes)
return err == nil, err
})
offloadVersion, err := h.offloadNodeStatusRepo.Save(string(wf.UID), wf.Namespace, wf.Status.Nodes)
if err != nil {
return err
}
Expand Down

0 comments on commit a37b532

Please sign in to comment.