diff --git a/.github/workflows/cloud-runner-integrity.yml b/.github/workflows/cloud-runner-integrity.yml index 6a8f3c0a..39d5f85c 100644 --- a/.github/workflows/cloud-runner-integrity.yml +++ b/.github/workflows/cloud-runner-integrity.yml @@ -18,7 +18,7 @@ env: # Commented out: Using LocalStack tests instead of real AWS # AWS_REGION: eu-west-2 # AWS_DEFAULT_REGION: eu-west-2 - AWS_STACK_NAME: game-ci-team-pipelines # Still needed for LocalStack S3 bucket creation + AWS_STACK_NAME: game-ci-team-pipelines # Still needed for LocalStack S3 bucket creation CLOUD_RUNNER_BRANCH: ${{ github.ref }} DEBUG: true PROJECT_PATH: test-project diff --git a/src/model/cloud-runner/providers/k8s/kubernetes-pods.ts b/src/model/cloud-runner/providers/k8s/kubernetes-pods.ts index 6b94d7a8..fe11a933 100644 --- a/src/model/cloud-runner/providers/k8s/kubernetes-pods.ts +++ b/src/model/cloud-runner/providers/k8s/kubernetes-pods.ts @@ -21,18 +21,30 @@ class KubernetesPods { const errorDetails: string[] = []; errorDetails.push(`Pod: ${podName}`); errorDetails.push(`Phase: ${phase}`); - + if (conditions.length > 0) { - errorDetails.push(`Conditions: ${JSON.stringify(conditions.map(c => ({ type: c.type, status: c.status, reason: c.reason, message: c.message })), undefined, 2)}`); + errorDetails.push( + `Conditions: ${JSON.stringify( + conditions.map((c) => ({ type: c.type, status: c.status, reason: c.reason, message: c.message })), + undefined, + 2, + )}`, + ); } if (containerStatuses.length > 0) { containerStatuses.forEach((cs, idx) => { if (cs.state?.waiting) { - errorDetails.push(`Container ${idx} (${cs.name}) waiting: ${cs.state.waiting.reason} - ${cs.state.waiting.message || ''}`); + errorDetails.push( + `Container ${idx} (${cs.name}) waiting: ${cs.state.waiting.reason} - ${cs.state.waiting.message || ''}`, + ); } if (cs.state?.terminated) { - errorDetails.push(`Container ${idx} (${cs.name}) terminated: ${cs.state.terminated.reason} - ${cs.state.terminated.message || ''} (exit code: ${cs.state.terminated.exitCode})`); + errorDetails.push( + `Container ${idx} (${cs.name}) terminated: ${cs.state.terminated.reason} - ${ + cs.state.terminated.message || '' + } (exit code: ${cs.state.terminated.exitCode})`, + ); } }); } diff --git a/src/model/cloud-runner/tests/e2e/cloud-runner-end2end-retaining.test.ts b/src/model/cloud-runner/tests/e2e/cloud-runner-end2end-retaining.test.ts index 4b9ad913..292834b1 100644 --- a/src/model/cloud-runner/tests/e2e/cloud-runner-end2end-retaining.test.ts +++ b/src/model/cloud-runner/tests/e2e/cloud-runner-end2end-retaining.test.ts @@ -88,7 +88,9 @@ describe('Cloud Runner Retain Workspace', () => { ); try { await CloudRunnerSystem.Run( - `rm -rf ./cloud-runner-cache/${path.basename(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)} || true`, + `rm -rf ./cloud-runner-cache/${path.basename( + CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, + )} || true`, ); } catch (error: any) { CloudRunnerLogger.log(`Failed to cleanup workspace: ${error.message}`);