Update validation rules for optional fields, variation ids

What?

  • Warn on missing OKR, team, and description instead of drafting experiments
  • Draft experiments with numeric variation ids
  • The OKR tag is validated against the fixed values 'OKR Work' and 'Essential Work' rather than database-loaded OKR names. The specific objectives belong in the optional related_okrs custom field.
  • The team tag only has to be present
  • Missing description, OKR tag, and team tag are now warnings - the experiment stays valid and keeps running, and each is logged and counted in the new growthbook_experiment_warnings_total metric.
  • Draft experiments whose variation ids are still GrowthBook defaults
  • Relevant tests updated

Why?

  • Missing metadata should not stop a running experiment so the checks in this MR produce warnings and leave the experiment running.
  • GrowthBook seeds a new experiment with integer variation keys ('0', '1', ...). A key left as a bare integer means that variation has not been mapped to its feature code which breaks the experiment. We cannot verify that the keys match the code, only that they were changed off the integer defaults, so the poller now hard-validates that.

Bug: T429420
Assisted-by: Claude Opus 4.8

Edited by Clare Ming

Merge request reports

Loading