Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Add more task debug info in jobInfo api response [rest-server] #4667

Merged
merged 10 commits into from
Jul 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/rest-server/src/models/v2/job/k8s.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => {
const containerGpus = null;

const completionStatus = taskStatus.attemptStatus.completionStatus;
const diagnostics = completionStatus ? completionStatus.diagnostics : null;
const exitDiagnostics = generateExitDiagnostics(diagnostics);
return {
taskIndex: taskStatus.index,
taskState: convertState(
Expand All @@ -222,10 +224,16 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => {
),
containerId: taskStatus.attemptStatus.podUID,
containerIp: taskStatus.attemptStatus.podHostIP,
podNodeName: taskStatus.attemptStatus.podNodeName,
debuggy marked this conversation as resolved.
Show resolved Hide resolved
containerPorts,
containerGpus,
containerLog: `http://${taskStatus.attemptStatus.podHostIP}:${process.env.LOG_MANAGER_PORT}/log-manager/tail/${logPathPrefix}/${taskStatus.attemptStatus.podUID}/`,
containerExitCode: completionStatus ? completionStatus.code : null,
containerExitSpec: completionStatus ? generateExitSpec(completionStatus.code) : generateExitSpec(null),
containerExitDiagnostics: exitDiagnostics ? exitDiagnostics.diagnosticsSummary : null,
totalRetriedCount: taskStatus.retryPolicyStatus.totalRetriedCount,
startTime: taskStatus.attemptStatus.startTime,
debuggy marked this conversation as resolved.
Show resolved Hide resolved
completionTime: taskStatus.attemptStatus.completionTime,
debuggy marked this conversation as resolved.
Show resolved Hide resolved
...launcherConfig.enabledHived && {
hived: {
affinityGroupName,
Expand Down