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

Workflow Landing Requests #18807

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

Conversation

jmchilton
Copy link
Member

@jmchilton jmchilton commented Sep 12, 2024

I've added a little CLI tool for generating workflow landing requests URLs. External clients won't need to use this but it is a simple example with an easy to follow format and flow that describes how to use the APIs and generate custom forms with pre-populated data for users.

$ . .venv/bin/activate; PYTHONPATH=lib python lib/galaxy/tool_util/client/landing.py -g http://localhost:8081 -s mycoolthing simple_workflow
Your customized form is located at http://localhost:8081/workflow_landings/0d3862e7-345f-4805-a080-5a2cbc2fc547?secret=mycoolthing

This pairs well with the new {src: "url",...} data input dictionaries and a potential minimal workflow running UI (pictured below).

Screenshot 2024-09-12 at 11 28 54 AM

The UI piece is clearly an MVP - hopefully a tool form UI expert can take it over.

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.

@jmchilton
Copy link
Member Author

This is interwound with the tool request API that I thought was closer than it was. I'm finding so many corner cases in modeling tools. If this becomes a blocker for anyone I think I could pretty easily pull out the database migration, the workflow landing stuff, the workflow API that adds {src: "url", ... } inputs, and the form input for the URI parameters.

Alternatively I could pull just the tool API & backend enhancements out and push them back into #17393 and we could keep all the modeling enhancements in here and treat this a bit more like the CWL branch where we have models we sync up but keep the plumbing out until it is solid.

Otherwise I will just spend this week trying to work on the models and just spin some smaller stuff out here and there where it makes sense.

@jmchilton jmchilton force-pushed the landing branch 12 times, most recently from 64d2efa to 27359a0 Compare September 20, 2024 14:13
@jmchilton
Copy link
Member Author

What's the problem you're hitting ?

I'm getting my butt kicked by a dozen little bits of complexity around how parameters work and then building and validating models for what job has as tool state. After a week I've decided that you cannot really infer a default for data column without a runtime... and then runtime that populates the defaults for data columns (populate) also replaces incoming state with HDAs for instance. So I am not getting that clean pipeline of parameters that I want... "fill in static defaults define structure -> fill in dynamic defaults -> record and validate state -> run populate on validated state -> create wrappers". For reproducibility I think it would be really great if we could preserve and validate the thing we hand off to populate and then to the wrappers. I've decided that is going to take some more restructuring though. The API works though - I think by the end of the week I was able to get all the framework tools to use the request API (or at least the ones with validating test cases) - I just think it is important that all the jobs that we have tool requests for also have validated job state for - I hope that makes sense. Functional is good but tracking and reproducible are important here.

I have ripped out the tool landing API, the tool request API, and the simplified workflow UI out of this PR and pushed them back upstream into #17393. However... the workflow landing stuff uses the data request objects from the tool state model upgrades for the request API so this has all of those updates and the workflow landing database stuff was written and tested with the tool request DB migration - so that migration and the corresponding DB models are included here. Ideally I would separate those two things out - but I don't think it is worth the effort - we know we're going to want all of that in the tool request API whenever that is ready and having those things in for now eases that development and improves the API we added to share the meta model in the 2.0 tool shed.

@jmchilton jmchilton marked this pull request as ready for review September 24, 2024 13:58
@jmchilton jmchilton changed the title [WIP] Workflow Landing Requests Workflow Landing Requests Sep 24, 2024
@github-actions github-actions bot added this to the 24.2 milestone Sep 24, 2024
@@ -0,0 +1,178 @@
"""implement structured tool state
Copy link
Member

Choose a reason for hiding this comment

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

I guess the description and the file name is wrong?

@@ -0,0 +1,13 @@
simple_workflow:
Copy link
Member

Choose a reason for hiding this comment

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

I find the term library (here and elsewhere) a bit confusing. What about:

  • controls
  • properties
  • options
  • configurations
    ??

Copy link
Member Author

Choose a reason for hiding this comment

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

Is "catalog" okay? I think of those choices - options is the best but it is feels a little overloaded with options in the workflow instead of options for which workflow to run.

Copy link
Member

Choose a reason for hiding this comment

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

catalog is also nice :)

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.

3 participants