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

No RunInfo in context #280

Closed
aschleifer opened this issue Feb 19, 2024 · 8 comments
Closed

No RunInfo in context #280

aschleifer opened this issue Feb 19, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@aschleifer
Copy link




Describe the bug
When running popeye version 0.20.0 without any pramaters I get this error:

 ___     ___ _____   _____                       D          .-'-.
| _ \___| _ \ __\ \ / / __|                       O     __| K    `\
|  _/ _ \  _/ _| \ V /| _|                         H   `-,-`--._   `\
|_| \___/_| |___| |_| |___|                       []  .->'  X     `|-'
  Biffs`em and Buffs`em!                            `=/ (__/_       /
                                                      \_,    `    _)
                                                         `----;  |


Boom! Doh! No RunInfo in context

To Reproduce
Steps to reproduce the behavior:
Run popeye with an active kubecontext without any parameters

Expected behavior
It should generate the normal linting output.

Versions (please complete the following information):

  • OS: Arch Linux
  • Popeye 0.20.0
  • K8s 1.28.4
@derailed
Copy link
Owner

@aschleifer Thanks for the heads up Andreas! Could you share the popeye's logs?
Do you get the same error if you specify a namespace aka popeye -n default?

@derailed derailed added the question Further information is requested label Feb 19, 2024
@aschleifer
Copy link
Author

@aschleifer Thanks for the heads up Andreas! Could you share the popeye's logs? Do you get the same error if you specify a namespace aka popeye -n default?

Hello, yes the error also occures when giving a namespace. Here are the logs:

4:52PM DBG Connecting to API Server [redacted]
4:52PM DBG Lint 38.157884ms
4:52PM ERR Doh! No RunInfo in context
4:52PM ERR goroutine 1 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x5e
github.com/derailed/popeye/cmd.doIt.func1()
        github.com/derailed/popeye/cmd/root.go:61 +0x10f
panic({0x651639434400?, 0x651639851af0?})
        runtime/panic.go:770 +0x132
github.com/derailed/popeye/internal.MustExtractRunInfo(...)
        github.com/derailed/popeye/internal/context.go:55
github.com/derailed/popeye/internal/issues.(*Collector).AddErr(0xc000595098, {0x651639875d68?, 0xc000648630?}, {0xc00089b100, 0x1, 0x77abd740283a6bc?})
        github.com/derailed/popeye/internal/issues/collector.go:97 +0x32d
github.com/derailed/popeye/internal/scrub.NewCluster({0x651639875d68, 0xc000648630}, 0xc000648870, 0xc00050e0b0)
        github.com/derailed/popeye/internal/scrub/cluster.go:36 +0x208
github.com/derailed/popeye/pkg.(*Popeye).lint(0xc0002100c0)
        github.com/derailed/popeye/pkg/popeye.go:243 +0x709
github.com/derailed/popeye/pkg.(*Popeye).Lint(0xc0002100c0)
        github.com/derailed/popeye/pkg/popeye.go:184 +0x77
github.com/derailed/popeye/cmd.doIt(0xc00050c200?, {0x651638ef9af4?, 0x4?, 0x651638ef99c0?})
        github.com/derailed/popeye/cmd/root.go:76 +0xd4
github.com/spf13/cobra.(*Command).execute(0x65163a7e6040, {0xc0000522b0, 0x2, 0x2})
        github.com/spf13/[email protected]/command.go:944 +0x867
github.com/spf13/cobra.(*Command).ExecuteC(0x65163a7e6040)
        github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:992
github.com/derailed/popeye/cmd.Execute(...)
        github.com/derailed/popeye/cmd/root.go:49
main.main()
        github.com/derailed/popeye/main.go:25 +0x1b

@derailed
Copy link
Owner

@aschleifer Thank you for the details Andreas!
So I think there is an issue gathering cluster info on your particular cluster.
But since we choke when reporting the error, I can't tell what the issue is ;(

Going to drop a new rev 0.20.1 so we can diagnose what the issue might be.
Please upgrade v0.20.1 when its ready and reshare your logs. Hoping this will shade additional light.

Thank you for your patience and helping us out with root cause!

@derailed
Copy link
Owner

@aschleifer v0.20.1 should be out now...

@aschleifer
Copy link
Author

aschleifer commented Feb 19, 2024

No the command (./execs/popeye) doesn't terminate, but the log shows this:

5:47PM DBG Connecting to API Server [redacted]
5:47PM DBG Loading raw config from flags...
5:47PM ERR Unable to gather cluster info error="Invalid Semantic Version"
5:47PM ERR Popeye CHOKED! "invalid memory address or nil pointer dereference"
5:47PM ERR goroutine 122 [running]:
runtime/debug.Stack()
        /usr/lib/go/src/runtime/debug/stack.go:24 +0x5e
github.com/derailed/popeye/pkg.(*Popeye).runLinter.func1()
        /home/aschleifer/tmp/popeye/pkg/popeye.go:276 +0x9d
panic({0x27f8000?, 0x3e84360?})
        /usr/lib/go/src/runtime/panic.go:770 +0x132
github.com/derailed/popeye/internal/cache.(*Cluster).ListVersion(...)
        /home/aschleifer/tmp/popeye/internal/cache/cluster.go:23
github.com/derailed/popeye/internal/lint.(*Cluster).checkVersion(0xc000823d28, {0x2efef68, 0xc00059db30})
        /home/aschleifer/tmp/popeye/internal/lint/cluster.go:47 +0x46
github.com/derailed/popeye/internal/lint.(*Cluster).Lint(...)
        /home/aschleifer/tmp/popeye/internal/lint/cluster.go:43
github.com/derailed/popeye/internal/scrub.(*Cluster).Lint(0x9c?, {0x2efef68?, 0xc00059db30?})
        /home/aschleifer/tmp/popeye/internal/scrub/cluster.go:49 +0x4a
github.com/derailed/popeye/pkg.(*Popeye).runLinter(0xc00006d4a0, {0x2efef68?, 0xc00059db30?}, {{0x2ac9f73, 0x7}, {0x0, 0x0}, {0x0, 0x0}, {0x2ac9f73, ...}, ...}, ...)
        /home/aschleifer/tmp/popeye/pkg/popeye.go:280 +0x79
created by github.com/derailed/popeye/pkg.(*Popeye).lint in goroutine 1
        /home/aschleifer/tmp/popeye/pkg/popeye.go:250 +0x905

If it helps the k8s server is a AWS EKS instance in version 1.28.5.

/edit: for refence this is a 0.20.1 version build from the tag of a checkout of the repository.

@aschleifer
Copy link
Author

Looking at the error message about invalid semantic version again. Could it be that popeye doesn't like the version info from AWS EKS?

╰─ kubectl version
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.5-eks-5e0fdde

It seems AWS EKS is adding some hash to the version.

@derailed derailed added bug Something isn't working and removed question Further information is requested labels Feb 19, 2024
@derailed
Copy link
Owner

@aschleifer Great catch! Thank you for the details Andreas!
I think the issue in indeed semver related.
Let see if we're happier with v0.20.2...

@aschleifer
Copy link
Author

@derailed this looks much better. now it works again. Thanks for the fast fix. I will also update the Arch package to the latest version today.

derailed added a commit that referenced this issue Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants