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

nf-core modules lint fails when using new container registry #2280

Closed
drpatelh opened this issue May 5, 2023 · 4 comments
Closed

nf-core modules lint fails when using new container registry #2280

drpatelh opened this issue May 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@drpatelh
Copy link
Member

drpatelh commented May 5, 2023

Description of the bug

Running the following command in a clone of nf-core/modules raises an error because the container isn't reachable. Presumably this is because the docker.registry isn't being factored into the check @adamrtalbot ?

$ nf-core modules lint cat/fastq


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.8 - https://nf-co.re


INFO     Linting modules repo: '.'                                                                                                                                    
INFO     Linting module: 'cat/fastq'                                                                                                                                  

╭─ [✗] 1 Module Test Failed ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                           ╷                                   ╷                                                                                    │
│ Module name                               │ File path                         │ Test message                                                                       │
│╶──────────────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────╴│
│ cat/fastq                                 │ modules/nf-core/cat/fastq/main.nf │ Unable to connect to container URL                                                 │
│                                           ╵                                   ╵                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
│ LINT RESULTS SUMMARY  │
├───────────────────────┤
│ [✔]  24 Tests Passed  │
│ [!]   0 Test Warnings │
│ [✗]   1 Test Failed   │
╰───────────────────────╯
(
@adamrtalbot
Copy link
Contributor

Hmmm we looked at that and fixed it. Could you print verbose here?

@adamrtalbot
Copy link
Contributor

I don't get the same problem:

~/modules$ nf-core modules lint cat/fastq

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.8 - https://nf-co.re


INFO     Linting modules repo: '.'                                                                                                                                                                                  
INFO     Linting module: 'cat/fastq'                                                                                                                                                                                

╭─ [!] 1 Module Test Warning ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                           ╷                                   ╷                                                                                                                                  │
│ Module name                               │ File path                         │ Test message                                                                                                                     │
│╶──────────────────────────────────────────┼───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╴│
│ cat/fastq                                 │ modules/nf-core/cat/fastq/main.nf │ Container versions do not match                                                                                                  │
│                                           ╵                                   ╵                                                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────╮
│ LINT RESULTS SUMMARY │
├──────────────────────┤
│ [✔]  22 Tests Passed │
│ [!]   1 Test Warning │
│ [✗]   0 Tests Failed │
╰──────────────────────╯

@drpatelh
Copy link
Member Author

drpatelh commented May 5, 2023

Can you pull in the latest changes on master and re-run?

This is what I get with verbose:

$ nf-core --verbose modules lint cat/fastq

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.8 - https://nf-co.re


DEBUG    Failed checking if running in CYGWIN due to: FileNotFoundError(2, 'No such file or directory')                                                    util.py:405
DEBUG    Popen(['git', 'version'], cwd=/home/harshil/.config/nfcore/nf-core/modules, universal_newlines=False, shell=None, istream=None)                    cmd.py:976
DEBUG    Popen(['git', 'fetch', '-v', '--progress', '--', 'origin'], cwd=/home/harshil/.config/nfcore/nf-core/modules, universal_newlines=True, shell=None, cmd.py:976
         istream=None)                                                                                                                                                
DEBUG    Popen(['git', 'checkout', 'master'], cwd=/home/harshil/.config/nfcore/nf-core/modules, universal_newlines=False, shell=None, istream=None)         cmd.py:976
DEBUG    Popen(['git', 'merge', 'origin/master'], cwd=/home/harshil/.config/nfcore/nf-core/modules, universal_newlines=False, shell=None, istream=None)     cmd.py:976
DEBUG    Using config file: /home/harshil/.config/nfcore/nf-core/modules/.nf-core.yml                                                                     utils.py:965
DEBUG    Using config file: .nf-core.yml                                                                                                                  utils.py:965
INFO     Linting modules repo: '.'                                                                                                                     __init__.py:213
INFO     Linting module: 'cat/fastq'                                                                                                                   __init__.py:217
DEBUG    Connected to URL: https://depot.galaxyproject.org/singularity/ubuntu:20.04, status_code: 200                                                   main_nf.py:326
DEBUG    Starting new HTTPS connection (1): nf-core:443                                                                                         connectionpool.py:1003
DEBUG    Unable to connect to url 'nf-core/ubuntu:20.04' due to error: HTTPSConnectionPool(host='nf-core', port=443): Max retries exceeded with url:    main_nf.py:331
         /ubuntu:20.04 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fcdbfe047c0>: Failed to establish a new                        
         connection: [Errno -2] Name or service not known'))                                                                                                          
DEBUG    Printing final results                                                                                                                        __init__.py:346

DEBUG    entering code: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                    code.py:10
DEBUG    entering fence: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                  fence.py:10
DEBUG    entering blockquote: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                        blockquote.py:13
DEBUG    entering hr: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                        hr.py:14
DEBUG    entering list: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                    list.py:97
DEBUG    entering reference: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                          reference.py:10
DEBUG    entering html_block: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                        html_block.py:35
DEBUG    entering heading: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                              heading.py:13
DEBUG    entering lheading: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                            lheading.py:11
DEBUG    entering paragraph: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                          paragraph.py:11
DEBUG    entering code: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                    code.py:10
DEBUG    entering fence: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                  fence.py:10
DEBUG    entering blockquote: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                        blockquote.py:13
DEBUG    entering hr: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                        hr.py:14
DEBUG    entering list: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                                    list.py:97
DEBUG    entering reference: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                          reference.py:10
DEBUG    entering html_block: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                        html_block.py:35
DEBUG    entering heading: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                              heading.py:13
DEBUG    entering lheading: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                            lheading.py:11
DEBUG    entering paragraph: StateBlock(line=0,level=0,tokens=0), 0, 1, False                                                                          paragraph.py:11
╭─ [✗] 1 Module Test Failed ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                           ╷                                   ╷                                                                                    │
│ Module name                               │ File path                         │ Test message                                                                       │
│╶──────────────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────╴│
│ cat/fastq                                 │ modules/nf-core/cat/fastq/main.nf │ Unable to connect to container URL                                                 │
│                                           ╵                                   ╵                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
│ LINT RESULTS SUMMARY  │
├───────────────────────┤
│ [✔]  24 Tests Passed  │
│ [!]   0 Test Warnings │
│ [✗]   1 Test Failed   │
╰───────────────────────╯

@adamrtalbot
Copy link
Contributor

Ah it's quay.io but not biocontainers. Darn, I thought I had tested this.

adamrtalbot added a commit to adamrtalbot/tools that referenced this issue May 5, 2023
Changes:
 - Detects simple docker name by having a single slash and colon in the
   string
 - adds quay.io as default registry for this docker container
 - Should fix problems where nfcore/ubuntu:20.04 did not find correct
   URL

fixes nf-core#2280
@ewels ewels closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants