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: Drop container error to warning #2396

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
asp8200 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading