Skip to content

Commit

Permalink
Persist flyte deck during workflow recovery (flyteorg#495)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>

Signed-off-by: Kevin Su <[email protected]>
Co-authored-by: Dan Rammer <[email protected]>
  • Loading branch information
pingsutw and hamersaw authored Nov 1, 2022
1 parent 4db2319 commit fbe6f23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flytepropeller/pkg/controller/nodes/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (c *nodeExecutor) attemptRecovery(ctx context.Context, nCtx handler.NodeExe
OutputURI: outputFile,
}

deckFile := v1alpha1.GetDeckFile(nCtx.NodeStatus().GetOutputDir())
deckFile := storage.DataReference(recovered.Closure.GetDeckUri())
metadata, err := nCtx.DataStore().Head(ctx, deckFile)
if err != nil {
logger.Errorf(ctx, "Failed to check the existence of deck file. Error: %v", err)
Expand Down
5 changes: 5 additions & 0 deletions flytepropeller/pkg/controller/nodes/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,7 @@ func TestRecover(t *testing.T) {
OutputResult: &admin.NodeExecutionClosure_OutputUri{
OutputUri: "outputuri.pb",
},
DeckUri: deckPath,
},
}, nil)

Expand Down Expand Up @@ -2154,6 +2155,7 @@ func TestRecover(t *testing.T) {
CacheStatus: core.CatalogCacheStatus_CACHE_HIT,
},
},
DeckUri: deckPath,
},
}, nil)

Expand Down Expand Up @@ -2237,6 +2239,7 @@ func TestRecover(t *testing.T) {
},
},
},
DeckUri: deckPath,
},
}, nil)

Expand Down Expand Up @@ -2319,6 +2322,7 @@ func TestRecover(t *testing.T) {
OutputResult: &admin.NodeExecutionClosure_OutputUri{
OutputUri: "outputuri.pb",
},
DeckUri: deckPath,
},
}, nil)

Expand Down Expand Up @@ -2364,6 +2368,7 @@ func TestRecover(t *testing.T) {
OutputResult: &admin.NodeExecutionClosure_OutputUri{
OutputUri: "outputuri.pb",
},
DeckUri: deckPath,
},
}, nil)

Expand Down

0 comments on commit fbe6f23

Please sign in to comment.