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(agents-api): Fix updating task execution #542

Merged
merged 4 commits into from
Oct 1, 2024

Conversation

HamadaSalhab
Copy link
Contributor

@HamadaSalhab HamadaSalhab commented Oct 1, 2024

Important

Improves task execution updates by encoding task tokens with metadata and enhancing error handling in raise_complete_async.py and update_execution.py.

  • Behavior:
    • In raise_complete_async.py, task tokens are now base64 encoded and include metadata with activity, run, and workflow IDs.
    • In update_execution.py, added error handling for stopping and resuming executions, using metadata for async activity handle retrieval.
  • Database Queries:
    • In get_paused_execution_token.py, query updated to include metadata and sort by created_at with a limit of 1.
  • Error Handling:
    • Added try-except blocks in update_execution.py to handle exceptions when stopping or resuming executions.

This description was created by Ellipsis for f3de527. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to f3de527 in 24 seconds

More details
  • Looked at 125 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. agents-api/agents_api/activities/task_steps/raise_complete_async.py:37
  • Draft comment:
    Consider adding a return statement after activity.raise_complete_async() to prevent any unintended execution of code beyond this point.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. agents-api/agents_api/models/execution/get_paused_execution_token.py:52
  • Draft comment:
    Ensure that the metadata field is always present and correctly formatted in the database to avoid potential issues when accessing it.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The get_query in get_paused_execution_token now includes metadata, which is a good addition. However, ensure that the metadata is always present and correctly formatted in the database to avoid potential issues when accessing it.

Workflow ID: wflow_kPc7Z49zy2HNZozS


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@HamadaSalhab HamadaSalhab merged commit 50a95ca into dev Oct 1, 2024
6 of 7 checks passed
@HamadaSalhab HamadaSalhab deleted the x/fix-update-task-execution branch October 1, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants