Skip to content

panic: utf8 name validation requested but model.NameValidationScheme is not set to UTF8 in a test file #15530

@machine424

Description

@machine424

What did you do?

This is probably a known/temporary limitation.

Adding a new test in #15529

got

2024/12/03 17:19:06 http: TLS handshake error from 127.0.0.1:52972: remote error: tls: bad certificate
--- FAIL: TestTargetsFromGroupWithLabelKeepDrop (0.00s)
    --- FAIL: TestTargetsFromGroupWithLabelKeepDrop/no_relabeling (0.00s)
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 [recovered]
	panic: utf8 name validation requested but model.NameValidationScheme is not set to UTF8

(had no problem running the test locally)

What did you expect to see?

no panic, maybe the global var should be overridden in an init or sth.
Not sure is this is the way to go.
how to be sure it's set for all tests files?

What did you see instead? Under which circumstances?

Had to set metric_name_validation_scheme: legacy to get around the panic

System information

No response

Prometheus version

No response

Prometheus configuration file

No response

Alertmanager version

No response

Alertmanager configuration file

No response

Logs

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions