shipwright-io / build

Shipwright - a framework for building container images on Kubernetes
https://shipwright.io
Apache License 2.0
628 stars 107 forks source link

Improve conversion webhook logging #1552

Closed qu1queee closed 3 months ago

qu1queee commented 3 months ago

Changes

Ensure Info log is kept to a minimal Ensure log content is valuable:

Upon conversion of an object, this is how the webhook will log:

{"level":"debug","ts":"2024-03-20T12:31:01Z","logger":"shp-build-webhook","msg":"handling request"}
{"level":"info","ts":"2024-03-20T12:31:01Z","logger":"shp-build-webhook","msg":"conversion request","uid":"0fea4dac-0a67-4c2f-b01c-4798ae7de382"}
{"level":"debug","ts":"2024-03-20T12:31:01Z","logger":"shp-build-webhook","msg":"converting custom resource"}
{"level":"info","ts":"2024-03-20T12:31:01Z","logger":"shp-build-webhook","msg":"converting Build from beta to alpha","namespace":"default","name":"buildkit-build"}
{"level":"info","ts":"2024-03-20T12:31:01Z","logger":"shp-build-webhook","msg":"conversion response","status":"Success","uid":"0fea4dac-0a67-4c2f-b01c-4798ae7de382"}

Submitter Checklist

Release Notes

Improve conversion webhook logging
openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/shipwright-io/build/blob/main/OWNERS)~~ [SaschaSchwarze0] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment