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

Add API endpoint to fetch a history's workflow invocations. #6580

Merged
merged 4 commits into from
Aug 24, 2018

Conversation

jmchilton
Copy link
Member

Refactor toward managers to allow unified serialization of invocations and such. Add test case.

In service of #5142 I suppose, builds on #6559 (cherry-picked into dev).

Next up... I want to add a jobs_summary API that matches collections (https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/api/history_contents.py#L183) - this should allow effective summary of job states for fully scheduled workflows. One can then imagine a progress bar for whats steps are scheduled and below it a progress bar for what job states are - this second one built on this new API I'm planning and that could probably completely reuse the collection summary code on the client.

@jmchilton jmchilton changed the title Add API endpoint to fetch a histories workflow invocations. Add API endpoint to fetch a history's workflow invocations. Aug 8, 2018
@galaxybot galaxybot added this to the 18.09 milestone Aug 8, 2018
Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Thanks this is great! Displaying all this information to the user at the end will be a big improvement.

@dannon
Copy link
Member

dannon commented Aug 22, 2018

@jmchilton My only question is about getting all of a user's active invocations. Would we want another endpoint, additional query parameters here, or multiple requests for all histories?

(I ask, because this is a feature I started working on at the hackathon and then had this exact issue with -- displaying all active invocations on the workflows landing page)

@jmchilton
Copy link
Member Author

I can add /api/invocations to sort of mirror /api/jobs - should be pretty trivial. Would that be enough?

@dannon
Copy link
Member

dannon commented Aug 22, 2018

@jmchilton Yeah, that's what I was getting at. You think the second endpoint is better than having /api/invocations defaulting to all invocations, filtering with a history_id parameter or other query params? (like workflow id, etc)

@jmchilton
Copy link
Member Author

You know me - I'd just add both 😄. But I'm totally fine dropping the /api/histories view of this and just adding the /api/invocations with history_id parameter. I'll rework this, thanks for the feedback @dannon.

@dannon
Copy link
Member

dannon commented Aug 22, 2018

@jmchilton Thanks! I think it'll be a little more flexible in the long run, and I'm excited to use it to finish off this active invocations view!

Use the concept of job_source_type and job_source_id used by IDs to summarize the state and list out individual jobs in the response as a shortcut. This information used to be readily accessible before 18.01.
@jmchilton jmchilton force-pushed the wf_invocation_update branch 2 times, most recently from 8554a87 to b2ba245 Compare August 24, 2018 14:00
Refactor toward managers to allow unified serialization of invocations and such. Add test case.
@jmchilton jmchilton force-pushed the wf_invocation_update branch from b2ba245 to 3879a01 Compare August 24, 2018 14:01
@jmchilton
Copy link
Member Author

I think the changes are good for review - /api/invocations is now good to go. It can take a history_id, workflow_id, or neither.

@dannon
Copy link
Member

dannon commented Aug 24, 2018

@jmchilton Thanks! Checking it out.

@dannon dannon merged commit 107c89a into galaxyproject:dev Aug 24, 2018
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