Skip to content

[26.0] Fix OMERO temp directory handling#22262

Merged
mvdbeek merged 2 commits intogalaxyproject:release_26.0from
davelopez:26.0_fix_omero_temp_dir
Mar 31, 2026
Merged

[26.0] Fix OMERO temp directory handling#22262
mvdbeek merged 2 commits intogalaxyproject:release_26.0from
davelopez:26.0_fix_omero_temp_dir

Conversation

@davelopez
Copy link
Copy Markdown
Contributor

Fixes #22203

Galaxy loads all file sources on startup, so the only workaround Copilot and I could find is deferring the OMERO import until it is really used to avoid the import side effect of setting the temp directory to the default directory in the user's home dir before we can set the OMERO_TMPDIR to a sensible value.

This will now use the directory in file_source_temp_dir or try a sensible fallback with tempfile.gettempdir().

Thanks again for noticing this @bernt-matthias! Can you give it a try?

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:
    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.

Avoids import-time side effects that can interfere with temp directory handling and startup behavior.

Configures a stable temp location before the dependency is loaded so runtime behavior stays predictable across deployments.

Moves dependency checks to connection time, which lets initialization remain lightweight while still failing clearly when support is unavailable.
Detects the case where authentication appears to succeed but no active client session is available.

Raises a clearer failure instead of calling keepalive on a missing client, which makes connection problems easier to diagnose and prevents a less helpful runtime error.
@bernt-matthias
Copy link
Copy Markdown
Contributor

Is the _file_sources_config.tmp_dir already documented in the file source or template config sample files?

@davelopez
Copy link
Copy Markdown
Contributor Author

This is documented in the general Galaxy config file; it is not part of the template config but rather a global config for all file sources:

#file_source_temp_dir: null

@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Mar 29, 2026

Could you report this upstream ?

@mvdbeek mvdbeek merged commit 7d87758 into galaxyproject:release_26.0 Mar 31, 2026
56 of 57 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Galaxy Dev - weeklies Mar 31, 2026
@ahmedhamidawan ahmedhamidawan modified the milestones: 26.1, 26.0 Mar 31, 2026
@itisAliRH itisAliRH deleted the 26.0_fix_omero_temp_dir branch April 1, 2026 13:45
@davelopez
Copy link
Copy Markdown
Contributor Author

Could you report this upstream ?

Done ome/omero-py#178 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants