fix: k8s stability

pull/437/head
Frostebite 2022-11-02 00:00:57 +00:00
parent 78272271a6
commit 82ad5a7fa8
4 changed files with 23 additions and 4 deletions

View File

@ -100,7 +100,7 @@ jobs:
# download from cloud storage
- uses: actions/upload-artifact@v2
with:
name: AWS Build (${{ matrix.targetPlatform }})
name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
retention-days: 14
- run: yarn run test-i --detectOpenHandles --forceExit --runInBand

11
dist/index.js vendored
View File

@ -3070,7 +3070,16 @@ class Kubernetes {
yield kubernetes_task_runner_1.default.watchUntilPodRunning(this.kubeClient, this.podName, this.namespace);
cloud_runner_logger_1.default.log('Pod running, streaming logs');
output = yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace);
break;
if (!(yield this.kubeClientBatch.listNamespacedJob(this.namespace)).body.items
.map((x) => { var _a; return ((_a = x.metadata) === null || _a === void 0 ? void 0 : _a.name) || undefined; })
.filter((x) => x !== undefined)
.includes(this.jobName)) {
cloud_runner_logger_1.default.log('Job not found, assumed ended!');
break;
}
else {
cloud_runner_logger_1.default.log('Job still running, recovering stream...');
}
}
catch (error) {
cloud_runner_logger_1.default.log('error running k8s workflow');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -151,7 +151,17 @@ class Kubernetes implements ProviderInterface {
'main',
this.namespace,
);
break;
if (
!(await this.kubeClientBatch.listNamespacedJob(this.namespace)).body.items
.map((x) => x.metadata?.name || undefined)
.filter((x) => x !== undefined)
.includes(this.jobName)
) {
CloudRunnerLogger.log('Job not found, assumed ended!');
break;
} else {
CloudRunnerLogger.log('Job still running, recovering stream...');
}
} catch (error: any) {
CloudRunnerLogger.log('error running k8s workflow');
CloudRunnerLogger.log(error.message);