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

Misc fixes #627

Merged
merged 6 commits into from
Oct 11, 2024
Merged

Misc fixes #627

merged 6 commits into from
Oct 11, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Oct 11, 2024

  • fix(agents-api): Allow url etc to be overridden by arguments
  • fix(agents-api): base64 encode http content
  • feat(agents-api): Extend stdlib
  • fix(agents-api): Fix interceptors and simplify get/set steps
  • fix(agents-api): Fix the bug where execution.output was not being set

Important

This PR enhances API call execution, extends the standard library, improves error handling, refines execution transitions, and updates workflow execution in the agents-api module.

  • API Call Execution:
    • execute_api_call in excecute_api_call.py now supports overriding url and headers via RequestArgs.
    • HTTP content is base64 encoded before being returned.
  • Standard Library Extension:
    • utils.py extended with classes for re, json, yaml, time, random, itertools, functools, base64, urllib, string, zoneinfo, datetime, math, and statistics.
  • Error Handling:
    • Updated is_non_retryable_error in exceptions/tasks.py to accept BaseException.
    • CustomActivityInterceptor and CustomWorkflowInterceptor in interceptors.py now handle BaseException.
  • Execution Transition:
    • Fixed bug in create_execution_transition.py where execution.output was not set correctly for non-error transitions.
  • Workflow Execution:
    • Removed user state management from TaskExecutionWorkflow in task_execution/__init__.py.
    • Updated continue_as_child in helpers.py to handle user state via workflow memo.
  • Testing:
    • Updated tests in test_execution_workflow.py to cover new functionalities and ensure correct behavior.

This description was created by Ellipsis for 2b78559. 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 2b78559 in 45 seconds

More details
  • Looked at 588 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. agents-api/agents_api/common/exceptions/tasks.py:23
  • Draft comment:
    The change from list to tuple for NON_RETRYABLE_ERROR_TYPES is appropriate as it is used in isinstance, which requires a tuple. This change is correct and improves the code.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change from list to tuple for NON_RETRYABLE_ERROR_TYPES is appropriate as it is used in isinstance, which requires a tuple. This change is correct and improves the code.
2. agents-api/agents_api/models/execution/create_execution_transition.py:179
  • Draft comment:
    The query construction logic here is complex and could benefit from additional comments or refactoring for improved readability and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The create_execution_transition function has a complex query construction logic. It would be beneficial to add comments or refactor the code to improve readability and maintainability.

Workflow ID: wflow_nRTiFjpd8JCPjsg0


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.

agents-api/agents_api/common/interceptors.py Show resolved Hide resolved
@HamadaSalhab HamadaSalhab merged commit a51441a into dev Oct 11, 2024
4 checks passed
@HamadaSalhab HamadaSalhab deleted the x/misc-fixes branch October 11, 2024 09:37
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