rtyler / otto

Otto is your friendly continuous delivery companion.
GNU Affero General Public License v3.0
80 stars 5 forks source link

Step output being printed in reverse #43

Closed rtyler closed 3 years ago

rtyler commented 3 years ago
10:41:32 orchestrator   | StepStart { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d }
10:41:32 orchestrator   | StepOutput { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d, buffer: "total 12K", stream: Stdout }
10:41:32 orchestrator   | StepOutput { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d, buffer: "drwxr-xr-x  3 tyler users 4.0K Nov 27 10:41 .", stream: Stdout }
10:41:32 orchestrator   | StepOutput { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d, buffer: "drwxr-xr-x 11 tyler users 4.0K Nov 27 10:41 ..", stream: Stdout }
10:41:32 orchestrator   | StepOutput { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d, buffer: "srwxr-xr-x  1 tyler users    0 Nov 27 10:41 agent.sock", stream: Stdout }
10:41:32 orchestrator   | StepOutput { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d, buffer: "drwxr-xr-x  3 tyler users 4.0K Nov 27 10:41 otto", stream: Stdout }
10:41:32 orchestrator   | StepOutput { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d, buffer: "+ ls -lah", stream: Stdout }
10:41:32 orchestrator   | StepEnd { symbol: "sh", uuid: bfa09006-4d55-4490-81d3-4f2fc0993a3d }

I think something with the reading of the pipe and printing is just backwards. Filing this for fixing later.

rtyler commented 3 years ago

I believe this is an artifact of how the sh is stupidly handling output of stderr and stdout. Need to change both to be streaming.