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

Stop loading artifacts when deleting runs, fix potential NullPointerException #271

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

eamansour
Copy link
Member

@eamansour eamansour commented Sep 6, 2024

Why?

See galasa-dev/projectmanagement#1210

Deleting runs from the Galasa service is much slower than it should be because it loads all attached artifacts for a run into a filesystem when fetching a run by its ID. This work is unnecessary when deleting runs since we only care about IDs of the documents to delete related to the run (i.e. log documents, artifact documents, and the run document itself).

Changes

  • Stopped loading artifact attachments when fetching a run for deletion
  • Guarded against a NullPointerException when deleting a run that could not be fetched
  • Added unit tests for deleting runs

…carding runs, unit tests

Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
@galasa-team
Copy link

Build successful

1 similar comment
@galasa-team
Copy link

Build successful

Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
@eamansour eamansour force-pushed the iss1210-delete-runs-performance branch from aad4547 to c1d0b05 Compare September 10, 2024 08:54
@galasa-team
Copy link

Build successful

Copy link
Contributor

@aashir21 aashir21 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

@eamansour eamansour merged commit 57fa314 into main Sep 10, 2024
6 checks passed
@eamansour eamansour deleted the iss1210-delete-runs-performance branch September 10, 2024 09:40
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.

3 participants