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

[24.1] Also check dataset.deleted when determining if data can be displayed #18547

Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jul 16, 2024

This is being called when serialising HDAs in the poller if the HDA is expanded.
When we purge via celery we set the HDA to deleted, flush and purge async, so it is possible that the async task removes the dataset from disk while the ORM object in the poller still is in non-purged state.

I think this fixes
https://sentry.galaxyproject.org/share/issue/0ae7a9d9ad564054bd11c9a43aa6994c/:

FileNotFoundError: [Errno 2] No such file or directory: ''
  File "galaxy/datatypes/interval.py", line 914, in get_estimated_display_viewport
    with compression_utils.get_fileobj(dataset.get_file_name()) as fh:
  File "galaxy/util/compression_utils.py", line 79, in get_fileobj
    return get_fileobj_raw(filename, mode, compressed_formats)[1]
  File "galaxy/util/compression_utils.py", line 139, in get_fileobj_raw
    return compressed_format, open(filename, mode, encoding="utf-8")

The error occurred at the same second as the last update to the history_dataset_association.

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.

This is being called when serialing HDAs in the poller if the HDA is
expaneded.
When we purge via celery we set the HDA to deleted, flush and purge
async, so it is possible that the async task removes the dataset from
disk while the ORM object in the poller still is in non-purged state.

I think this fixes
https://sentry.galaxyproject.org/share/issue/0ae7a9d9ad564054bd11c9a43aa6994c/:
```
FileNotFoundError: [Errno 2] No such file or directory: ''
  File "galaxy/datatypes/interval.py", line 914, in get_estimated_display_viewport
    with compression_utils.get_fileobj(dataset.get_file_name()) as fh:
  File "galaxy/util/compression_utils.py", line 79, in get_fileobj
    return get_fileobj_raw(filename, mode, compressed_formats)[1]
  File "galaxy/util/compression_utils.py", line 139, in get_fileobj_raw
    return compressed_format, open(filename, mode, encoding="utf-8")
```
The error occurred at the same second as the last update to the
history_dataset_association.
@github-actions github-actions bot added this to the 24.1 milestone Jul 16, 2024
@mvdbeek
Copy link
Member Author

mvdbeek commented Jul 16, 2024

wow, 7 failing test suites and all unrelated ... 😢

lib/galaxy/datatypes/interval.py Show resolved Hide resolved
@mvdbeek mvdbeek merged commit d184979 into galaxyproject:release_24.1 Jul 17, 2024
45 of 52 checks passed
@nsoranzo nsoranzo deleted the fix_displayable_deleted_request branch July 17, 2024 10:14
nsoranzo added a commit to nsoranzo/galaxy that referenced this pull request Dec 17, 2024
nsoranzo added a commit to nsoranzo/galaxy that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants