-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Pass logger to differ in diff command #17871
Merged
pasha-codefresh
merged 1 commit into
argoproj:master
from
matthewhughes-uw:pass-logger-to-diff-log
Apr 17, 2024
Merged
fix: Pass logger to differ in diff command #17871
pasha-codefresh
merged 1 commit into
argoproj:master
from
matthewhughes-uw:pass-logger-to-diff-log
Apr 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matthewhughes-uw
force-pushed
the
pass-logger-to-diff-log
branch
from
April 17, 2024 12:20
fb7783b
to
712db3c
Compare
matthewhughes-uw
changed the title
Pass logger to differ in diff command
fix: Pass logger to differ in diff command
Apr 17, 2024
3 tasks
matthewhughes-uw
force-pushed
the
pass-logger-to-diff-log
branch
from
April 17, 2024 12:23
712db3c
to
543858f
Compare
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>
matthewhughes-uw
force-pushed
the
pass-logger-to-diff-log
branch
from
April 17, 2024 12:33
543858f
to
1853936
Compare
pasha-codefresh
approved these changes
Apr 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
mkieweg
pushed a commit
to mkieweg/argo-cd
that referenced
this pull request
Jun 11, 2024
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>
Hariharasuthan99
pushed a commit
to AmadeusITGroup/argo-cd
that referenced
this pull request
Jun 16, 2024
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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So that log messages are propagated up, this caused issues for me when trying to diagnose an issue linked to issue #17811. I've just copied the approach used e.g. in
controller/appcontroller.go
when callingargodiff.NewDiffConfigBuilder
.Sample output before this change:
Output with this change:
Checklist: