Horreum icon indicating copy to clipboard operation
Horreum copied to clipboard

Experiment baseline filter function syntax errors are unreported to the user in the UI.

Open whitingjr opened this issue 1 year ago • 0 comments

Describe the bug

When an Experiment Baseline filter function has a syntax error the UI does not feedback this as a problem to the user. Either immediately or, when subsequently when running the Experiment.

There are no exception stack traces. Either in the UI or on the horreum-backend service.

What happens in the UI is that clicking the Evaluate experiment window is loaded but shows no information. As can be seen in this screen-shot.

empty-experiment-evalutation-window-for-dataset

This occurs for the following baseline filter function

value => value === 168 // this is the Perf CI job build number, 7.0.0.Final release

When the Javascript filter function is executed this is the error thrown by the compiler.

Baseline filter failed: SyntaxError: Unnamed:3:0 Expected ) but found __func3
__func3(__obj3)
^
 Code: const __obj3 = 166;
const __func3 = __x => (!!(value => value === 168 // this is the Perf CI job build number, 7.0.0.Final release)(__x));
__func3(__obj3)

This syntax error needs to be reported to the user at some stage when using the UI. Ideally a DEBUG log message viewer in the UI when the experiment is run.

To Reproduce

Create a Test, upload runs, add an Experiment and define the baseline filter function.

Version

0.11.6

whitingjr avatar Mar 04 '24 11:03 whitingjr