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

fix: require toposort >= 1.10 #2145

Merged
merged 3 commits into from Feb 28, 2023

Conversation

dlaehnemann
Copy link
Contributor

Closes #2134, speeds up DAG resolution through pulling in the latest toposort that leads to a 200x speedup of the toposort() function for larger DAGs, see:
https://gitlab.com/ericvsmith/toposort/-/merge_requests/4

Description

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

closes #2134, speeds up DAG resolution
This should make this step stable against otherwise randomly recurring trouble with the azure mirror. The solution is given and explained here:
actions/runner-images#675 (comment)

Basically, this looks for the best mirror in US, where GitHub Actions seems to be hosted, and then updates to get the latest index from there.

Hopefully, this consistently avoids failures like this one in the future:
https://github.com/snakemake/snakemake/actions/runs/4291216092/jobs/7478626266#step:13:112

```
sudo apt install -y stress git wget openmpi-bin libopenmpi-dev mariadb-server
[...]
Err:1 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-common all 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:5 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libmariadb3 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:6 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-client-core-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:7 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-client-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server-core-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:14 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:41 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server all 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Fetched 12.2 MB in 12s (985 kB/s)
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-common_10.6.11-0ubuntu0.22.04.1_all.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/libmariadb3_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-client-core-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-client-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-server-core-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-server-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-server_10.6.11-0ubuntu0.22.04.1_all.deb  404  Not Found [IP: 40.81.13.82 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 100.
```
@sonarcloud
Copy link

sonarcloud bot commented Feb 28, 2023

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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@johanneskoester johanneskoester merged commit 3cb54b8 into main Feb 28, 2023
@johanneskoester johanneskoester deleted the require-toposort-1-10-for-dag-speedup branch February 28, 2023 19:06
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>
dlaehnemann added a commit to bioconda/bioconda-recipes that referenced this pull request Mar 3, 2023
…of dag sorting

Follow-up to [snakemake pull request 2145](snakemake/snakemake#2145), which addresses [snakemake issue 2134](snakemake/snakemake#2134), via the [toposort merge request 4 that gives a 200x speedup in DAG sorting](https://gitlab.com/ericvsmith/toposort/-/merge_requests/4).
BiocondaBot pushed a commit to bioconda/bioconda-recipes that referenced this pull request Mar 3, 2023
Merge PR #39729, commits were: 
 * Merge branch 'master' into snakemake-require-latest-toposort
 * Merge branch 'master' into snakemake-require-latest-toposort
 * snakemake-minimal: require latest toposort `>=1.10` for 200x speedup of dag sorting

Follow-up to [snakemake pull request 2145](snakemake/snakemake#2145), which addresses [snakemake issue 2134](snakemake/snakemake#2134), via the [toposort merge request 4 that gives a 200x speedup in DAG sorting](https://gitlab.com/ericvsmith/toposort/-/merge_requests/4).
cokelaer pushed a commit to cokelaer/bioconda-recipes that referenced this pull request Apr 28, 2023
Merge PR bioconda#39729, commits were: 
 * Merge branch 'master' into snakemake-require-latest-toposort
 * Merge branch 'master' into snakemake-require-latest-toposort
 * snakemake-minimal: require latest toposort `>=1.10` for 200x speedup of dag sorting

Follow-up to [snakemake pull request 2145](snakemake/snakemake#2145), which addresses [snakemake issue 2134](snakemake/snakemake#2134), via the [toposort merge request 4 that gives a 200x speedup in DAG sorting](https://gitlab.com/ericvsmith/toposort/-/merge_requests/4).
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.

Lot of time spend on toposort in a large workflow
2 participants