Skip to content

Commit cc3aa5f

Browse files
authored
Merge branch 'dev' into rm_nfcore_external_java_deps
2 parents c0d5bdd + 996c54b commit cc3aa5f

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
- Add conda channel order to nextflow.config ([#2094](https://github.com/nf-core/tools/pull/2094))
1212
- Fix tyop in pipeline nextflow.config ([#2664](https://github.com/nf-core/tools/pull/2664))
1313
- Remove `nfcore_external_java_deps.jar` from lib directory in pipeline template ([#2675](https://github.com/nf-core/tools/pull/2675))
14+
- Add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678))
15+
- Add new pipeline error message pointing to docs when 'requirement exceeds available memory' error message ([#2680](https://github.com/nf-core/tools/pull/2680))
1416

1517
### Download
1618

@@ -39,6 +41,7 @@
3941
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.1.13 ([#2660](https://github.com/nf-core/tools/pull/2660))
4042
- Add new subcommand: `nf-core logo-create` to output an nf-core logo for a pipeline (instead of going through the website) ([#2662](https://github.com/nf-core/tools/pull/2662))
4143
- Update actions/cache action to v4 ([#2666](https://github.com/nf-core/tools/pull/2666))
44+
- Handle api redirects from the old site ([#2672](https://github.com/nf-core/tools/pull/2672))
4245
- Remove redundanct v in pipeline version for emails ([#2667](https://github.com/nf-core/tools/pull/2667))
4346
- add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678))
4447

nf_core/pipeline-template/workflows/pipeline.nf

+7
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ workflow.onComplete {
127127
}
128128
}
129129

130+
workflow.onError {
131+
if (workflow.errorReport.contains("Process requirement exceeds available memory")) {
132+
println("🛑 Default resources exceed availability 🛑 ")
133+
println("💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡")
134+
}
135+
}
136+
130137
/*
131138
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132139
THE END

nf_core/utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,14 @@ def poll_nfcore_web_api(api_url, post_data=None):
420420
except requests.exceptions.ConnectionError:
421421
raise AssertionError(f"Could not connect to URL: {api_url}")
422422
else:
423-
if response.status_code != 200:
423+
if response.status_code != 200 and response.status_code != 301:
424424
log.debug(f"Response content:\n{response.content}")
425425
raise AssertionError(
426426
f"Could not access remote API results: {api_url} (HTML {response.status_code} Error)"
427427
)
428+
# follow redirects
429+
if response.status_code == 301:
430+
return poll_nfcore_web_api(response.headers["Location"], post_data)
428431
try:
429432
web_response = json.loads(response.content)
430433
if "status" not in web_response:

0 commit comments

Comments
 (0)