-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(taskworker) Validate JSON compatibity of task parameters on direct calls #92420
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
Merged
+81
−52
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We often test tasks by calling the functions directly. We should validate those call sites to ensure that they are not violating JSON encodable parameters. Refs #91927
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #92420 +/- ##
===========================================
+ Coverage 46.23% 87.97% +41.73%
===========================================
Files 10216 10223 +7
Lines 585990 586078 +88
Branches 22798 22669 -129
===========================================
+ Hits 270930 515581 +244651
+ Misses 314630 70069 -244561
+ Partials 430 428 -2 |
evanh
approved these changes
May 29, 2025
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
andrewshie-sentry
pushed a commit
that referenced
this pull request
Jun 2, 2025
…ct calls (#92420) We often write test where task logic is tested via direct function calls, and assertions for scheduled calls done with mocks. Because of this we can't currently catch JSON incompatibilities in task parameter. With these changes during tests we will validate that direct function calls also have JSON compatible parameters which should reduce surprises in production.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We often write test where task logic is tested via direct function calls, and assertions for scheduled calls done with mocks. Because of this we can't currently catch JSON incompatibilities in task parameter.
With these changes during tests we will validate that direct function calls also have JSON compatible parameters which should reduce surprises in production.