Page MenuHomePhabricator

[Customize GrowthBook] Add TK backend validation for GrowthBook experiments
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

https://phabricator.wikimedia.org/T422943#11998988 indicates we will not have Custom Hooks available for GrowthBook experiments, thereby necessitating backend validation during ingestion on the TK backend.

Canonical GrowthBook customization/validation spreadsheet captures validation rules.

Description

Per canonical spreadsheet tracking validation rules, add the following backend validation rules:

  • Tracking Key (machine readable name)
    • must be unique + varnish pattern
    • GB experiment prevails when two experiments (GB and TKUI) have same machine-readable name
  • Related OKRs (defined as tag in GB)
    • Check if present via local API for OKRs
    • We could use the local API we have for OKRs to check if at least one OKR if present as a tag
  • Teams (defined as tag in GB)
    • Check if present via local API for Teams
    • Same thing as for OKRs. In this case we would need to build that local API + database table for teams
  • Stream Name
    • required custom field validated via Action API
  • Traffic per Wiki
    • check if present
    • check here that 0 <= length(wikis) <= 100
  • Risk Level
  • Security and Legal Review
    • check via current validation logic
    • Mandatory is risk_level is Tier 2: Medium or Tier 1: High

Acceptance Criteria

  • Validation rules are implemented
  • When any of the validation rules above fails, the experiment status is set to Draft as a way to "stop" it
  • Relevant tests added/updated

Event Timeline

cjming triaged this task as High priority.Jun 10 2026, 7:33 PM
cjming set the point value for this task to 3.
cjming updated the task description. (Show Details)
cjming moved this task from Incoming to Experiment Platform Sprint 25 on the Test Kitchen board.
cjming updated the task description. (Show Details)
Sfaci updated the task description. (Show Details)

Working on OKRs and Teams validation in a follow up MR -- all other fields should be gtg for review

quick Q on OKR + Team tags -- are these going to be required fields in GB UI? They are optional fields in TK UI so presumably they will stay optional in GB UI?

so confirming that in terms of validation, empty tags for either OKR or Team should NOT make an experiment invalid?

what should be the validation then if they remain optional? the spreadsheet says "Check if present via local API..." but if they are optional, is this still necessary?

Sfaci renamed this task from [GrowthBook Integration] Add TK backend validation for GrowthBook experiments to [Customize GrowthBook] Add TK backend validation for GrowthBook experiments.Mon, Jun 15, 12:39 PM

Change #1302881 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[operations/deployment-charts@master] Test Kitchen UI: Deploy v1.4.2 release to staging

https://gerrit.wikimedia.org/r/1302881

Change #1302881 merged by jenkins-bot:

[operations/deployment-charts@master] Test Kitchen UI: Deploy v1.4.3 release to staging

https://gerrit.wikimedia.org/r/1302881

Change #1303980 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[operations/deployment-charts@master] Test Kitchen UI: Deploy v1.4.4 release to production

https://gerrit.wikimedia.org/r/1303980

Change #1303980 merged by jenkins-bot:

[operations/deployment-charts@master] Test Kitchen UI: Deploy v1.4.4 release to production

https://gerrit.wikimedia.org/r/1303980