Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Give full output of git command on errors #2054

Merged
merged 2 commits into from
May 20, 2019

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented May 16, 2019

As a side effect, the tracing of commands also prints the full output (instead of separating stderr and stdout), which I think is more useful.

Implementing this was triggered by #2050 (git clone was failing due to known_hosts being updated, but I had to exec into the pod in order to figure it out).

@2opremio 2opremio requested review from squaremo and hiddeco May 16, 2019 13:27
@2opremio 2opremio force-pushed the more-feedback-on-git-errors branch from 92734c1 to 9f0ad02 Compare May 16, 2019 13:28
@2opremio 2opremio changed the title Give full output of command on git errors Give full output of git command on errors May 16, 2019
@2opremio 2opremio force-pushed the more-feedback-on-git-errors branch from 9f0ad02 to 498954e Compare May 16, 2019 13:31
@squaremo
Copy link
Member

Give full output of git command on errors

I restricted the error message to the first line of output deliberately. But who knows where that impulse came from, it was a while ago. It's certainly useful to have the full error from git.

the tracing of commands also prints the full output (instead of separating stderr and stdout), which I think is more useful.

Because they will be interleaved?

@2opremio
Copy link
Contributor Author

Because they will be interleaved?

Yep

@2opremio 2opremio force-pushed the more-feedback-on-git-errors branch 5 times, most recently from 7524f8c to f1f1e81 Compare May 16, 2019 15:29
@2opremio
Copy link
Contributor Author

@squaremo I have finally finished fixing the race conditions PTAL

git/operations.go Show resolved Hide resolved
git/operations.go Show resolved Hide resolved
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's go forward :-)

As a side effect, the tracing of commands also prints the full output
(instead of separating stderr and stdout), which I think is more useful.
@2opremio 2opremio force-pushed the more-feedback-on-git-errors branch from f1f1e81 to d90ec58 Compare May 20, 2019 12:04
@2opremio 2opremio merged commit 8d88750 into fluxcd:master May 20, 2019
@2opremio 2opremio deleted the more-feedback-on-git-errors branch May 20, 2019 12:57
@2opremio 2opremio added this to the v1.12.3 milestone May 22, 2019
@squaremo
Copy link
Member

Because they will be interleaved?

Yep

Re-examining this: why do we care that they are interleaved? Any particular interleaving would be a coincidence anyway, and it's more useful to know which of stderr or stdout any particular output went to.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants