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

[3.x] Fix async OP behaviors on server (oauth packages) #13127

Merged
merged 7 commits into from May 13, 2024

Conversation

nachocodoner
Copy link
Member

@nachocodoner nachocodoner commented May 8, 2024

OSS-411

Issue

Context: https://forums.meteor.com/t/meteor-3-0-rc-0-is-out/61515/28

In some parts of the code, findOne is still being utilized sync on Meteor 3.x, resulting in errors asking for migration, such as: Error: findOne + is not available on the server. Please use findOneAsync() instead.

Fix

Review all occurrences of findOne and other operations needing asynchronous migration on Meteor 3.x packages. Additionally, I'll supply a few regression tests to ensure coverage of the affected flow, enabling us to detect any missing adaptions in the future through test failures.

The regression test triggering properly the requirement of this migration as showed in the next example:

image

New test helpers

I've added two new test helpers:

  • mockBehaviours: This acts as a mock to halt the run on an entire module. Useful for testing specific flows while ignoring unwanted side-effects.

  • waitUntil: Prevents flakiness by awaiting a test assert with a timeout. It continuously checks for the condition and exits early upon its occurrence. This approach is more effective in overcoming flakiness.

Copy link

netlify bot commented May 8, 2024

Deploy Preview for v3-meteor-api-docs canceled.

Name Link
🔨 Latest commit 5483b70
🔍 Latest deploy log https://app.netlify.com/sites/v3-meteor-api-docs/deploys/6642129684b61400085852b6

Copy link

netlify bot commented May 8, 2024

Deploy Preview for v3-migration-docs canceled.

Name Link
🔨 Latest commit 5483b70
🔍 Latest deploy log https://app.netlify.com/sites/v3-migration-docs/deploys/66421296048c8f00081d6ff6

@nachocodoner nachocodoner marked this pull request as ready for review May 9, 2024 14:17
@nachocodoner nachocodoner changed the title [3.x] Fix async OP behaviors on server [3.x] Fix async OP behaviors on server (oauth packages) May 9, 2024
@manueltimita
Copy link

I saw this just as I submitted #13137 (this issue kept on bugging us in staging). Noticed you fixed the issue in the Google OAuth package.

@StorytellerCZ StorytellerCZ added this to the Release 3.0 milestone May 11, 2024
@nachocodoner nachocodoner merged commit 47e2861 into release-3.0 May 13, 2024
12 checks passed
@nachocodoner nachocodoner deleted the 411-fix-async-op branch May 13, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants