snakedeploy icon indicating copy to clipboard operation
snakedeploy copied to clipboard

Use config and schema from tags rather than default branch

Open nickp60 opened this issue 2 years ago • 1 comments

Hi Snakedeploy team!

  • snakedeploy version: 0.8.2
  • Python version: 3.11.0
  • Operating System: CentOS Linux 7 (Core)

Description

Not sure if this should go here or in the main snakemake repo, but I ran into the issue with snakedeploy so here we are! I'm happy to close it and move if needed.

Describe what you were trying to get done.

I want to test out a new version of a pipeline that involves a new parameter in the config

Describe what happened, what went wrong, and what you expected to happen.

I tried snakedeploying the commit, but the config fetched was the one in the default branch, not the one corresponding to the commit I am trying to deploy.

What I Did

I forked the dnaseq example workflow, added a new config parameter called abrandnewparam and a print statement to the main workflow file.

$ snakedeploy deploy-workflow --tag  f550119d https://github.com/nickp60/snakedeploy-issue tmp2
# deployment succeeds
$ snakemake -c 1 -s tmp2/workflow/Snakefile --configfile ./tmp2/config/config.yaml

KeyError in line 8 of https://github.com/nickp60/snakedeploy-issue/raw/f550119d/workflow/Snakefile:                                                                
'abrandnewparam'

It's not shown with this example, but where applicable it also pulls the default branch's config validation schema as well, which is a bummer.

Is this the intended behavior?

nickp60 avatar Jan 31 '23 20:01 nickp60

I've encountered a similar issue with v0.9.1, where the --branch parameter appears to be ignored.

It seems that the repo is cloned, but the requested branch/tag is not checked out: https://github.com/snakemake/snakedeploy/blob/6c767aba2112b924d8b0ec003e31b5401101da73/snakedeploy/deploy.py#L66C27-L66C32

kbseah avatar Jan 12 '24 14:01 kbseah