in-toto / witness

Witness is a pluggable framework for software supply chain risk management. It automates, normalizes, and verifies software artifact provenance.
https://witness.dev
Apache License 2.0
415 stars 60 forks source link

[Feat]: enhanced debug log level output #375

Closed Strakeln closed 5 months ago

Strakeln commented 10 months ago

Describe the solution you'd like:

When using debug log level for witness verify, output each step in the verification process for better debugging.

The verification process is described here. If there was debug output for each of the five steps, it might help users debug the failures they are experiencing.

User value:

Currently, with debug log level enabled, we only learn that there was a failure, but do not know where in the process the failure occurred. If there were step-specific output, the user might be able to more quickly hone in on where the problem lies.

Expected behavior:

Specifying -l debug to witness verify results in per-step outputs and success/failure indications. The primary desire here is outputs for each of the verification steps, but outputs for steps-within-the-steps might also be helpful.

Proposed solution:

Add at least one debug output for each verification step.

Testing changes required:

Verify that specifying -l debug to witness verify results in outputs from each of the verification steps (currently 5 steps)

Documentation changes required:

None

ChaosInTheCRD commented 10 months ago

@Strakeln thank you so much for opening this issue! improving the logging and debug logs is absolutely at top of mind at the moment, and you're totally right that improvements need to be made.

By supplying this issue, you've highlighted the priority this needs to take in the near future, so thank you for taking the time to raise the issue!

I will try my best to keep this issue up to date with progress as we improve things.

matglas commented 6 months ago

@Strakeln if you are able to build yourself a new version you can test the new functionality that has been added. Please give it a try. I was very happy with the results from the work @ChaosInTheCRD did.

Strakeln commented 5 months ago

@matglas @ChaosInTheCRD - Sorry for the delayed response, I have been out of office for a few weeks to move to a new house. I tested out witness 0.4.0 and I have to say, I LOVE the improvements to the debug logs. It is a substantial and meaningful improvement. Thank you, and well done!