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

Remove response limit from fides.js #4878

Conversation

andres-torres-marroquin
Copy link
Contributor

Closes #PROD-2031

Description Of Changes

By default Next.JS throws "API Routes Response Size Limited to 4MB" when the response is larger than 4MB, disabling this will not throw data in the console. But this can allow us to have very big responses without noticing anymore. From the Next.JS docs: API Routes in Next.js are designed to deliver quick responses and are not built to support the transmission of large amounts of data.

Code Changes

  • Added a config variable to fides-js.ts to change the api.responseLimit to false

Steps to Confirm

  • Change the script variable on fides-js.ts file to include a lot of comments, just 4MB of it, and you'll get a message on the dev web server shell. After this change gets into main, the message will be gone.

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview May 13, 2024 3:18pm

…onse-Size-Limited-to-4MB-error-when-generating-large-fides.js-responses
Copy link

cypress bot commented May 9, 2024

Passing run #7690 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 6067f96 into 29bad50...
Project: fides Commit: 7da902a46e ℹ️
Status: Passed Duration: 00:33 💡
Started: May 10, 2024 9:52 PM Ended: May 10, 2024 9:53 PM

Review all test suite changes for PR #4878 ↗︎

Copy link
Contributor

@galvana galvana left a comment

Choose a reason for hiding this comment

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

This works as expected! I added a long description to one of the banner descriptions and I was able to create a payload over 4MB in size from fides.js. The error doesn't actually prevent the download but removing this limit eliminates this false alarm that might cause concern for some users.

@galvana galvana merged commit 40c3b8d into main May 13, 2024
12 checks passed
@galvana galvana deleted the PROD-2031-Privacy-Center-Fix-API-Routes-Response-Size-Limited-to-4MB-error-when-generating-large-fides.js-responses branch May 13, 2024 15:23
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.

2 participants