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

grr apply crash with a PrometheusRuleGroup #200

Closed
MrFreezeex opened this issue Jan 21, 2022 · 1 comment
Closed

grr apply crash with a PrometheusRuleGroup #200

MrFreezeex opened this issue Jan 21, 2022 · 1 comment

Comments

@MrFreezeex
Copy link
Contributor

If there is a PrometheusRuleGroup and you try to grr apply you got the following crash:

time="2022-01-21T15:20:36+01:00" level=debug msg="Getting the remote value for `PrometheusRuleGroup.error:PrometheusRuleGroup node-mixin requires a namespace metadata entry`"
panic: interface conversion: interface {} is nil, not string
goroutine 1 [running]:
github.com/mrfreezeex/grizzly/pkg/grizzly.(*Resource).GetMetadata(...)
	/home/mr_freezeex/go/src/github.com/mrfreezeex/grizzly/pkg/grizzly/providers.go:72
github.com/mrfreezeex/grizzly/pkg/grafana.(*RuleHandler).GetRemote(0x2c09780, 0xc000d76540, 0x1bc41e2, 0x21, 0xc000c0bc30)
	/home/mr_freezeex/go/src/github.com/mrfreezeex/grizzly/pkg/grafana/rules-handler.go:96 +0x299
github.com/mrfreezeex/grizzly/pkg/grizzly.Apply(0xc000b4ca00, 0x5, 0x8, 0x5, 0x0)
	/home/mr_freezeex/go/src/github.com/mrfreezeex/grizzly/pkg/grizzly/workflow.go:248 +0x243
main.applyCmd.func1(0xc0006477c0, 0xc00078f7d0, 0x1, 0x3, 0x0, 0x0)
	/home/mr_freezeex/go/src/github.com/mrfreezeex/grizzly/cmd/grr/workflow.go:123 +0x139
main.initialiseLogging.func1(0xc0006477c0, 0xc00078f7d0, 0x1, 0x3, 0x0, 0x0)
	/home/mr_freezeex/go/src/github.com/mrfreezeex/grizzly/cmd/grr/workflow.go:244 +0xab
github.com/go-clix/cli.(*Command).execute(0xc0006477c0, 0xc00078f7a0, 0x3, 0x3, 0xc0006477c0, 0xc00078f7a0)
	/home/mr_freezeex/go/pkg/mod/github.com/go-clix/cli@v0.2.0/command.go:118 +0x34e
github.com/go-clix/cli.(*Command).Execute(0xc0002fdae0, 0xc0006d9f28, 0xa)
	/home/mr_freezeex/go/pkg/mod/github.com/go-clix/cli@v0.2.0/command.go:76 +0x105
main.main()
	/home/mr_freezeex/go/src/github.com/mrfreezeex/grizzly/cmd/grr/main.go:43 +0x24b

A possible workaround is to use -t Dashboard*.

@malcolmholmes
Copy link
Collaborator

Are you still having this issue? If so, I'll need more info, e.g. the version of Grizzly you're using and an example of a resource that triggers this outcome.

I'm going to assume this is stale and close this issue. If still relevant, please feel free to re-open.

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

No branches or pull requests

2 participants