defenseunicorns / uds-cli

Apache License 2.0
24 stars 11 forks source link

fix: update maru-runner to silence info log #925

Closed catsby closed 1 week ago

catsby commented 1 week ago

Description

Remove the Saving log file note thats immediately present when running uds run by updating maru to a version that enforces log levels, and set the log level to warn.

NOTE: this PR updates uds-cli to use a branch from the maru-runner repo that has changes to logging, see https://github.com/defenseunicorns/maru-runner/pull/141 . If that PR gets merged, this PR should be updated to pull from the main branch or a tagged release before merging.

Example output

Before this PR, we see a Saving log file note (as shown also in #916):

 ➜ ./build/uds-mac-apple run build-cli-mac-apple

  •  Saving log file to
       /var/folders/lk/181f8tjj7xg0c368tfmw35kr0000gn/T/maru-2024-09-18-14-33-53-205407822.log
  ✔  Completed "go list -f '{{.Version}}' -m github.com/derailed/k9s"
  ✔  Completed "go list -f '{{.Version}}' -m github.com/anchore/syft"
  [...]

After this change, if you run ./build/uds-mac-apple run build-cli-mac-apple twice, you'll see the new output (once to build the binary with the change, and a second time to actually use the new binary with the change):

 ➜ ./build/uds-mac-apple run build-cli-mac-apple
  ✔  Completed "go list -f '{{.Version}}' -m github.com/derailed/k9s"
  ✔  Completed "go list -f '{{.Version}}' -m github.com/anchore/syft"
  [...]

Related Issue

Fixes #916

Type of change

Checklist before merging

catsby commented 1 week ago

https://github.com/defenseunicorns/maru-runner/pull/141 has been merged, just waiting on the next maru release to update this PR