Skip to content

Commit

Permalink
Merge pull request #2396 from adamrtalbot/drop_docker_container_error…
Browse files Browse the repository at this point in the history
…_to_warn

fix: Drop container error to warning
  • Loading branch information
adamrtalbot authored Aug 15, 2023
2 parents 9d63f93 + c570b1d commit e964a40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
- Add module MULTIQC to modules.config ([#2377](https://github.com/nf-core/tools/pull/2377))
- Update the Code of Conduct ([#2381](https://github.com/nf-core/tools/pull/2381))
- Save template information to `.nf-core.yml` and deprecate argument `--template-yaml` for `nf-core sync` ([#2388](https://github.com/nf-core/tools/pull/2388) and [#2389](https://github.com/nf-core/tools/pull/2389))
- Remove fixed Ubuntu test and added to standard testing matrix
- ([#2397](https://github.com/nf-core/tools/pull/2397)) Remove fixed Ubuntu test and added to standard testing matrix
- ([#2396](https://github.com/nf-core/tools/pull/2396)) Reduce container finding error to warning since the registries are not consistent.

### Download

Expand Down
7 changes: 4 additions & 3 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ def check_process_section(self, lines, registry, fix_version, progress_bar):
if url is None:
continue
try:
container_url = "https://" + urlunparse(url) if not url.scheme == "https" else urlunparse(url)
response = requests.head(
"https://" + urlunparse(url) if not url.scheme == "https" else urlunparse(url),
container_url,
stream=True,
allow_redirects=True,
)
Expand All @@ -360,10 +361,10 @@ def check_process_section(self, lines, registry, fix_version, progress_bar):
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
continue
if not response.ok:
self.failed.append(
self.warned.append(
(
"container_links",
f"Unable to connect to {response.url}, status code: {response.status_code}",
f"Unable to connect to container registry, code: {response.status_code}, url: {response.url}",
self.main_nf,
)
)
Expand Down

0 comments on commit e964a40

Please sign in to comment.