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

feat(task-processor): validate arguments passed to task processor functions #2747

Merged
merged 5 commits into from
Sep 6, 2023

Conversation

matthewelwell
Copy link
Contributor

Changes

Validates the inputs to tasks when running synchronously or in a separate thread. Primary use case for this is to catch errors with serialization before going into production.

How did you test this code?

Added unit tests. Also, all existing calls to the task processor should subsequently be validated in the unit tests.

@vercel
Copy link

vercel bot commented Sep 5, 2023

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 9:44am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 9:44am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 9:44am

@github-actions github-actions bot added the api Issue related to the REST API label Sep 5, 2023
@matthewelwell matthewelwell changed the title Feature(task processor)/validate arguments feat(task-processor): validate arguments passed to task processor methods Sep 5, 2023
@matthewelwell matthewelwell changed the title feat(task-processor): validate arguments passed to task processor methods feat(task-processor): validate arguments passed to task processor functions Sep 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

Uffizzi Preview deployment-35251 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2023

Codecov Report

Patch coverage: 95.00% and no project coverage change.

Comparison is base (73705d5) 95.48% compared to head (44a3c65) 95.49%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2747   +/-   ##
=======================================
  Coverage   95.48%   95.49%           
=======================================
  Files         993      993           
  Lines       27931    27967   +36     
=======================================
+ Hits        26669    26706   +37     
+ Misses       1262     1261    -1     
Files Changed Coverage Δ
api/tests/unit/audit/test_unit_audit_tasks.py 100.00% <ø> (ø)
...k_processor/test_unit_task_processor_decorators.py 94.02% <90.47%> (-1.63%) ⬇️
api/task_processor/decorators.py 93.84% <100.00%> (+7.30%) ⬆️
api/task_processor/exceptions.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewelwell matthewelwell requested review from a team and novakzaballa September 6, 2023 09:55
Copy link
Contributor

@novakzaballa novakzaballa left a comment

Choose a reason for hiding this comment

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

LGTM

@matthewelwell matthewelwell merged commit d947474 into main Sep 6, 2023
@matthewelwell matthewelwell deleted the feature(task-processor)/validate-arguments branch September 6, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants