pull/524/head
Frostebite 2023-03-25 17:51:10 +00:00
parent fcc14a7550
commit 6b9984ca54
3 changed files with 50 additions and 65 deletions

8
dist/index.js vendored
View File

@ -3682,8 +3682,6 @@ class KubernetesTaskRunner {
} }
let lastMessageSeenIncludedInChunk = false; let lastMessageSeenIncludedInChunk = false;
let lastMessageSeen = false; let lastMessageSeen = false;
// using this instead of Kube
try {
const logs = await cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -f -c ${containerName} --timestamps${sinceTime}`, false, true); const logs = await cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -f -c ${containerName} --timestamps${sinceTime}`, false, true);
const splitLogs = logs.split(`\n`); const splitLogs = logs.split(`\n`);
for (const chunk of splitLogs) { for (const chunk of splitLogs) {
@ -3707,12 +3705,6 @@ class KubernetesTaskRunner {
KubernetesTaskRunner.lastReceivedTimestamp = newDate; KubernetesTaskRunner.lastReceivedTimestamp = newDate;
({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(message, shouldReadLogs, shouldCleanup, output)); ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(message, shouldReadLogs, shouldCleanup, output));
} }
}
catch (error) {
if (error.includes(`s`)) {
break;
}
}
if (!didStreamAnyLogs) { if (!didStreamAnyLogs) {
core.error('Failed to stream any logs, listing namespace events, check for an error with the container'); core.error('Failed to stream any logs, listing namespace events, check for an error with the container');
core.error(JSON.stringify({ core.error(JSON.stringify({

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -40,8 +40,6 @@ class KubernetesTaskRunner {
let lastMessageSeenIncludedInChunk = false; let lastMessageSeenIncludedInChunk = false;
let lastMessageSeen = false; let lastMessageSeen = false;
// using this instead of Kube
try {
const logs = await CloudRunnerSystem.Run( const logs = await CloudRunnerSystem.Run(
`kubectl logs ${podName} -f -c ${containerName} --timestamps${sinceTime}`, `kubectl logs ${podName} -f -c ${containerName} --timestamps${sinceTime}`,
false, false,
@ -76,11 +74,6 @@ class KubernetesTaskRunner {
output, output,
)); ));
} }
} catch (error: any) {
if (error.includes(`s`)) {
break;
}
}
if (!didStreamAnyLogs) { if (!didStreamAnyLogs) {
core.error('Failed to stream any logs, listing namespace events, check for an error with the container'); core.error('Failed to stream any logs, listing namespace events, check for an error with the container');