File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 88import  {  getMaxDuration  }  from  "@trigger.dev/core/v3/isomorphic" ; 
99import  {  RUNNING_STATUSES  }  from  "~/components/runs/v3/TaskRunStatus" ; 
1010import  {  logger  }  from  "~/services/logger.server" ; 
11- import  {  eventRepository  }  from  "~/v3/eventRepository.server" ; 
11+ import  {  eventRepository ,   rehydrateAttribute  }  from  "~/v3/eventRepository.server" ; 
1212import  {  machinePresetFromName  }  from  "~/v3/machinePresets.server" ; 
1313import  {  getTaskEventStoreTableForRun ,  type  TaskEventStoreTable  }  from  "~/v3/taskEventStore.server" ; 
1414import  {  isFailedRunStatus ,  isFinalRunStatus  }  from  "~/v3/taskStatus" ; 
@@ -489,12 +489,17 @@ export class SpanPresenter extends BasePresenter {
489489        } ; 
490490      } 
491491      case  "attempt" : { 
492+         const  isWarmStart  =  rehydrateAttribute < boolean > ( 
493+           span . metadata , 
494+           SemanticInternalAttributes . WARM_START 
495+         ) ; 
496+ 
492497        return  { 
493498          ...data , 
494499          entity : { 
495500            type : "attempt"  as  const , 
496501            object : { 
497-               isWarmStart :  isWarmStart ( span . properties ) , 
502+               isWarmStart, 
498503            } , 
499504          } , 
500505        } ; 
Original file line number Diff line number Diff line change @@ -1638,7 +1638,7 @@ function rehydrateShow(properties: Prisma.JsonValue): { actions?: boolean } | un
16381638  return ; 
16391639} 
16401640
1641- function  rehydrateAttribute < T  extends  AttributeValue > ( 
1641+ export   function  rehydrateAttribute < T  extends  AttributeValue > ( 
16421642  properties : Prisma . JsonValue , 
16431643  key : string 
16441644) : T  |  undefined  { 
@@ -1656,7 +1656,9 @@ function rehydrateAttribute<T extends AttributeValue>(
16561656
16571657  const  value  =  properties [ key ] ; 
16581658
1659-   if  ( ! value )  return ; 
1659+   if  ( value  ===  undefined )  { 
1660+     return ; 
1661+   } 
16601662
16611663  return  value  as  T ; 
16621664} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments