adobe / aio-cli-plugin-runtime

Adobe I/O Runtime plugin for the Adobe I/O CLI
https://www.adobe.io
Apache License 2.0
15 stars 31 forks source link

Better help text for activation limit #233

Closed Himavanth closed 3 years ago

Himavanth commented 3 years ago

Description

Fixes https://github.com/adobe/aio-cli-plugin-runtime/issues/229

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

Himavanth commented 3 years ago

@meryllblanchet Could you check the text change ?

codecov[bot] commented 3 years ago

Codecov Report

Merging #233 (6167168) into master (a8b1f61) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #233   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           58        58           
  Lines         1565      1565           
  Branches       308       308           
=========================================
  Hits          1565      1565           
Impacted Files Coverage Δ
src/commands/runtime/action/list.js 100.00% <ø> (ø)
src/commands/runtime/activation/list.js 100.00% <ø> (ø)
src/commands/runtime/package/list.js 100.00% <ø> (ø)
src/commands/runtime/route/list.js 100.00% <ø> (ø)
src/commands/runtime/rule/list.js 100.00% <ø> (ø)
src/commands/runtime/trigger/list.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a8b1f61...6167168. Read the comment docs.

Himavanth commented 3 years ago

On second thought, since these limits are set by the server and there is no way for the CLI to know the limits in advance, I think the CLI should refrain from saying anything about the limits and just pass it on. An invalid limit will return an error message from the server with the valid range. eg:- the value '51' is not in the range of 0 to 50 for actions. This would also avoid us having to change the limits in future if the server changes them.

meryllblanchet commented 3 years ago

Makes sense, what description would you then propose for the CLI listing commands?

Himavanth commented 3 years ago

I would propose to keep the existing text after removing the absolute numbers for the limits. So the description would become only return LIMIT number of activations instead of only return LIMIT number of activations from the collection with a maximum LIMIT of 50 activations (default 30)