Werk #17765: agent_datadog: Fix migration error

Component Checks & agents
Title agent_datadog: Fix migration error
Date Apr 8, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0b5 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

If there was a service level defined in the service_levels rule, that contained a "-" sign in the description, the update failed with an error similar to:

File "/omd/sites/klapplg_240b1/lib/python3.12/site-packages/cmk/rulesets/v1/form_specs/_composed.py", line 22, in _validate_name
    raise ValueError(f"'{name}' is not a valid, non-reserved Python identifier")
ValueError: 'test_-_bronze' is not a valid, non-reserved Python identifier

This has now been fixed and the update will go through without problems.

To the list of all Werks