timeout adjusted

pull/437/head
Frostebite 2022-11-01 23:26:38 +00:00
parent 01a4a23e00
commit 78272271a6
3 changed files with 5 additions and 9 deletions

6
dist/index.js vendored
View File

@ -3117,15 +3117,13 @@ class Kubernetes {
cleanupTaskResources() {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.log('cleaning up');
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
try {
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
yield this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
}
catch (error) {
if (error.response.body.reason !== `NotFound`) {
cloud_runner_logger_1.default.log('Failed to cleanup, error:');
core.error(JSON.stringify(error, undefined, 4));
cloud_runner_logger_1.default.log('Abandoning cleanup, build error:');
cloud_runner_logger_1.default.log(`Failed to cleanup, error: ${error.response.body.reason}`);
throw error;
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -215,14 +215,12 @@ class Kubernetes implements ProviderInterface {
async cleanupTaskResources() {
CloudRunnerLogger.log('cleaning up');
await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
try {
await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
await this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
} catch (error: any) {
if (error.response.body.reason !== `NotFound`) {
CloudRunnerLogger.log('Failed to cleanup, error:');
core.error(JSON.stringify(error, undefined, 4));
CloudRunnerLogger.log('Abandoning cleanup, build error:');
CloudRunnerLogger.log(`Failed to cleanup, error: ${error.response.body.reason}`);
throw error;
}
}