fixes
parent
551b444c42
commit
c01f983ad0
|
@ -4023,13 +4023,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const client_node_1 = __nccwpck_require__(89679);
|
||||
const stream_1 = __nccwpck_require__(12781);
|
||||
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
||||
const core = __importStar(__nccwpck_require__(42186));
|
||||
const cloud_runner_statics_1 = __nccwpck_require__(90828);
|
||||
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
|
||||
const follow_log_stream_service_1 = __nccwpck_require__(64121);
|
||||
const cloud_runner_system_1 = __nccwpck_require__(99393);
|
||||
class KubernetesTaskRunner {
|
||||
static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, alreadyFinished = false) {
|
||||
var _a;
|
||||
|
@ -4081,19 +4081,21 @@ class KubernetesTaskRunner {
|
|||
*/
|
||||
// timestamps?: boolean;
|
||||
// }
|
||||
const logOptions = {
|
||||
follow: !alreadyFinished,
|
||||
pretty: false,
|
||||
previous: alreadyFinished,
|
||||
timestamps: true,
|
||||
sinceSeconds: KubernetesTaskRunner.lastReceivedTimestamp,
|
||||
};
|
||||
// const logOptions = {
|
||||
// follow: !alreadyFinished,
|
||||
// pretty: false,
|
||||
// previous: alreadyFinished,
|
||||
// timestamps: true,
|
||||
// sinceSeconds: KubernetesTaskRunner.lastReceivedTimestamp,
|
||||
// };
|
||||
try {
|
||||
const resultError = yield new client_node_1.Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
|
||||
// const resultError = await new Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
|
||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -c ${containerName} > app.log`);
|
||||
output += yield cloud_runner_system_1.CloudRunnerSystem.Run(`cat app.log`);
|
||||
stream.destroy();
|
||||
if (resultError) {
|
||||
throw resultError;
|
||||
}
|
||||
// if (resultError) {
|
||||
// throw resultError;
|
||||
// }
|
||||
if (!didStreamAnyLogs) {
|
||||
core.error('Failed to stream any logs, listing namespace events, check for an error with the container');
|
||||
core.error(JSON.stringify({
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue