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

NONE: fix processing large file jsons from get file #246

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

Roystbeef
Copy link
Collaborator

We were running into Cannot create a string longer than 0x1fffffe8 characters errors that we were able to pinpoint to the response.data call when calling get file.

This is because the JSON string that gets returned from Figma can be over 512 MB in length. So instead of treating it as a single string, this PR updates that logic so we stream in and build up the JSON object for the file.

Test Plan

  • Create a very large file in Figma
  • Try to attach the file to an issue
  • Previously see that that it throws the error above
  • With the changes, see that it's able to successfully parse the file json
  • Assert that existing tests pass

@Roystbeef Roystbeef requested a review from jvrankul23 October 22, 2024 21:59
@Roystbeef Roystbeef merged commit 058ab90 into main Oct 22, 2024
2 checks passed
@Roystbeef Roystbeef deleted the roy/fix-large-file-jsons branch October 22, 2024 22:35
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