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

Refactor/add function to fetch corresponding object UUID #1851

Merged

Conversation

aybruhm
Copy link
Member

@aybruhm aybruhm commented Jul 5, 2024

Description

This PR adds a function to fetch the corresponding object UUID (as string) from the database.

Example (how-to use)

from agenta_backend.services import db_manager
...

app_object_id = "66893cd16c27dd6b19d2230b"
app_uuid_as_str = await db_manager.fetch_corresponding_object_uuid(
    table_name="app_db", object_id=app_object_id
)
print(app_uuid_as_str) 
# 019087e0-0ea5-7623-a103-de9cb67f229a

Copy link

vercel bot commented Jul 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agenta ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 5:56pm

@aybruhm aybruhm requested a review from aakrem July 6, 2024 12:49
@aybruhm aybruhm marked this pull request as ready for review July 6, 2024 12:49
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Backend python Pull requests that update Python code labels Jul 6, 2024
Copy link
Collaborator

@aakrem aakrem left a comment

Choose a reason for hiding this comment

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

We are missing the usage of the method in the traces creation logic

@aybruhm
Copy link
Member Author

aybruhm commented Jul 6, 2024

We are missing the usage of the method in the traces creation logic

Here's the PR for that.

@aybruhm aybruhm requested a review from aakrem July 6, 2024 13:03
@aakrem
Copy link
Collaborator

aakrem commented Jul 6, 2024

Thanks

Copy link
Collaborator

@aakrem aakrem left a comment

Choose a reason for hiding this comment

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

Looks good to me

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 6, 2024
@aakrem aakrem merged commit e5e086d into postgres Jul 6, 2024
6 checks passed
@aakrem aakrem deleted the refactor/add-function-to-fetch-corresponding-object-uuid branch July 6, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend lgtm This PR has been approved by a maintainer python Pull requests that update Python code size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants