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(core): chunk user loading into batches of max 400 items #6858

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Jun 5, 2024

Description

Fixes a case where passing a large number of users to retrieve from the user store would cause too large of a request to be sent. This chunks the number of users to fetch into batches of 400.

What to review

  • User fetching works as intended

Testing

Added tests for the user store in general, there was previously only tests for the 403 case - now it should have the majority of the functionality covered (some missing tests for the getUser function, but it calls getUsers internally - can add those later)

Notes for release

  • Fixes an issue where projects with a large amount of users would sometimes get a request error when loading user info

@rexxars rexxars requested a review from a team as a code owner June 5, 2024 15:49
@rexxars rexxars requested review from juice49 and removed request for a team June 5, 2024 15:49
Copy link

vercel bot commented Jun 5, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:51pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:51pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:51pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:51pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:51pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Jun 5, 2024 3:51pm

Copy link
Contributor

github-actions bot commented Jun 5, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Jun 5, 2024

Component Testing Report Updated Jun 5, 2024 3:58 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 17s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 3s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 21s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 32s 11 0 1

Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@rexxars rexxars added this pull request to the merge queue Jun 5, 2024
Merged via the queue into next with commit 4531750 Jun 5, 2024
44 checks passed
@rexxars rexxars deleted the fix/sdx-1382/chunk-user-loading branch June 5, 2024 17:42
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