Skip to content
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

Logger initialization issue #4472

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

casibbald
Copy link
Collaborator

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/[email protected]/pkg/log/log.go:60 +0xa0 > sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0x4000132580, {0x3291787, 0x14}) > /go/pkg/mod/sigs.k8s.io/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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 +0x364

How was this change implemented?

How did you validate the change?
Services starts, stacktrace gone

Release notes

Documentation Changes

@casibbald
Copy link
Collaborator Author

Reissued PR due to mess of commits

@casibbald casibbald enabled auto-merge (squash) January 9, 2025 09:30
@casibbald casibbald requested a review from erikgb January 9, 2025 09:38
Copy link
Contributor

@erikgb erikgb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please squash commits on merge.

@casibbald casibbald merged commit ad72136 into weaveworks:main Jan 9, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants