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] Remove Auth Cache + Fix tree=None #2303

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agenta-cli/agenta/sdk/decorators/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,19 +373,19 @@ async def execute_function(

async def handle_success(self, result: Any, inline_trace: bool):
data = None
trace = dict()
tree = None

with suppress():
data = self.patch_result(result)

if inline_trace:
trace = await self.fetch_inline_trace(inline_trace)
tree = await self.fetch_inline_trace(inline_trace)

log.info(f"----------------------------------")
log.info(f"Agenta SDK - exiting with success: 200")
log.info(f"----------------------------------")

return BaseResponse(data=data, tree=trace)
return BaseResponse(data=data, tree=tree)

def handle_failure(self, error: Exception):
log.warning("--------------------------------------------------")
Expand Down
2 changes: 2 additions & 0 deletions agenta-cli/agenta/sdk/middleware/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"t",
)

AGENTA_SDK_AUTH_CACHE = False

AGENTA_UNAUTHORIZED_EXECUTION_ALLOWED = str(
environ.get("AGENTA_UNAUTHORIZED_EXECUTION_ALLOWED", False)
).lower() in ("true", "1", "t")
Expand Down
Loading