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: Audit Log records don't get created with threaded task processing #2958

Merged
merged 6 commits into from
Nov 13, 2023

Conversation

khvn26
Copy link
Member

@khvn26 khvn26 commented Nov 10, 2023

Closes #2949

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

  • Wrapped threaded task runs in transaction.on_commit by default, made it configurable
  • Added docs, functioning typing
  • Added debug logging for all webhook errors

How did you test this code?

Unit tests cover the new code paths.
IDE (VSCode + pylance) highlights the task handler methods and attributes correctly.

 - Wrap threaded task runs in `transaction.on_commit` by default, make it configurable
 - Add docs, functioning typing
@khvn26 khvn26 requested review from a team and matthewelwell and removed request for a team November 10, 2023 22:56
@khvn26 khvn26 self-assigned this Nov 10, 2023
Copy link

vercel bot commented Nov 10, 2023

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

Name Status Preview Comments Updated (UTC)
docs 🛑 Canceled (Inspect) Nov 13, 2023 11:14am
flagsmith-frontend-preview 🛑 Canceled (Inspect) Nov 13, 2023 11:14am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 11:14am

Copy link
Contributor

github-actions bot commented Nov 10, 2023

Uffizzi Preview deployment-40554 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8eedf55) 95.64% compared to head (a291cb4) 95.65%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2958   +/-   ##
=======================================
  Coverage   95.64%   95.65%           
=======================================
  Files        1012     1012           
  Lines       29181    29220   +39     
=======================================
+ Hits        27911    27949   +38     
- Misses       1270     1271    +1     
Files Coverage Δ
api/app/settings/common.py 88.19% <ø> (ø)
api/task_processor/decorators.py 100.00% <100.00%> (ø)
api/webhooks/webhooks.py 95.45% <100.00%> (+0.33%) ⬆️
...k_processor/test_unit_task_processor_decorators.py 93.45% <96.15%> (+0.51%) ⬆️

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

@khvn26 khvn26 added this pull request to the merge queue Nov 13, 2023
Merged via the queue into main with commit 716b228 Nov 13, 2023
20 checks passed
@khvn26 khvn26 deleted the fix/threaded-audit-log-fails-to-create branch November 13, 2023 12:18
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.

Audit Log records don't get created with task processor in threaded mode
3 participants