Skip to content

Commit e1575df

Browse files
committed
skip workflow rule if already part of dag job
1 parent 4397f38 commit e1575df

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/snakemake/deployment/containerize.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ def containerize(workflow, dag):
2222

2323
# collect envs from jobs from the initial DAG.
2424
conda_envs = {job.conda_env for job in dag.jobs if job.conda_env is not None}
25+
dag_jobs = {job.name for job in dag.jobs if job.conda_env is not None}
2526

2627
# collect envs from rules not in the initial DAG (e.g., for rules past checkpoints)
2728
for rule in workflow.rules:
28-
if not rule.conda_env:
29+
if not rule.conda_env or rule.name in dag_jobs:
2930
continue
3031

3132
env_def = rule.conda_env

0 commit comments

Comments
 (0)