Improve k8s logging accuracy
parent
4e2f2ef206
commit
186a31b6a2
|
@ -3333,7 +3333,7 @@ class Kubernetes {
|
||||||
errorParsed = error;
|
errorParsed = error;
|
||||||
}
|
}
|
||||||
const reason = errorParsed.reason || ((_b = (_a = errorParsed.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.reason) || ``;
|
const reason = errorParsed.reason || ((_b = (_a = errorParsed.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.reason) || ``;
|
||||||
const errorMessage = errorParsed.message || reason;
|
const errorMessage = reason || errorParsed.message;
|
||||||
const continueStreaming = errorMessage.includes(`dial timeout, backstop`) ||
|
const continueStreaming = errorMessage.includes(`dial timeout, backstop`) ||
|
||||||
errorMessage.includes(`HttpError: HTTP request failed`) ||
|
errorMessage.includes(`HttpError: HTTP request failed`) ||
|
||||||
errorMessage.includes(`an error occurred when try to find container`) ||
|
errorMessage.includes(`an error occurred when try to find container`) ||
|
||||||
|
@ -4037,6 +4037,8 @@ class KubernetesTaskRunner {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
stream.destroy();
|
stream.destroy();
|
||||||
}
|
}
|
||||||
|
cloud_runner_logger_1.default.log(JSON.stringify(error));
|
||||||
|
cloud_runner_logger_1.default.log('k8s task runner failed');
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
cloud_runner_logger_1.default.log('end of log stream');
|
cloud_runner_logger_1.default.log('end of log stream');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -164,7 +164,7 @@ class Kubernetes implements ProviderInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
const reason = errorParsed.reason || errorParsed.response?.body?.reason || ``;
|
const reason = errorParsed.reason || errorParsed.response?.body?.reason || ``;
|
||||||
const errorMessage = errorParsed.message || reason;
|
const errorMessage = reason || errorParsed.message;
|
||||||
|
|
||||||
const continueStreaming =
|
const continueStreaming =
|
||||||
errorMessage.includes(`dial timeout, backstop`) ||
|
errorMessage.includes(`dial timeout, backstop`) ||
|
||||||
|
|
|
@ -110,6 +110,8 @@ class KubernetesTaskRunner {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
stream.destroy();
|
stream.destroy();
|
||||||
}
|
}
|
||||||
|
CloudRunnerLogger.log(JSON.stringify(error));
|
||||||
|
CloudRunnerLogger.log('k8s task runner failed');
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
CloudRunnerLogger.log('end of log stream');
|
CloudRunnerLogger.log('end of log stream');
|
||||||
|
|
Loading…
Reference in New Issue