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

Running a workflow with a different version? #81

Open
amstilp opened this issue Aug 16, 2023 · 3 comments
Open

Running a workflow with a different version? #81

amstilp opened this issue Aug 16, 2023 · 3 comments
Assignees

Comments

@amstilp
Copy link

amstilp commented Aug 16, 2023

Is there a (supported or recommended) way to run a different version of a workflow than the current version that's set on AnVIL? As an example, I have a workflow with versions "combined_checks" and "main". The version that's currently saved in AnVIL is "combined_checks", but I would like to run the "main" version.

I found one of two ways to potentially set the version:

  1. Modify the config object returned by avworkspace_configuration_get() to replace the methodUri and methodVersion elements, eg:
config$methodRepoMethod$methodUri <- str_replace(config$methodRepoMethod$methodUri, "combined_checks", "main")
config$methodRepoMethod$methodVersion <- str_replace(config$methodRepoMethod$methodVersion, "combined_checks", "main")
  1. From the AnVIL page for the workflow in my web browser, manually select the "main" branch and save the workflow, then run avworkspace_configuration_get().

While option 2 is a workaround, it would be nice to do everything from the command line/within R.

  • Is there a better way to specify the version of the workflow that I would like to run, eg something like avworkflow_configuration_get("primed_cc/validate_phenotype_model", version="main")?
  • If not, is this something the Bioconductor::AnVIL R package could support in the future?

For some more detailed background, this is part of what was causing the underlying error in my #80 issue.

The workflow I am trying to run is hosted on Dockstore (primed-cc/validate_phenotype_model), with underlying code hosted on GitHub (UW-GAC/primed-file-checks). When the workflow was imported into the workspace, it was set to use the "combined_checks" branch. This branch has since
been merged into main and deleted, so avworkspace_configuration_inputs() was trying to get the inputs from a branch of the code that no longer exists.

Doing either of the two fixes above let me get the inputs with avworkspace_configuration_inputs().

@amstilp
Copy link
Author

amstilp commented Aug 16, 2023

Also if it's helpful, here's the error I got after the #80 fix (when trying to pull config inputs for a branch that longer existed):

> inputs <- avworkflow_configuration_inputs(config)
Error: 'avworkflow_response' failed:
  Not Found (HTTP 404).
  Cannot get dockstore://github.com%2FUW-GAC%2Fprimed-file-checks%2Fvalidate_phenotype_model/combined_checks from method repo.

so that led me down this path.

@mtmorgan mtmorgan self-assigned this Aug 17, 2023
@mtmorgan
Copy link
Collaborator

I don't think there is currently a better way to do this.

It seems like there are two things to do to implement a new feature...

  • discover available versions
  • easily update version to be used

I will look into this

@amstilp
Copy link
Author

amstilp commented Aug 17, 2023

Thanks! Given that there are some workarounds, this would be a nice feature but isn't a blocker for anything.

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

No branches or pull requests

2 participants