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

[Bug]: anic: utf8 name validation requested but model.NameValidationScheme is not set to UTF8 #1361

Open
3 of 4 tasks
east4ming opened this issue Jan 15, 2025 · 0 comments
Open
3 of 4 tasks

Comments

@east4ming
Copy link

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

v0.3.48

Kubernetes Version

v1.30.6

Host OS and its Version

Ubuntu 24.04

Steps to reproduce

  1. k8sgpt integrations activate prometheus -n monitoring-system
  2. k8sgpt analyze --filter PrometheusConfigValidate --namespace monitoring-system --explain
$ k8sgpt analyze --filter PrometheusConfigValidate --namespace monitoring-system --explain
panic: utf8 name validation requested but model.NameValidationScheme is not set to UTF8 [recovered]
	panic: utf8 name validation requested but model.NameValidationScheme is not set to UTF8

goroutine 97 [running]:
gopkg.in/yaml%2ev2.handleErr(0xc001096c68)
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/yaml.go:249 +0x6d
panic({0x39318c0?, 0x4f44d30?})
	/home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:785 +0x132
github.com/prometheus/prometheus/config.(*ScrapeConfig).Validate(0xc000e1f188, {0x6fc23ac00, 0x2540be400, {0x7a51220, 0x4, 0x4}, 0x6fc23ac00, 0x0, {0x0, 0x0}, ...})
	/home/runner/go/pkg/mod/github.com/prometheus/[email protected]/config/config.go:836 +0x42c
github.com/prometheus/prometheus/config.(*Config).UnmarshalYAML(0xc000812588, 0x7fffb12cb110?)
	/home/runner/go/pkg/mod/github.com/prometheus/[email protected]/config/config.go:397 +0x4c7
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc000e132c0, 0xc000eb0ee0, {0x7fffb12cb110, 0xc000812588})
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/decode.go:270 +0x94
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc000e132c0, 0xc000eb0ee0, {0x42d0480?, 0xc000812588?, 0xc000618268?})
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/decode.go:313 +0x256
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc000e132c0, 0xc000eb0ee0, {0x42d0480?, 0xc000812588?, 0x13e96cb?})
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/decode.go:364 +0x13b
gopkg.in/yaml%2ev2.(*decoder).document(...)
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/decode.go:384
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0x3d91f00?, 0xc000812588?, {0x42d0480?, 0xc000812588?, 0x0?})
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/decode.go:360 +0x110
gopkg.in/yaml%2ev2.unmarshal({0xc001178000, 0x16b62, 0x18000}, {0x3d91f00, 0xc000812588}, 0x0)
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/yaml.go:148 +0x376
gopkg.in/yaml%2ev2.Unmarshal(...)
	/home/runner/go/pkg/mod/gopkg.in/[email protected]/yaml.go:81
github.com/k8sgpt-ai/k8sgpt/pkg/integration/prometheus.unmarshalPromConfigBytes({0xc0005a1600, 0xc92, 0xc93})
	/home/runner/work/k8sgpt/k8sgpt/pkg/integration/prometheus/config_analyzer.go:282 +0x165
github.com/k8sgpt-ai/k8sgpt/pkg/integration/prometheus.(*ConfigAnalyzer).Analyze(0xc000c94000?, {0xc000e80c90, {0x4f9efd8, 0x7a97540}, {0x7fffffff8ea9, 0x11}, {0x0, 0x0}, {0x4f9f0b8, 0x7a46e20}, ...})
	/home/runner/work/k8sgpt/k8sgpt/pkg/integration/prometheus/config_analyzer.go:64 +0x145
github.com/k8sgpt-ai/k8sgpt/pkg/analysis.(*Analysis).executeAnalyzer(0xc000288960, {0x4f4f3e0?, 0x7a97540?}, {0xc001778930, 0x18}, {0xc000e80c90, {0x4f9efd8, 0x7a97540}, {0x7fffffff8ea9, 0x11}, ...}, ...)
	/home/runner/work/k8sgpt/k8sgpt/pkg/analysis/analysis.go:297 +0x118
created by github.com/k8sgpt-ai/k8sgpt/pkg/analysis.(*Analysis).RunAnalysis in goroutine 1
	/home/runner/work/k8sgpt/k8sgpt/pkg/analysis/analysis.go:265 +0x565

Expected behaviour

Fix it

Actual behaviour

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Proposed
Development

No branches or pull requests

1 participant