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

Enhances git command tracing #1844

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

dimitropoulos
Copy link
Contributor

There is currently a very basic mechanism built in to execGitCmd that is essential in certain kinds of debugging for tracing the git commands that the application is using. Recently in work on a separate PR, I needed to view the output of the git commands. On top of that, some frequent commands (such as the two git config lines that occur almost every time a flux action occurs) make it hard to quickly zero in on what you're looking for.

This PR adds:

  1. functionality such that setting const trace = true (as before) will now output a more parse-friendly log line that also includes the output of the git command.
  2. an optional blacklist that can be used whilst developing

@dimitropoulos dimitropoulos mentioned this pull request Mar 20, 2019
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.

One requested change (blacklisted -> exempted), and some suggestions.

git/operations.go Outdated Show resolved Hide resolved
git/operations.go Outdated Show resolved Hide resolved
git/operations.go Show resolved Hide resolved
git/operations.go Outdated Show resolved Hide resolved
@dimitropoulos dimitropoulos force-pushed the traceGitCommands branch 3 times, most recently from 6d76536 to f4fe471 Compare March 25, 2019 18:33
@dimitropoulos
Copy link
Contributor Author

@squaremo I updated to satisfy all the changes you requested. Let me know if anything else jumps out at you. :)

git/operations.go Outdated Show resolved Hide resolved
git/operations.go Outdated Show resolved Hide resolved
git/operations.go Outdated Show resolved Hide resolved
git/operations.go Outdated Show resolved Hide resolved
allows for blacklisting certain git commands from tracing


changes requested from review


changes from recent review
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.

In good shape, thank you for persevering Dimitri 🍍

@dimitropoulos dimitropoulos merged commit 0f52e11 into fluxcd:master Mar 26, 2019
@dimitropoulos dimitropoulos deleted the traceGitCommands branch March 26, 2019 15:49
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