fix: Resolve flaky rest query internal field test by running queries …#10239
fix: Resolve flaky rest query internal field test by running queries …#10239AbdullahZulfiqar2005 wants to merge 1 commit intoparse-community:alphafrom
Conversation
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe test logic for validating internal user field queries was refactored from parallel Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable sequence diagrams in the walkthrough.Disable the |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR addresses CI flakiness in the rest query query internal field test by preventing connection pool exhaustion from running many queries in parallel, aligning with the goal of stabilizing the test suite (closes #9273).
Changes:
- Replaced parallel
Promise.all([...map])execution with a sequentialfor...ofloop that awaits each query. - Ensured the rejection assertion and the master-key query run deterministically per internal field.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull Request
Issue
Closes #9273
Approach
The
rest query query internal fieldtest was marked as flaky due to anUnhandled promise rejectionerror during CI runs. This was caused by usingPromise.allcombined with.mapto fire 16 database queries simultaneously, which occasionally overwhelmed the test database connection pool.Fix: Replaced the parallel
Promise.allexecution with a sequentialfor...ofloop. This ensures each query is safelyawaitedbefore moving to the next, entirely eliminating the race conditions and connection exhaustion that were causing the unhandled rejections.Tasks
(No tasks apply as this is a fix to an existing test case).
Summary by CodeRabbit