Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/clusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export class Cluster {
name: string;
id: string;
status: string;
last_scheduling_status?: string;
}

export class ClusterVersion {
Expand Down Expand Up @@ -177,9 +178,9 @@ export async function pollForStatus(vendorPortalApi: VendorPortalApi, clusterId:
return clusterDetails;
}

// Once state is "error", it will never change. So we can shortcut polling.
if (clusterDetails.status === "error") {
throw new Error(`Cluster has entered error state.`);
const schedulingStatus = clusterDetails.last_scheduling_status ? `, last scheduling status: ${clusterDetails.last_scheduling_status}` : "";
throw new Error(`Cluster has entered error state${schedulingStatus}`);
}

console.debug(`Cluster status is ${clusterDetails.status}, sleeping for ${sleeptimeMs / 1000} seconds`);
Expand Down Expand Up @@ -219,7 +220,8 @@ async function getClusterDetails(vendorPortalApi: VendorPortalApi, clusterId: st
return {
name: body.cluster.name,
id: body.cluster.id,
status: body.cluster.status
status: body.cluster.status,
last_scheduling_status: body.cluster.last_scheduling_status
};
}

Expand Down