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

Container warns if permission is denied #2270

Merged
merged 8 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Linting

- Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270))

### Modules

### Subworkflows
Expand Down
7 changes: 5 additions & 2 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,11 @@ def check_process_section(self, lines, fix_version, progress_bar):
log.debug(f"Unable to connect to url '{urlunparse(url)}' due to error: {e}")
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
continue
if response.status_code != 200:
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
if not response.ok:
if response.status_code in [400, 401, 402, 403]:
self.warned.append(("container_links", "Access to container URL denied", self.main_nf))
else:
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
ewels marked this conversation as resolved.
Show resolved Hide resolved

# Check that all bioconda packages have build numbers
# Also check for newer versions
Expand Down