locking test improvements
parent
d5ec49a174
commit
999ca1ba26
|
@ -4093,9 +4093,10 @@ class KubernetesTaskRunner {
|
||||||
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () {
|
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () {
|
||||||
var _a, _b, _c, _d, _e, _f;
|
var _a, _b, _c, _d, _e, _f;
|
||||||
const status = yield kubeClient.readNamespacedPodStatus(podName, namespace);
|
const status = yield kubeClient.readNamespacedPodStatus(podName, namespace);
|
||||||
|
const events = yield kubeClient.readNamespacedEvent(podName, namespace);
|
||||||
const phase = (_a = status === null || status === void 0 ? void 0 : status.body.status) === null || _a === void 0 ? void 0 : _a.phase;
|
const phase = (_a = status === null || status === void 0 ? void 0 : status.body.status) === null || _a === void 0 ? void 0 : _a.phase;
|
||||||
success = phase === 'Running';
|
success = phase === 'Running';
|
||||||
cloud_runner_logger_1.default.log(`${(_b = status.body.status) === null || _b === void 0 ? void 0 : _b.phase} ${((_d = (_c = status.body.status) === null || _c === void 0 ? void 0 : _c.conditions) === null || _d === void 0 ? void 0 : _d[0].reason) || ''} ${((_f = (_e = status.body.status) === null || _e === void 0 ? void 0 : _e.conditions) === null || _f === void 0 ? void 0 : _f[0].message) || ''}`);
|
cloud_runner_logger_1.default.log(`${(_b = status.body.status) === null || _b === void 0 ? void 0 : _b.phase} ${((_d = (_c = status.body.status) === null || _c === void 0 ? void 0 : _c.conditions) === null || _d === void 0 ? void 0 : _d[0].reason) || ''} ${((_f = (_e = status.body.status) === null || _e === void 0 ? void 0 : _e.conditions) === null || _f === void 0 ? void 0 : _f[0].message) || ''} \n ${events}`);
|
||||||
if (success || phase !== 'Pending')
|
if (success || phase !== 'Pending')
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -123,12 +123,13 @@ class KubernetesTaskRunner {
|
||||||
await waitUntil(
|
await waitUntil(
|
||||||
async () => {
|
async () => {
|
||||||
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
|
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
|
||||||
|
const events = await kubeClient.readNamespacedEvent(podName, namespace);
|
||||||
const phase = status?.body.status?.phase;
|
const phase = status?.body.status?.phase;
|
||||||
success = phase === 'Running';
|
success = phase === 'Running';
|
||||||
CloudRunnerLogger.log(
|
CloudRunnerLogger.log(
|
||||||
`${status.body.status?.phase} ${status.body.status?.conditions?.[0].reason || ''} ${
|
`${status.body.status?.phase} ${status.body.status?.conditions?.[0].reason || ''} ${
|
||||||
status.body.status?.conditions?.[0].message || ''
|
status.body.status?.conditions?.[0].message || ''
|
||||||
}`,
|
} \n ${events}`,
|
||||||
);
|
);
|
||||||
if (success || phase !== 'Pending') return true;
|
if (success || phase !== 'Pending') return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue