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(backend): Revert non-async routes that are changed to async #8734

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Nov 21, 2024

Pyro calls can block the async event loop, #8519 changed some of the non-async block into async risking blocking the FastAPI event loop.

Changes 🏗️

Revert routes that uses pyro called back to non-async routes.

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • ...
Example test plan
  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

For configuration changes:

  • .env.example is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

@majdyz majdyz requested a review from Swiftyos November 21, 2024 10:18
@majdyz majdyz requested a review from a team as a code owner November 21, 2024 10:18
@majdyz majdyz requested review from Pwuts and removed request for a team November 21, 2024 10:18
@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end size/s labels Nov 21, 2024
Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

8519 - Partially compliant

Compliant requirements:

  • Move endpoints from '/api/x' to '/api/v1/x'

Non-compliant requirements:

  • Move to a standard FastAPI server
  • Ensure openapi schemas match exactly
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

API Design
Verify that removing async from these endpoints is the correct approach for handling Pyro calls. Consider if there are alternative patterns that could maintain async without blocking the event loop.

Documentation
The FIXME comment about proper return type should be addressed before merging. Return types should be properly specified for API endpoints.

@github-actions github-actions bot changed the base branch from master to dev November 21, 2024 10:18
@majdyz majdyz enabled auto-merge (squash) November 21, 2024 10:19
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 04e214c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/673f08ed7b0063000857d68a

Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit a8ed0d0
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/673f0e580cd2a20008ed7138

@github-actions github-actions bot added size/m and removed size/s labels Nov 21, 2024
@majdyz majdyz merged commit 6954f4e into dev Nov 21, 2024
15 checks passed
@majdyz majdyz deleted the zamilmajdy/revert-converted-function-to-async branch November 21, 2024 10:46
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.

2 participants