Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line

pull/531/head
Frostebite 2023-09-25 18:04:33 +01:00
parent 5631a3b301
commit f563b8c810
3 changed files with 5 additions and 6 deletions

4
dist/index.js generated vendored
View File

@ -3968,10 +3968,10 @@ class KubernetesTaskRunner {
cloud_runner_logger_1.default.log(`Loghash found`); cloud_runner_logger_1.default.log(`Loghash found`);
} }
if (chunk.includes(`LOGS:`)) { if (chunk.includes(`LOGS:`)) {
const result = remote_client_logger_1.RemoteClientLogger.HandleLogChunkLine(chunk);
// remove "LOGS: " and decode base64 remaining // remove "LOGS: " and decode base64 remaining
const unpacked = Buffer.from(chunk.split(`LOGS: `)[1], 'base64').toString('ascii'); const unpacked = Buffer.from(chunk.split(`LOGS: `)[1], 'base64').toString('ascii');
cloud_runner_logger_1.default.log(`Logs found HandleLogChunkLineResult:${result}\n${unpacked}`); const result = remote_client_logger_1.RemoteClientLogger.HandleLogChunkLine(unpacked);
cloud_runner_logger_1.default.log(`Logs found HandleLogChunkLineResult:${result}`);
} }
} }
}; };

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -47,11 +47,10 @@ class KubernetesTaskRunner {
CloudRunnerLogger.log(`Loghash found`); CloudRunnerLogger.log(`Loghash found`);
} }
if (chunk.includes(`LOGS:`)) { if (chunk.includes(`LOGS:`)) {
const result = RemoteClientLogger.HandleLogChunkLine(chunk);
// remove "LOGS: " and decode base64 remaining // remove "LOGS: " and decode base64 remaining
const unpacked = Buffer.from(chunk.split(`LOGS: `)[1], 'base64').toString('ascii'); const unpacked = Buffer.from(chunk.split(`LOGS: `)[1], 'base64').toString('ascii');
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}\n${unpacked}`); const result = RemoteClientLogger.HandleLogChunkLine(unpacked);
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}`);
} }
} }
}; };