@@ -427,15 +427,20 @@ func (t Handler) fetchPluginTaskMetrics(pluginID, taskType string) (*taskMetrics
427
427
func GetDeckStatus (ctx context.Context , tCtx * taskExecutionContext ) (DeckStatus , error ) {
428
428
// GetDeckStatus determines whether a task generates a deck based on its execution context.
429
429
//
430
- // This function evaluates the `generates_deck` flag in the task template's metadata to determine the deck status:
431
- // 1. If `generates_deck` is set to true, it indicates that the task generates a deck, and DeckEnabled is returned.
432
- // 2. If `generates_deck` is set to false, it indicates that the task does not generate a deck, and DeckDisabled is returned.
433
- // 3. If `generates_deck` is nil (likely from older Flytekit versions), DeckUnknown is returned as a placeholder status.
430
+ // This function evaluates the current condition of the task to determine the deck status:
431
+ //
432
+ // | Condition Description | Has Deck |
433
+ // |--------------------------------|----------|
434
+ // | Enabled and Running | Yes |
435
+ // | Unknown State with Deck | Yes |
436
+ // | Unknown State without Deck | No |
437
+ // | Enabled and Succeeded | Yes |
438
+ // | Enabled but Memory Exceeded | No |
439
+ // | Disabled | No |
434
440
//
435
441
// The lifecycle of deck generation is as follows:
436
- // - During task execution, the `generates_deck` flag is checked to determine if a deck should be generated.
437
- // - In terminal states, if the status is DeckUnknown, a HEAD request can be made to verify the existence of the deck file.
438
-
442
+ // - During task execution, the condition is checked to determine if a deck should be generated.
443
+ // - In terminal states, if the status is DeckUnknown or DeckEnabled, a HEAD request can be made to verify the existence of the deck file.
439
444
template , err := tCtx .tr .Read (ctx )
440
445
if err != nil {
441
446
return DeckUnknown , regErrors .Wrapf (err , "failed to read task template" )
0 commit comments