Skip to content

Commit

Permalink
fix: Backward compatible workflowTemplateRef from 2.11.x to 2.12.x (#…
Browse files Browse the repository at this point in the history
…5314)

Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>
  • Loading branch information
sarabala1979 committed Mar 5, 2021
1 parent 103bf2b commit 112378f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3187,7 +3187,10 @@ func (woc *wfOperationCtx) setStoredWfSpec() error {
if wfDefault == nil {
wfDefault = &wfv1.Workflow{}
}
if woc.wf.Status.StoredWorkflowSpec == nil {
// woc.wf.Status.StoredWorkflowSpec.Entrypoint == "" check is mainly to support backward compatible with 2.11.x workflow to 2.12.x
// Need to recalculate StoredWorkflowSpec in 2.12.x format.
// This check can be removed once all user migrated from 2.11.x to 2.12.x
if woc.wf.Status.StoredWorkflowSpec == nil || woc.wf.Status.StoredWorkflowSpec.Entrypoint == "" {
wftHolder, err := woc.fetchWorkflowSpec()
if err != nil {
return err
Expand Down

0 comments on commit 112378f

Please sign in to comment.