Skip to content

fix issue with --limit not working correctly - #698

Open
shahzebsiddiqui wants to merge 1 commit into
singularityhub:mainfrom
shahzebsiddiqui:fix_limit_output
Open

fix issue with --limit not working correctly#698
shahzebsiddiqui wants to merge 1 commit into
singularityhub:mainfrom
shahzebsiddiqui:fix_limit_output

Conversation

@shahzebsiddiqui

Copy link
Copy Markdown

@vsoch the original codebase doesnt honor the --limit correctly as shown below.

With --limit 1 i should see 1 entry

(singularity-hpc) ➜  singularity-hpc git:(main) ✗ shpc show --filter tensorflow --limit 1
/Users/shahzebsiddiqui/.local/share/virtualenvs/singularity-hpc-ckWqEIW1/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
SINGULARITY is not installed, functionality might be limited.
jupyter/tensorflow-notebook
nvcr.io/nvidia/tensorflow

Also with --limit 0 i end up seeing more entries so this doesnt work either

(singularity-hpc) ➜  singularity-hpc git:(main) ✗ shpc show --filter tensorflow --limit 0
/Users/shahzebsiddiqui/.local/share/virtualenvs/singularity-hpc-ckWqEIW1/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
SINGULARITY is not installed, functionality might be limited.
jupyter/tensorflow-notebook
nvcr.io/nvidia/tensorflow
quay.io/jupyter/tensorflow-notebook
quay.io/pawsey/tensorflow
rocm/tensorflow
tensorflow/tensorflow

With the proposed change i was able to fix this as shown below

(singularity-hpc) ➜  singularity-hpc git:(fix_limit_output) ✗ shpc show --filter tensorflow --limit 1
/Users/shahzebsiddiqui/.local/share/virtualenvs/singularity-hpc-ckWqEIW1/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
SINGULARITY is not installed, functionality might be limited.
jupyter/tensorflow-notebook

(singularity-hpc) ➜  singularity-hpc git:(fix_limit_output) ✗ shpc show --filter tensorflow --limit 0
/Users/shahzebsiddiqui/.local/share/virtualenvs/singularity-hpc-ckWqEIW1/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
SINGULARITY is not installed, functionality might be limited.
(singularity-hpc) ➜  singularity-hpc git:(fix_limit_output) ✗ 

@vsoch

vsoch commented Aug 19, 2026

Copy link
Copy Markdown
Member

Setting limit to 0 is normally akin to unset (no limit). Asking for a limit of 0 and getting no results is not something that user would logically do. My preference is either to keep limit of 0 to mean no limit, or if the user defines is to be <1, to print a quick error message that the limit must be greater than or equal to 1 and then exit cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants