Skip to content

Bug in resource_override annotation #1071

@akshaylive

Description

@akshaylive

Async functions are traced as sync functions by resource_override.

For example, here's an incorrect version:

@traced(name="contextgrounding_search", run_type="uipath")
@resource_override(resource_type="index")
async def ...

When the function is invoked, the true responses are not traced. Instead, Coroutine objects are traced. This is because resource_override annotation does something to make the async function behave like sync.

However, if I flip the implementation, such as

@resource_override(resource_type="index")
@traced(name="contextgrounding_search", run_type="uipath")
async def ...

then, the true responses are traced. This is because the traced annotation preserves the type of function.

Please fix the resource_override. Alternatively, in the short term, please flip the order of invocation everywhere so that all async functions are traced correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions