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 async code calling blocking sync code #3342

Merged
merged 4 commits into from
Aug 13, 2024
Merged

Fix async code calling blocking sync code #3342

merged 4 commits into from
Aug 13, 2024

Conversation

dekkers
Copy link
Contributor

@dekkers dekkers commented Aug 12, 2024

Changes

This fixes async functions calling blocking sync code. After spotting this in a code review, I checked and saw that we already did this incorrectly in a few other places. Async code should not call blocking sync code because that will block the whole async event loop.

QA notes

It is hard to verify that it was not correct before, because the only effect is that the code would block in a place where it shouldn't.


Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@dekkers dekkers requested a review from a team as a code owner August 12, 2024 08:22
octopoes/octopoes/api/router.py Outdated Show resolved Hide resolved
bytes/bytes/api/router.py Outdated Show resolved Hide resolved
boefjes/boefjes/api.py Show resolved Hide resolved
@stephanie0x00
Copy link
Contributor

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.
  • I checked the logs for errors and/or warnings and made issues where necessary

What works:

Looks good. Onboarding works, scanning works, findings are created.

What doesn't work:

n/a

Bug or feature?:

n/a

@underdarknl underdarknl merged commit 6868a94 into main Aug 13, 2024
26 checks passed
@underdarknl underdarknl deleted the fix-async-defs branch August 13, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants