adobe/aio-cli-plugin-runtime

Cannot list 200 activations

ackoch opened this issue · 6 comments

Describe the bug

aio rt activation list --help allows rolling back the last 200 activations.. but it fails at any number > 50

➜  aio rt activation list --help    
Lists all the Activations

USAGE
  $ aio runtime:activation:list [ACTIVATION_NAME]

OPTIONS
  -c, --count              show only the total number of activations
  -f, --full               include full activation description
  -i, --insecure           bypass certificate check
  -l, --limit=limit        only return LIMIT number of activations from the collection with a maximum LIMIT of 200 activations (default 30)
  -s, --skip=skip          exclude the first SKIP number of activations from the result

...

ALIASES
 ...

➜  aio rt activation list --limit=200
 ›   Error: failed to list the activations: the query parameter 'limit' was malformed:
 ›   the value '200' is not in the range of 0 to 50 for activations. (400 Bad Request)
 ›    specify --verbose flag for more information

To Reproduce

see above

Expected behavior

While I could agree that a DEV instance might throttle the number of parallel actions in flight, I don't see any reason, why this would also limit the listing of finished activations..

Anyhow.. hhe number stated in the "--help" section should be in alignment with the actual behaviour..

Desktop (please complete the following information):
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 56.95 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.20.0 - ~/.nvm/versions/node/v12.20.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - ~/.nvm/versions/node/v12.20.0/bin/npm
Virtualization:
Docker: 20.10.5 - /usr/local/bin/docker
npmGlobalPackages:
@adobe/aio-cli: 6.0.0
CLI plugins:
@adobe/aio-cli 6.0.0 (core)
@adobe/aio-cli-plugin-app 6.1.0 (core)
@adobe/aio-cli-plugin-auth 2.4.1 (core)
@adobe/aio-cli-plugin-certificate 0.2.1 (core)
@adobe/aio-cli-plugin-cloudmanager 1.3.4 (user)
@adobe/aio-cli-plugin-config 2.3.0 (core)
@adobe/aio-cli-plugin-console 3.3.0 (core)
@adobe/aio-cli-plugin-events 1.1.0 (core)
@adobe/aio-cli-plugin-ims 2.0.0 (user)
@adobe/aio-cli-plugin-info 1.1.1 (core)
@adobe/aio-cli-plugin-runtime 3.1.0 (user)
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-help 2.2.3 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)

The limit is set server-side. The cli would fix the value

to match the server.

that's what I am saying. So, we can't provide the correct number in the "--help" we should alter the "--help" section.. like

only return LIMIT number of activations from the collection with a maximum LIMIT determined by the server (typically 200 for production and 50 for dev) (default 30)

Good suggestion on the wording @ackoch . Would you like to contribute through a PR ?

The documentation for relevant limits from IO Runtime have been added at https://adobedocs.github.io/adobeio-runtime/guides/system_settings.html under the limit name of list. The CLI has no limits.