Skip to content

Better help text for activation limit#233

Merged
Himavanth merged 3 commits intomasterfrom
limithelp
Jun 14, 2021
Merged

Better help text for activation limit#233
Himavanth merged 3 commits intomasterfrom
limithelp

Conversation

@Himavanth
Copy link
Copy Markdown
Contributor

Description

Fixes #229

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Himavanth Himavanth requested a review from meryllblanchet June 8, 2021 09:06
@Himavanth
Copy link
Copy Markdown
Contributor Author

@meryllblanchet Could you check the text change ?

limit: flags.integer({
char: 'l',
description: `only return LIMIT number of activations from the collection with a maximum LIMIT of ${ActivationList.limits.max} activations (default 30)`
description: `only return LIMIT number of activations (maximum ${ActivationList.limits.max}). Note that the maximum could be set to a lesser value by the server`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about Note that the maximum set for I/O Runtime is 50 ?

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 8, 2021

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.

limit: flags.integer({
char: 'l',
description: `only return LIMIT number of activations from the collection with a maximum LIMIT of ${ActivationList.limits.max} activations (default 30)`
description: `only return LIMIT number of activations (maximum ${ActivationList.limits.max}). Note that the maximum set for Adobe I/O Runtime is 50`
Copy link
Copy Markdown
Contributor

@rabbah rabbah Jun 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have to repeat this message on al the list commands?

if the Max constant already says 50, do you need the second Adobe/IO part :)

@Himavanth
Copy link
Copy Markdown
Contributor Author

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
Copy link
Copy Markdown

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

@Himavanth
Copy link
Copy Markdown
Contributor Author

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)

@Himavanth Himavanth merged commit cd3867c into master Jun 14, 2021
@Himavanth Himavanth deleted the limithelp branch June 14, 2021 06:47
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.

Cannot list 200 activations

3 participants