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

chore(kumactl) add command argument count parameters #3010

Merged
merged 1 commit into from
Oct 26, 2021
Merged

chore(kumactl) add command argument count parameters #3010

merged 1 commit into from
Oct 26, 2021

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Oct 26, 2021

Summary

Add cobra argument count specifiers to all the kumactl subcommands. This
improve command-line validation and lets cobra emit better error messages.

Full changelog

  • Improved kumactl argument validation.

Issues resolved

N/A

Documentation

N/A

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

Add cobra argument count specifiers to all the kumactl subcommands. This
improve command-line validation and lets cobra emit better error messages.

Signed-off-by: James Peach <james.peach@konghq.com>
@jpeach jpeach requested a review from a team as a code owner October 26, 2021 05:43
Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov-commenter
Copy link

Codecov Report

Merging #3010 (dedc4c9) into master (21b0d4d) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3010      +/-   ##
==========================================
+ Coverage   52.27%   52.30%   +0.03%     
==========================================
  Files         913      913              
  Lines       52857    52871      +14     
==========================================
+ Hits        27630    27656      +26     
+ Misses      23026    23011      -15     
- Partials     2201     2204       +3     
Impacted Files Coverage Δ
app/kumactl/cmd/apply/apply.go 75.00% <100.00%> (+0.26%) ⬆️
app/kumactl/cmd/completion/completion.go 100.00% <100.00%> (ø)
...pp/kumactl/cmd/config/config_control_planes_add.go 81.94% <100.00%> (+0.25%) ⬆️
...p/kumactl/cmd/config/config_control_planes_list.go 100.00% <100.00%> (ø)
...kumactl/cmd/config/config_control_planes_remove.go 91.66% <100.00%> (+0.36%) ⬆️
...kumactl/cmd/config/config_control_planes_switch.go 90.00% <100.00%> (+0.52%) ⬆️
app/kumactl/cmd/config/config_view.go 84.61% <100.00%> (+1.28%) ⬆️
app/kumactl/cmd/generate/generate_certificate.go 78.94% <100.00%> (+0.56%) ⬆️
...p/kumactl/cmd/generate/generate_dataplane_token.go 94.44% <100.00%> (+0.15%) ⬆️
app/kumactl/cmd/generate/generate_signing_key.go 93.75% <100.00%> (+0.20%) ⬆️
... and 6 more

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 21b0d4d...dedc4c9. Read the comment docs.

@jpeach jpeach merged commit cecbe63 into kumahq:master Oct 26, 2021
mergify bot pushed a commit that referenced this pull request Oct 26, 2021
(cherry picked from commit cecbe63)

# Conflicts:
#	app/kumactl/cmd/generate/generate_signing_key.go
jpeach added a commit that referenced this pull request Oct 26, 2021
(cherry picked from commit cecbe63)
Signed-off-by: James Peach <james.peach@konghq.com>
jpeach added a commit that referenced this pull request Oct 26, 2021
(cherry picked from commit cecbe63)
Signed-off-by: James Peach <james.peach@konghq.com>

Co-authored-by: James Peach <james.peach@konghq.com>
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.

None yet

3 participants