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

Commits on Nov 15, 2024

  1. Don't serialize view of item in delete/purge request

    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.
    mvdbeek committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    fdd125e View commit details
    Browse the repository at this point in the history
  2. Adjust API tests

    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 committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    030ad6e View commit details
    Browse the repository at this point in the history