Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor audit log database to API conversion which is inefficient #16718

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

Open
mafredri opened this issue Feb 26, 2025 · 0 comments
Open

Refactor audit log database to API conversion which is inefficient #16718

mafredri opened this issue Feb 26, 2025 · 0 comments

Comments

@mafredri
Copy link
Member

mafredri commented Feb 26, 2025

The current audit log endpoints perform additional database queries for each audit log row, at least to check if the resource has been deleted or not and to verify resources for creating a link to the resource (auditLogIsResourceDeleted, auditLogResourceLink). For workspace builds we do up to 4 separate queries as a result.

As Steven put it:

Do we really do these functions for every audit log row?!

Originally posted by @Emyrk in #16670 (review)

This is an inefficient way to do it, however, the query to handle all the different types of resources would also become quite complex. But it would be nice to have a better solution for this or at least minimize the number of queries we need to do.

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

No branches or pull requests

1 participant