Skip to content

Conversation

vitorsavian
Copy link
Member

@vitorsavian vitorsavian commented Jul 10, 2025

Proposed Changes

  • better structure for shell completion command, this new structure for this command is to avoid unnecessary problems specially related to verify input from the user
k3s completion --help
k3s completion bash --help
k3s completion zsh --help

Types of Changes

  • Fix

Verification

  • you can see that the two of them are separated commands by
k3s completion --help
  • the verification to test if it's working as expected is
k3s completion bash -i
  • and then
source ~/.bashrc

Testing

Linked Issues

User-Facing Change

k3s completion shell command will now be separate to specific subcommands for bash and zsh

Further Comments

* Refac for shell completion

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

* Change FLAGS to OPTIONS

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

* Refac bash and zsh func names

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

* Refac bash and zsh func names

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

---------

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.

Project coverage is 19.92%. Comparing base (04c46af) to head (503a4cc).
Report is 1 commits behind head on release-1.33.

Files with missing lines Patch % Lines
pkg/cli/completion/completion.go 0.00% 28 Missing ⚠️
pkg/cli/cmds/completion.go 0.00% 25 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (04c46af) and HEAD (503a4cc). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (04c46af) HEAD (503a4cc)
unittests 4 2
e2etests 1 0
Additional details and impacted files
@@                Coverage Diff                @@
##           release-1.33   #12605       +/-   ##
=================================================
- Coverage         40.53%   19.92%   -20.61%     
=================================================
  Files               187      184        -3     
  Lines             19337    19245       -92     
=================================================
- Hits               7838     3835     -4003     
- Misses            10309    14978     +4669     
+ Partials           1190      432      -758     
Flag Coverage Δ
e2etests ?
unittests 19.92% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vitorsavian vitorsavian marked this pull request as ready for review July 10, 2025 21:16
@vitorsavian vitorsavian requested a review from a team as a code owner July 10, 2025 21:16
@vitorsavian vitorsavian merged commit 03587fd into k3s-io:release-1.33 Jul 11, 2025
54 checks passed
@vitorsavian vitorsavian deleted the refac-shell-completion-1.33 branch August 6, 2025 17:15
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