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

fix: prevent generation of charts if number of responses exceed limit #6937

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

sebastianwzq
Copy link
Contributor

@sebastianwzq sebastianwzq commented Nov 29, 2023

Problem

Charts is lagging for forms with a large number of responses. The current limitation of 1000 responses is limited at the DB query level and although responses will not be computed for charts, they will still be decrypted, which could result in the lagginess.

Fixed another issue where chromium version upgrades are causing deployment to fail.

Closes FRM-1550

Solution

Show empty charts and prevent decryption if total response count exceeds a configured limit.
[Update] Updating Chromium as the Chromium version currently available on alpine3.18 is 119.0.6045.159-r0

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible

Before & After Screenshots

BEFORE:
Screenshot 2023-11-30 at 1 28 26 PM

AFTER:
Screenshot 2023-11-30 at 1 28 12 PM

Deployment

  • Add charts-max-response-count to Growthbook and set it to 1000

Tests

  • No charts will be showed if total response count exceeds limit.

Copy link
Contributor

@wanlingt wanlingt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! can add a deployment note to add this new feature flag to growthbook

Copy link

linear bot commented Nov 30, 2023

FRM-1550 Prevent generation of charts if number of responses exceed limit

Description

Problem

Charts is lagging for forms with a large number of responses. The current limitation of 1000 responses is limited at the DB query level and although responses will not be computed for charts, they will still be decrypted, which could result in the lagginess.

https://opengovproducts.slack.com/archives/CKHLS3W3X/p1701252497787879

Solution

Show empty charts and prevent decryption if total response count exceeds a limit configured on growthbook.

@@ -9,7 +9,7 @@ RUN chown 1001:1001 /mongodb_data
ENV CHROMIUM_BIN=/usr/bin/chromium-browser
ENV NODE_ENV=development
# --openssl-legacy-provider flag
# A breaking change in the SSL provider was introduced in node 17. This caused
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't make any whitespace changes not sure why they are reflected. Linting?

@sebastianwzq sebastianwzq merged commit 63974d4 into develop Dec 4, 2023
32 of 34 checks passed
@sebastianwzq sebastianwzq deleted the fix/limit-charts branch December 4, 2023 02:38
@wanlingt wanlingt mentioned this pull request Dec 6, 2023
3 tasks
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