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(backend): Minimize the non caught error logic between graph exec creation and queueing #9306

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Jan 21, 2025

There should be no possibly failing code between graph exec creation and the actual queueing.
It could risk the graph execution being stuck on the QUEUED status.

Changes πŸ—οΈ

Moved the node exec creation and status update to be inside the graph execution logic.

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 a team as a code owner January 21, 2025 10:17
@majdyz majdyz requested review from ntindle and Swiftyos and removed request for a team January 21, 2025 10:17
Copy link

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
πŸ§ͺΒ No relevant tests
πŸ”’Β No security concerns identified
⚑ Recommended focus areas for review

Error Handling

The new code moves status updates inside a try block but doesn't handle potential database update failures that could still leave executions in an inconsistent state

exec_update = cls.db_client.update_execution_status(
    node_exec.node_exec_id, ExecutionStatus.QUEUED, node_exec.data
)
cls.db_client.send_execution_update(exec_update)

@github-actions github-actions bot added the platform/backend AutoGPT Platform - Back end label Jan 21, 2025
Copy link

netlify bot commented Jan 21, 2025

βœ… Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
πŸ”¨ Latest commit 7f97844
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/678f7459fc4a1e0008b5199a

@majdyz majdyz enabled auto-merge January 21, 2025 10:18
Copy link

netlify bot commented Jan 21, 2025

βœ… Deploy Preview for auto-gpt-docs ready!

Name Link
πŸ”¨ Latest commit 7f97844
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/678f74591d79650007a5a741
😎 Deploy Preview https://deploy-preview-9306--auto-gpt-docs.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant