@@ -1793,9 +1793,11 @@ func createPVC(
1793
1793
return "", createdExecution, pb.Execution_FAILED, fmt.Errorf("failed to get id from createdExecution")
1794
1794
}
1795
1795
*/
1796
- err = createCache (ctx , createdExecution , opts , taskStartedTime , fingerPrint , cacheClient )
1797
- if err != nil {
1798
- return "" , createdExecution , pb .Execution_FAILED , fmt .Errorf ("failed to create cache entrty for create pvc: %w" , err )
1796
+ if opts .Task .GetCachingOptions ().GetEnableCache () && ecfg .CachedMLMDExecutionID != "" {
1797
+ err = createCache (ctx , createdExecution , opts , taskStartedTime , fingerPrint , cacheClient )
1798
+ if err != nil {
1799
+ return "" , createdExecution , pb .Execution_FAILED , fmt .Errorf ("failed to create cache entry for create pvc: %w" , err )
1800
+ }
1799
1801
}
1800
1802
1801
1803
return createdPVC .ObjectMeta .Name , createdExecution , pb .Execution_COMPLETE , nil
@@ -1902,9 +1904,11 @@ func deletePVC(
1902
1904
return createdExecution, pb.Execution_FAILED, fmt.Errorf("failed to get id from createdExecution")
1903
1905
}
1904
1906
*/
1905
- err = createCache (ctx , createdExecution , opts , taskStartedTime , fingerPrint , cacheClient )
1906
- if err != nil {
1907
- return createdExecution , pb .Execution_FAILED , fmt .Errorf ("failed to create cache entrty for delete pvc: %w" , err )
1907
+ if opts .Task .GetCachingOptions ().GetEnableCache () && ecfg .CachedMLMDExecutionID != "" {
1908
+ err = createCache (ctx , createdExecution , opts , taskStartedTime , fingerPrint , cacheClient )
1909
+ if err != nil {
1910
+ return createdExecution , pb .Execution_FAILED , fmt .Errorf ("failed to create cache entry for delete pvc: %w" , err )
1911
+ }
1908
1912
}
1909
1913
1910
1914
return createdExecution , pb .Execution_COMPLETE , nil
0 commit comments