Fix internal event name regex in CLI so it allows zeros
What does this MR do and why?
The regex for the names of events defined in the Internal Events CLI doesn't currently accept zeros. But it should. That's an oversight.
- /\A[a-z1-9_]+\z/
+ /\A[a-z0-9_]+\z/
This also bring the allowed character for event & metric names into alignment.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Run
ruby scripts/internal_events/cli.rb
- Select
New Event
- Input a description
- Input an invalid event time like
bad event name
& see the validation still works - Input a name with a 0 like
instance_upgraded_in_2024
and see that the name is allowed
Edited by Sarah Yasonik