Skip to content

Fix internal event name regex in CLI so it allows zeros

Sarah Yasonik requested to merge syasonik-master-patch-57599 into master

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

  1. Run ruby scripts/internal_events/cli.rb
  2. Select New Event
  3. Input a description
  4. Input an invalid event time like bad event name & see the validation still works
  5. Input a name with a 0 like instance_upgraded_in_2024 and see that the name is allowed
Edited by Sarah Yasonik

Merge request reports

Loading