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

Allow CORS requests to /api/workflow_landings #18963

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Oct 9, 2024

We'll need CORS response headers for the intended purpose of creating landing requests on external sites. While we could push that into the nginx config I think it's better if this works out of the box. We'll use this in the IWC static site to allow users to run workflows with example data, and ideally they should be able to use any Galaxy instance.

For simple, non-authenticated requests you can now just do allow_cors=True in the route decorator.

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.

The `ubuntu-latest` runner label is moving to 24.04, see https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/

Fixes https://github.com/galaxyproject/galaxy/actions/runs/11260477825/job/31317049837?pr=18963:
```
No VM guests are running outdated hypervisor (qemu) binaries on this host.
/usr/bin/lsb_release --short --codename
noble
Error: Unexpected HTTP response: 404
```
@hexylena
Copy link
Member

For simple, non-authenticated requests you can now just do allow_cors=True in the route decorator.

this is excellent. I have a couple more APIs I'd love to see exposed for cors, I look forwarding to using this!

(namely, /api/tools, /api/tools/{tool_id}, and /api/workflows/{workflow_id}/download?format=json-download)

@mvdbeek mvdbeek merged commit 790b30b into galaxyproject:dev Oct 10, 2024
50 of 54 checks passed
@nsoranzo nsoranzo deleted the cors_handling_fastapi branch October 10, 2024 15:56
@nsoranzo
Copy link
Member

Looks like this broke the OpenAPI linting tests.

@mvdbeek
Copy link
Member Author

mvdbeek commented Oct 10, 2024

636df54

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