File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
sky/dashboard/src/data/connectors Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -370,12 +370,23 @@ async function getKubernetesGPUsFromContexts(contextNames) {
370370
371371 // Get all of the node info for all contexts in parallel and put them
372372 // in a dictionary keyed by context name.
373- const contextNodeInfoList = await Promise . all (
373+ // Use Promise.allSettled to handle partial failures gracefully
374+ const contextNodeInfoResults = await Promise . allSettled (
374375 contextNames . map ( ( context ) => getKubernetesPerNodeGPUs ( context ) )
375376 ) ;
376377 const contextToNodeInfo = { } ;
377378 for ( let i = 0 ; i < contextNames . length ; i ++ ) {
378- contextToNodeInfo [ contextNames [ i ] ] = contextNodeInfoList [ i ] ;
379+ const result = contextNodeInfoResults [ i ] ;
380+ if ( result . status === 'fulfilled' ) {
381+ contextToNodeInfo [ contextNames [ i ] ] = result . value ;
382+ } else {
383+ // Log the error but continue with other contexts
384+ console . warn (
385+ `Failed to get node info for context ${ contextNames [ i ] } :` ,
386+ result . reason
387+ ) ;
388+ contextToNodeInfo [ contextNames [ i ] ] = { } ;
389+ }
379390 }
380391
381392 // Populate the gpuToData map for each context.
You can’t perform that action at this time.
0 commit comments