Skip to content

start implementing support for downloading output_data after an invocation completes #1529

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

Closed
wants to merge 3 commits into from

Conversation

Smeds
Copy link
Contributor

@Smeds Smeds commented May 16, 2025

Currently, the --download_outputs flag can be used with planemo run, but it requires the user to wait until the execution is complete. If the user prefers to use --nowait or if the connection is lost during execution, they lose the ability to retrieve the outputs. This pull request begins to introduce support for downloading outputs after the invocation has finished, regardless of when or how it completes.

The current implementation has a major limitation: the user must provide the history_id and workflow_id in addition to the invocation_id. While it’s possible to fetch invocation details using the invocation_id, the response only includes encoded versions of history_id and workflow_id, which cannot be used directly. I'm not sure how to decode these values—any guidance or pointers would be appreciated.

…ation completes

Currently, the --download_outputs flag can be used with planemo run, but it requires the user to wait until the execution is complete. If the user prefers to use --nowait or if the connection is lost during execution, they lose the ability to retrieve the outputs. This pull request begins to introduce support for downloading outputs after the invocation has finished, regardless of when or how it completes.
@Smeds Smeds marked this pull request as draft May 16, 2025 19:58

invocation_data = invocation_client.show_invocation(invocation)
# NEED I way of decoding workflow id and history_id from the invocation data,
# we have the information but need to decode it before requesting the files.
Copy link
Member

Choose a reason for hiding this comment

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

Hello, not sure what you mean by 'encoded versions', perhaps you're referring to the difference between workflow_id and stored_workflow_id? It's not well documented unfortunately and has tripped me up before, e.g. #1205. If so, you can take the workflow_id you get from the invocation and look it up with the instance param set to true: gi.make_get_request(f'{config.user_gi.url}/workflows/{workflow_id}', params={'instance': instance}).json()

As for the history ids, you should be able to use them directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for helping me! That /workflows/{workflow_id} endpoint helped:)

@Smeds
Copy link
Contributor Author

Smeds commented May 29, 2025

This pull-request depends on a new release of bioblend, bioblend>1.5.0

@Smeds Smeds force-pushed the invocation-download-output branch from ea4e3ef to d1f8e5f Compare May 30, 2025 12:46
@nsoranzo
Copy link
Member

This pull-request depends on a new release of bioblend, bioblend>1.5.0

@Smeds Let me know if you need other PRs for bioblend merged, otherwise I can make a new release.

@Smeds
Copy link
Contributor Author

Smeds commented May 30, 2025

This pull-request depends on a new release of bioblend, bioblend>1.5.0

@Smeds Let me know if you need other PRs for bioblend merged, otherwise I can make a new release.

@nsoranzo Thanks! I would like to be able to have bioblend #506 merged, but that on is dependent on galaxy #20359. Don't know if we should wait on that on or make a release now for bioblend.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 19, 2025

I think this is covered by #1534 and #1532 ? feel free to re-open if I missed something. Thanks for all the great work @Smeds and the help from @simonbray and @nsoranzo!

@mvdbeek mvdbeek closed this Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants