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

Fix job directory not being cleaned up #18997

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

davelopez
Copy link
Contributor

Fixes:

galaxy.jobs ERROR 2024-10-15 13:11:57,570 [pN:main.1,p:610368,tN:LocalRunner.work_thread-2] Unable to cleanup job 11703
Traceback (most recent call last):
  File "/home/dlopez/dev/galaxy/lib/galaxy/jobs/__init__.py", line 2160, in cleanup
    self.object_store.delete(self.get_job(), base_dir="job_work", entire_dir=True, obj_dir=True)
  File "/home/dlopez/dev/galaxy/lib/galaxy/objectstore/__init__.py", line 580, in delete
    return self._invoke(
           ^^^^^^^^^^^^^
  File "/home/dlopez/dev/galaxy/lib/galaxy/objectstore/__init__.py", line 485, in _invoke
    return self.__getattribute__(f"_{delegate}")(obj=obj, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dlopez/dev/galaxy/lib/galaxy/objectstore/__init__.py", line 1202, in _delete
    return self._call_method("_delete", obj, False, False, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dlopez/dev/galaxy/lib/galaxy/objectstore/__init__.py", line 1524, in _call_method
    return self._resolve_backend(object_store_id).__getattribute__(method)(obj, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dlopez/dev/galaxy/lib/galaxy/objectstore/__init__.py", line 1068, in _delete
    path = self._get_filename(obj, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dlopez/dev/galaxy/lib/galaxy/objectstore/__init__.py", line 1114, in _get_filename
    raise ObjectNotFound
galaxy.exceptions.ObjectNotFound: No such object found.

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    • Run any tool
    • Check the server log and observe there is no exception when cleaning the job directory and it is indeed deleted.

License

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

@mvdbeek
Copy link
Member

mvdbeek commented Oct 15, 2024

Do we know when that started happening and why ?

@mvdbeek mvdbeek merged commit fb540bc into galaxyproject:dev Oct 15, 2024
53 of 54 checks passed
@davelopez
Copy link
Contributor Author

Do we know when that started happening and why ?

I think it might have been introduced unintentionally here https://github.com/galaxyproject/galaxy/pull/18608/files#diff-0acc3f85a991471b3f76a7d6431a244f7a06d4b4010f8f7531f59453d8e22f66R2133 while trying to figure out the exposed parameters without kwargs.

@davelopez davelopez deleted the fix_cleanup_job_directory branch October 16, 2024 07:17
@nsoranzo
Copy link
Member

Oops, sorry about that! Thanks @davelopez for the fix!

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.

4 participants