Skip to content

Conversation

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Oct 30, 2025

This should resolve #21031 ... not having a middleware implementation of tus should also be more performant.

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.

@github-actions github-actions bot added this to the 26.0 milestone Oct 30, 2025
@nsoranzo
Copy link
Member

It looks like fastapi is still installed (in addition to fastapi-slim) though. May need to patch tuspyserver upstream?

@nsoranzo
Copy link
Member

It looks like fastapi is still installed (in addition to fastapi-slim) though. May need to patch tuspyserver upstream?

Actually, I think you just forgot to add

fastapi==0.120.2 ; sys_platform == 'never'

to lib/galaxy/dependencies/pinned-requirements.txt .

@mvdbeek
Copy link
Member Author

mvdbeek commented Oct 30, 2025

Hmm, let me check what the update script did. However, are we really on the right track with fastapi-slim? It seems that a lot of external packages want to bring fastapi, which has caused mayhem in our production venv already

@nsoranzo
Copy link
Member

Hmm, let me check what the update script did. However, are we really on the right track with fastapi-slim? It seems that a lot of external packages want to bring fastapi, which has caused mayhem in our production venv already

Actually we don't need to use fastapi-slim any more, since 0.112.0 the 2 are equivalent and the ~30 extra dependencies can be installed with fastapi[standard].

@kysrpex
Copy link
Contributor

kysrpex commented Oct 30, 2025

Are my eyes seeing ASGI middleware for TUS? I commented on #20235:

Endpoints dedicated to TUS uploads work in tandem with the WSGI middleware TusMiddleware from the tuswsgi package. WSGI middlewares and endpoints are injected into the FastAPI app after FastAPI routes as a single sub-application wsgi_handler using app.mount("/", wsgi_handler), meaning that requests are passed to the wsgi_handler sub-application (and thus to TusMiddleware) only if there was no FastAPI endpoint defined to handle them. Therefore, they cannot be migrated to FastAPI unless TusMiddleware is also migrated to ASGI.

This would allow all endpoints to be migrated to FastAPI I guess 🎉.

@nsoranzo
Copy link
Member

Thanks! There's still https://github.com/galaxyproject/galaxy/pull/21201/files#r2477632100 pending, LGTM otherwise.

@nsoranzo
Copy link
Member

Galaxy package tests failure are relevant, you need to update the web_apps package requirements.

@nsoranzo nsoranzo merged commit 32dca1b into galaxyproject:dev Oct 30, 2025
62 of 64 checks passed
@nsoranzo nsoranzo deleted the tuspyserver branch October 30, 2025 21:30
@github-actions
Copy link

This PR was merged without a "kind/" label, please correct.

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.

Odd Issues When Running run.sh

3 participants