-
State changed as build OD-8576 (16.8.1) is successful
-
OneDev
changed state to 'Closed' 3 days ago
Previous Value Current Value Open
Closed
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
OneDev 16.8.0, Kubernetes executor, k8s-helper 4.3.7
|
| Labels |
No labels
|
Issue Votes (0)
Since upgrading to 16.8.0, every build shows the checkout step as failed in the new Steps tab, and the log ends the step with
Step "checkout" is failed. The same happens to everySetupCacheStep. Command steps and kaniko steps are reported correctly. The job itself finishesSUCCESSFUL, and the steps that follow run although their condition isSUCCESSFUL, so the executor treats the checkout as successful. Only the reported step status is wrong.Log excerpt (progress lines removed)
Steps in the build spec
Suspected cause (from reading
theonedev/k8s-helperat ca94abf; not confirmed)JobHelper.generateCommandScriptwraps each step in a shell script that runs the step, prints the##onedev-step:SUCCESSFUL:step-Nevent, and then echoesLOG_END_MESSAGE(JobHelper.java, lines 206-219).For a checkout, cache or server-side step, the wrapped command is a Java class, and each of them logs
LOG_END_MESSAGEitself in afinallyblock before exiting:CheckoutCode.java, line 37SetupJobCache.java, line 30RunServerSideStep.java, line 26The server stops collecting the container's log at the first
LOG_END_MESSAGE(KubernetesExecutor.java,collectContainerLog(..., new SeenMessage(LOG_END_MESSAGE), ...)), so the step event printed by the wrapper afterwards is never read, and a step with a start event but no outcome is shown as failed. A plainCommandStepprints nothing of the kind itself, which would explain why those are reported correctly.If that is right,
RunServerSideStepsteps (publish artifacts, reports) are affected too.