Page MenuHomePhabricator

[Customize GrowthBook] Customize GrowthBook UI
Closed, ResolvedPublic5 Estimated Story Points

Description

Description

Based on what we find via T422377: [Customize GrowthBook] Explore and evaluate what platform needs and what GrowthBook provides, we should customize the GrowthBook instances we have in both staging and production environments.

Regardless of the outcome for the spike above, there will be two different areas of work here:

  • Adding missing fields that are needed to register experiments to the GrowthBook UI. For example, a field to define a related Phabricator ticket or another one to set the Stream name that the corresponding piece of code will send events to. This first piece of work can be done simply by adding Custom Fields configured according to the specific needs for every specific field
  • New validation rules: Some additional validation rules to the ones that GrowthBook provides are needed. Custom Hooks is a very interesting feature for this purpose that is currently available for Features (but not for Experiments). We are with conversations with GrowthBook about having it also for Experiments. This would be the best way to address this piece of work, but they are others in case the first one cannot be used. So, the approach of the second one will depend on whether Custom Hooks are available or not for Experiments:

Acceptance criteria

  • Additional fields needed in the GrowthBook UI
  • Missing fields have been added according to the approach defined in the related Spike
  • Additional validation rules in the case Custom Hooks have been enabled:
  • Custom Hooks have been defined for all GrowthBook UI validation rules defined in the related Spike (not doable, Custom Hooks are not available yet for Experiments. We asked GrowthBook about that but we are still waiting for a response
  • Additional validation rules in the case Custom Hooks haven't been enabled:
  • A Pre-launch checklist has been defined with as many items as validation rules have been defined int he related Spike
  • Same validation rules have been implemented in the backend in the growthBookExperimentValidator component

Event Timeline

Adding reference here for Related OKRs and Owner/Team validation - https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/329#note_210225 discussion so we don't forget.

The main question is how to validate them as tags?

Example GB API response with single tags for each:

{
  "experiment": {
    "id": "exp_lf5cnmpdflnk3",
    "trackingKey": "sample-experiment",
    "name": "Sample Experiment",
    "type": "standard",
    "project": "prj_2Cb9wHcLGmgGaxzr9RdPyu",
    "hypothesis": "",
    "description": "Sample experiment for testing",
    "tags": [
      "Experiment Platform",
      "FY 25/26 SDS 2.3"
    ],
    "owner": "u_jtqkrpmmauur12",
    "dateCreated": "2026-05-20T02:17:13.348Z",
    "dateUpdated": "2026-05-27T03:47:30.239Z",
...

Example GB API response with multiple tags for each:

{
  "experiment": {
    "id": "exp_lf5cnmpdflnk3",
    "trackingKey": "sample-experiment",
    "name": "Sample Experiment",
    "type": "standard",
    "project": "prj_2Cb9wHcLGmgGaxzr9RdPyu",
    "hypothesis": "",
    "description": "Sample experiment for testing",
    "tags": [
      "Experiment Platform",
      "FY 25/26 SDS 2.3",
      "Editing",
      "FY25/26 WE 1.4",
      "FY25/26 WE 3.1",
      "Data Engineering"
    ],
    "owner": "u_jtqkrpmmauur12",
    "dateCreated": "2026-05-20T02:17:13.348Z",
    "dateUpdated": "2026-05-27T04:13:38.309Z",
    "archived": false,
...

I can spin this off into a subtask of this ticket if that would be helpful

Adding reference here for Related OKRs and Owner/Team validation - https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/329#note_210225 discussion so we don't forget.

The main question is how to validate them as tags?

I was thinking of something like what we have in Test Kitchen UI right now. We have somwhere all existing okrs and teams (in a database table and harcoded, respectively) so we could check if there is, at least, a tag for an OKR and also for a Team. We cannot validate whether they are the right ones, there is no way for now to validate that the experiment config has been tagged with the right team (as it's happening right now with TKUI) but we can check that, at least, one OKR and one Team are present in the experiment configuration. It's what TKUI is doing right now via a couple of MultiSelect fields for OKRs and related teams

The above is something that the backend could do pretty easily. Regarding the frontend side, we would depend on Custom Hooks. If we managed to get Custom Hooks for experiments, GrowthBook UI could probably check inline that an experiments has been tagged at least with one OKR and one team (Custom Hooks allows to make API request when extending the validation logic in the GB UI). At this time we have a local API endpoint for OKRs but, if needed, we could implement the corresponding one for Teams (and also the corresponding database table). It would be just a bit of additional work (same thing we have for OKRs but for teams).

I have updated the GrowthBook customization/validation document according to the above. I had forgotten to mention all this there.

Sfaci updated the task description. (Show Details)
KReid-WMF set the point value for this task to 5.

For now, because the related conversation with GrowthBook is not progressing, we will start this work considering that Custom Hooks won't be updated to support also Experiments. So, if nothing changes, Pre-Launch checklist + backend work will be the plan to add the needed validation rules