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

Don't serialize view of item in delete/purge request #18732

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Aug 23, 2024

This is a breaking change for the API, it is motivated by https://sentry.galaxyproject.org/share/issue/3970e49a695f4600bcaeae55021555a9/:

Message
Unexpected error
Stack Trace

Newest

FileNotFoundError: [Errno 2] No such file or directory: ''
  File "galaxy/datatypes/interval.py", line 1326, in get_estimated_display_viewport
    with open(dataset.get_file_name()) as fh:

This is a purge request, which does return the entire detailed response, including available display applications. We already check that the dataset isn't purged, but the celery task often executes between the check and the deletion.

I don't think it makes sense to return any data at all here, and there are other endpoints where we simply return 202 or 204, like purging user file source instances.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@mvdbeek mvdbeek force-pushed the drop_response_body_delete_datasets branch 3 times, most recently from 4c7ed96 to 73176cf Compare August 25, 2024 13:51
@mvdbeek mvdbeek marked this pull request as ready for review August 26, 2024 10:56
@github-actions github-actions bot added this to the 24.2 milestone Aug 26, 2024
This is a breaking change for the API, it is motivated by
https://sentry.galaxyproject.org/share/issue/3970e49a695f4600bcaeae55021555a9/:
```
Message
Unexpected error
Stack Trace

Newest

FileNotFoundError: [Errno 2] No such file or directory: ''
  File "galaxy/datatypes/interval.py", line 1326, in get_estimated_display_viewport
    with open(dataset.get_file_name()) as fh:
```
This is a purge request, which does return the entire detailed response,
including available display applications. We already check that the
dataset isn't purged, but ther celery task often executes between the
check and the deletion.

I don't think it makes sense to return any data at all here,
and there are other endpoints where we simply return 202 or 204,
like purging user file source instanes.
Most of the time we just want an OK status code. 202, 204, 200 should
all be OK and some of this depends on the Galaxy instance config,
so this should be more robust to future changes.
@mvdbeek mvdbeek force-pushed the drop_response_body_delete_datasets branch from 73176cf to 030ad6e Compare November 15, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant