Skip to content

fix: is_run error with local, group jobs#2133

Merged
johanneskoester merged 1 commit intosnakemake:mainfrom
troycomi:patch-2
Feb 27, 2023
Merged

fix: is_run error with local, group jobs#2133
johanneskoester merged 1 commit intosnakemake:mainfrom
troycomi:patch-2

Conversation

@troycomi
Copy link
Copy Markdown
Contributor

Description

Ran into a bug where executing a workflow locally causes a crash with group jobs.

    if self.workflow.verbose or (job.is_run and not job.is_group()):
                                 ^^^^^^^^^^
AttributeError: 'GroupJob' object has no attribute 'is_run'

Swapping the order of the checks fixes this issue; not sure why the CI didn't catch this bug.

Ran into a bug where executing a workflow locally causes a crash with group jobs.
```
    if self.workflow.verbose or (job.is_run and not job.is_group()):
                                 ^^^^^^^^^^
AttributeError: 'GroupJob' object has no attribute 'is_run'
```
Swapping the order of the checks fixes this issue; not sure why the CI didn't catch this bug.
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@troycomi troycomi changed the title Fix is_run error with local, group jobs fix: is_run error with local, group jobs Feb 22, 2023
@johanneskoester
Copy link
Copy Markdown
Contributor

Thanks a lot!

@johanneskoester johanneskoester merged commit 31bfcd5 into snakemake:main Feb 27, 2023
johanneskoester pushed a commit that referenced this pull request Mar 1, 2023
🤖 I have created a release *beep* *boop*
---


##
[7.24.0](v7.23.1...v7.24.0)
(2023-03-01)


### Features

* limit the number of input/output files in job properties
([#2149](#2149))
([d93f091](d93f091))


### Bug Fixes

* [#2130](#2130) by
patching the protect() method so the path of files in subdirectories is
properly resolved during write-protection
([#2131](#2131))
([1a754fd](1a754fd))
* `sre_constants` import because of deprecation
([#2139](#2139))
([3b326db](3b326db))
* ensure user and group rw permissions for metadata files and source
cache ([#2132](#2132))
([cc51faa](cc51faa))
* is_run error with local, group jobs
([#2133](#2133))
([31bfcd5](31bfcd5))
* require toposort >= 1.10
([#2145](#2145))
([3cb54b8](3cb54b8))


### Documentation

* Update modularization.rst
([#2137](#2137))
([16954c7](16954c7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants