fix: initializing logger earlier#4466
Closed
casibbald wants to merge 2 commits intoweaveworks:mainfrom
Closed
Conversation
erikgb
reviewed
Jan 8, 2025
| "fmt" | ||
| "net" | ||
|
|
||
| //nolint:gci |
Contributor
There was a problem hiding this comment.
Better to run golangci-lint run --fix to avoid this suppression. I can add a new target to our makefile: make lint-fix.
erikgb
reviewed
Jan 9, 2025
Contributor
erikgb
left a comment
There was a problem hiding this comment.
Nice! If you squash your commits I'll approve this! 😉
6dbd806 to
6a1ecea
Compare
Initializing logger earlier
6a1ecea to
91a72c8
Compare
This file contains hidden or 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
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.
Closes
What changed?
initializing logger earlier on in start process
Why was this change made?
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed. Detected at: > goroutine 434 [running]: > runtime/debug.Stack() > /usr/local/go/src/runtime/debug/stack.go:26 +0x64 > sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot() > /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.4/pkg/log/log.go:60 +0xa0 > sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0x4000132580, {0x3291787, 0x14}) > /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.4/pkg/log/deleg.go:147 +0x34 > github.com/go-logr/logr.Logger.WithName({{0x3600dc8, 0x4000132580}, 0x0}, {0x3291787, 0x14}) > /go/pkg/mod/github.com/go-logr/logr@v1.4.2/logr.go:345 +0x5c > sigs.k8s.io/controller-runtime/pkg/client.newClient(0x400036d448, {0x0, 0x4000261650, {0x3602610, 0x40006ad270}, 0x0, 0x0}) > /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.4/pkg/client/client.go:118 +0xf8 > sigs.k8s.io/controller-runtime/pkg/client.New(0x400029fd48, {0x0, 0x4000261650, {0x3602610, 0x40006ad270}, 0x0, 0x0}) > /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.4/pkg/client/client.go:98 +0x68 > github.com/weaveworks/weave-gitops/core/clustersmngr/cluster.getClientFromConfig(0x400029fd48, 0x4000261650) > /app/core/clustersmngr/cluster/single.go:69 +0x2f0 > github.com/weaveworks/weave-gitops/core/clustersmngr/cluster.(*singleCluster).GetUserClient(0x40001320c0, 0x40007cfda0) > /app/core/clustersmngr/cluster/single.go:94 +0x108 > github.com/weaveworks/weave-gitops/core/clustersmngr.(*clustersManager).getOrCreateClient(0x40001acb40, 0x40007cfda0, {0x36023d0, 0x40001320c0}) > /app/core/clustersmngr/factory.go:623 +0x38c > github.com/weaveworks/weave-gitops/core/clustersmngr.(*clustersManager).getUserClientWithNamespaces.func1({0x36023d0, 0x40001320c0}, {0x35e7d98, 0x4000c9a890}, 0x4000974e00) > /app/core/clustersmngr/factory.go:426 +0xd8 > created by github.com/weaveworks/weave-gitops/core/clustersmngr.(*clustersManager).getUserClientWithNamespaces in goroutine 402 > /app/core/clustersmngr/factory.go:423 +0x364How was this change implemented?
How did you validate the change?
Services starts, stacktrace gone
Release notes
Documentation Changes