Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Pass logger to differ in diff command (argoproj#17871)
So that log messages are propagated up, this caused issues for me when trying to diagnose an issue linked to issue argoproj#17811. I've just copied the approach used e.g. in `controller/appcontroller.go` when calling `argodiff.NewDiffConfigBuilder`. Sample output before this change: $ argocd --loglevel debug --server argocd-system.dev.aws.uw.systems app diff dev-enablement/dev-enablement ===== apps/Deployment dev-enablement/go-docs ====== 272c272 < cpu: "0" --- > cpu: 0m 275c275 < cpu: "0" --- > cpu: 0m Output with this change: $ argocd --loglevel debug --server argocd-system.dev.aws.uw.systems app diff dev-enablement/dev-enablement INFO[0000] Could not unmarshal to object of type apps/v1, Kind=Deployment: json: unknown field "restartPolicy" INFO[0000] Could not unmarshal to object of type apps/v1, Kind=Deployment: json: unknown field "restartPolicy" ===== apps/Deployment dev-enablement/go-docs ====== 272c272 < cpu: "0" --- > cpu: 0m 275c275 < cpu: "0" --- > cpu: 0m INFO[0000] Could not create new object of type argoproj.io/v1alpha1, Kind=Application: no kind "Application" is registered for version "argoproj.io/v1alpha1" in scheme "pkg/runtime/scheme.go:100" INFO[0000] Could not create new object of type argoproj.io/v1alpha1, Kind=Application: no kind "Application" is registered for version "argoproj.io/v1alpha1" in scheme "pkg/runtime/scheme.go:100" INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100" INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100" INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100" INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100" Signed-off-by: Matt Hughes <mhughes@uw.co.uk>
- Loading branch information