locking test improvements
parent
999ca1ba26
commit
fcc3348295
|
@ -169,24 +169,23 @@ class Kubernetes implements ProviderInterface {
|
|||
}
|
||||
await this.cleanupTaskResources();
|
||||
} catch (error: any) {
|
||||
// let errorParsed;
|
||||
// try {
|
||||
// // errorParsed = JSON.parse(error);
|
||||
// } catch {
|
||||
// // errorParsed = error;
|
||||
// }
|
||||
let errorParsed;
|
||||
try {
|
||||
errorParsed = JSON.parse(error);
|
||||
} catch {
|
||||
errorParsed = error;
|
||||
}
|
||||
|
||||
// const errorMessage =
|
||||
// errorParsed.name || errorParsed.reason || errorParsed.response?.body?.reason || errorParsed.message;
|
||||
const errorMessage =
|
||||
errorParsed.name || errorParsed.reason || errorParsed.response?.body?.reason || errorParsed.message;
|
||||
|
||||
const continueStreaming = false;
|
||||
|
||||
// errorMessage.includes(`dial timeout, backstop`) ||
|
||||
// errorMessage.includes(`HttpError`) ||
|
||||
// errorMessage.includes(`HttpError: HTTP request failed`) ||
|
||||
// errorMessage.includes(`an error occurred when try to find container`) ||
|
||||
// errorMessage.includes(`not found`) ||
|
||||
// errorMessage.includes(`Not Found`);
|
||||
const continueStreaming =
|
||||
errorMessage.includes(`dial timeout, backstop`) ||
|
||||
errorMessage.includes(`HttpError`) ||
|
||||
errorMessage.includes(`HttpError: HTTP request failed`) ||
|
||||
errorMessage.includes(`an error occurred when try to find container`) ||
|
||||
errorMessage.includes(`not found`) ||
|
||||
errorMessage.includes(`Not Found`);
|
||||
if (continueStreaming) {
|
||||
CloudRunnerLogger.log('Log Stream Container Not Found');
|
||||
await new Promise((resolve) => resolve(5000));
|
||||
|
|
|
@ -123,7 +123,7 @@ class KubernetesTaskRunner {
|
|||
await waitUntil(
|
||||
async () => {
|
||||
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
|
||||
const events = await kubeClient.readNamespacedEvent(podName, namespace);
|
||||
const events = await kubeClient.listNamespacedEvent(namespace);
|
||||
const phase = status?.body.status?.phase;
|
||||
success = phase === 'Running';
|
||||
CloudRunnerLogger.log(
|
||||
|
|
Loading…
Reference in New Issue