Version where bug was found:
6.5.0
Describe the bug
When an app context includes uppercase letters, updating an experiment fails with a 400 Bad Request error.
It appears that the system converts the app context to lowercase during the experiment update request, which causes it to no longer match the app context defined in CONTEXT_METADATA.
To Reproduce
Steps to reproduce the behavior:
- Add the following to the
.env file and start UpGrade:
CONTEXT_METADATA={"ExampleMathApp":{"CONDITIONS":["control","hint_button"],"GROUP_TYPES":[],"EXP_IDS":["problem_123_hint_support"],"EXP_POINTS":["problem_page"]}}
METRICS=[{"metrics":[{"metric":"completionRate","datatype":"categorical","allowedValues":["COMPLETED","NOT_COMPLETED"]},{"metric":"timeOnTask","datatype":"continuous"}],"contexts":["ExampleMathApp"]}]
- Create an experiment using the
ExampleMathApp app context.
- Try to add a decision point to the experiment.
- Observe the 400 Bad Request error from
PUT /api/experiments/:id:
{
"name": "BadRequestError",
"message": "The app context \"examplemathapp\" is not defined in CONTEXT_METADATA."
}
Expected behavior
App contexts with uppercase letters should be supported, or the casing should be handled consistently across CONTEXT_METADATA, METRICS, and experiment update requests.
Version where bug was found:
6.5.0
Describe the bug
When an app context includes uppercase letters, updating an experiment fails with a 400 Bad Request error.
It appears that the system converts the app context to lowercase during the experiment update request, which causes it to no longer match the app context defined in
CONTEXT_METADATA.To Reproduce
Steps to reproduce the behavior:
.envfile and start UpGrade:ExampleMathAppapp context.PUT /api/experiments/:id:{ "name": "BadRequestError", "message": "The app context \"examplemathapp\" is not defined in CONTEXT_METADATA." }Expected behavior
App contexts with uppercase letters should be supported, or the casing should be handled consistently across
CONTEXT_METADATA,METRICS, and experiment update requests.