Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] prevent undefined query result rows from breaking stats engine #2023

Merged
merged 1 commit into from Jan 11, 2024

Conversation

lukesonnet
Copy link
Contributor

A customer may have hit a case where rows here is actually undefined:

https://github.com/growthbook/growthbook/blob/main/packages/back-end/src/services/stats.ts#L99-L107

Because we just tell Typescript that something potentially undefined (query.result) should be ExperimentMetricQueryResponseRows, we should just be safe and let undefined be treated the same as an empty list if they get to this part.

Shouldn't happen if query status is "finished", but maybe it's related to allowing partially completed data to go to the stats engine.

Copy link

Your preview environment pr-2023-bttf has been deployed.

Preview environment endpoints are available at:

@lukesonnet lukesonnet merged commit 444a25c into main Jan 11, 2024
3 checks passed
@lukesonnet lukesonnet deleted the ls/undefined-rows branch January 11, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants