Page MenuHomePhabricator

Test Kitchen UI crashes when changing the machine-readable name of an experiment
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Register an experiment (the specific configuration seems to be irrelevant)
  • Update the experiment above to change its machine-readable name (if the experiment hasn't been turned on, this is allowed)

What happens?:

The application crashes during the validation process in the server side (probably because there is no value for that currentData object because it's referring to something, the experiment with the new name, that don't exist yet?):

. . . . ./validation/index.js:52
        currentData.sample_rate = getSampleRateForCurrentDataValidation(currentData.sample_rate);
                                                                                    ^
TypeError: Cannot read properties of null (reading 'sample_rate')

What should have happened instead?:

The machine-readable name should be modified

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Test Kitchen UI v1.2.0

Other information (browser name/version, screenshots, etc.):

Event Timeline

My first guess is that the bug is caused when updating the machine-readable name (also known as slug in the codebase) because we use it to get an instance of that instrument/experiment as a reference to check, later during validation, if some fields have been modified (not everything is allowed). At that moment, because the machine-readable name is a new one, we get nothing and some validation fail because we are expecting to have something to get from what we consider the current data

sfaci opened https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/294

Stop validating sample_rate and start_date in the server when machine-readable is changed

phuedx merged https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/294

Stop validating sample_rate and start_date in the server when machine-readable is changed

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

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

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

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

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

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

Change #1239307 merged by jenkins-bot:

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

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

Change #1239308 merged by jenkins-bot:

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

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