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

Refactor Workflow API routes - Part 1 #17463

Merged
merged 57 commits into from
Feb 27, 2024
Merged

Conversation

heisner-tillman
Copy link
Contributor

@heisner-tillman heisner-tillman commented Feb 13, 2024

This is a part of #10889.

Summary

  • Refactored API routes:
    • POST: /api/workflows/{workflow_id}/invocations
      • Added pydantic models to input
      • Added pydantic models to return
      • Removed the mapping to the legacy routes
    • PUT: /api/workflows/{workflow_id}/refactor
      • Added pydantic models to input
      • Added pydantic models to return
      • Removed the mapping to the legacy routes
    • GET: /api/workflows/{workflow_id}
      • Added pydantic models to input
      • Added pydantic models to return
      • Removed the mapping to the legacy routes

How to test the changes?

  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    You can find the interactive API documentation here: http://127.0.0.1:8080/api/docs#/workflows
    image

License

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

@heisner-tillman
Copy link
Contributor Author

heisner-tillman commented Feb 13, 2024

This is not ready for review. I just wanted to create this pull request such that there is no duplication effort

Update: It is ready now.

@heisner-tillman heisner-tillman marked this pull request as draft February 13, 2024 17:08
@github-actions github-actions bot added this to the 24.0 milestone Feb 13, 2024
@heisner-tillman heisner-tillman force-pushed the workflows branch 10 times, most recently from 175f4c3 to 916c04b Compare February 20, 2024 18:26
@heisner-tillman heisner-tillman force-pushed the workflows branch 5 times, most recently from 426d222 to 213143e Compare February 23, 2024 08:22
@heisner-tillman heisner-tillman changed the title Refactor Workflow API routes Refactor Workflow API routes - Part 1 Feb 23, 2024
@heisner-tillman heisner-tillman marked this pull request as ready for review February 23, 2024 09:35
lib/galaxy/schema/workflows.py Outdated Show resolved Hide resolved
lib/galaxy/schema/workflows.py Outdated Show resolved Hide resolved
lib/galaxy/schema/workflows.py Outdated Show resolved Hide resolved
lib/galaxy/webapps/galaxy/api/workflows.py Outdated Show resolved Hide resolved
lib/galaxy/webapps/galaxy/api/workflows.py Outdated Show resolved Hide resolved
test/integration/test_workflow_invocation.py Outdated Show resolved Hide resolved
@heisner-tillman heisner-tillman force-pushed the workflows branch 4 times, most recently from 04e2500 to dcf3849 Compare February 24, 2024 07:30
@heisner-tillman
Copy link
Contributor Author

heisner-tillman commented Feb 26, 2024

The selenium test failure might be related though https://github.com/galaxyproject/galaxy/actions/runs/8029094805/job/21939309255?pr=17463

pydantic_core._pydantic_core.ValidationError: 1 validation error for StoredWorkflowDetailed
    | source_metadata
    |   Input should be a valid string [type=string_type, input_value={'url': 'https://raw.gith...ata/test_workflow_1.ga'}, input_type=dict]
    |     For further information visit https://errors.pydantic.dev/2.5/v/string_type

Yes, it expects a dict there and not a str. I fixed it now.

Thanks for pointing it out!

@jdavcs
Copy link
Member

jdavcs commented Feb 26, 2024

@davelopez can we merge this?

Copy link
Contributor

@davelopez davelopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It looks pretty good to me! 👍

@jdavcs jdavcs merged commit f3b75e2 into galaxyproject:dev Feb 27, 2024
54 of 55 checks passed
Copy link

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

@nsoranzo nsoranzo added the kind/refactoring cleanup or refactoring of existing code, no functional changes label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API area/testing/api area/testing kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants