Skip to content

Conversation

vitorsavian
Copy link
Member

@vitorsavian vitorsavian commented Jul 14, 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

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
@vitorsavian vitorsavian requested a review from a team as a code owner July 14, 2025 09:47
Copy link

codecov bot commented Jul 14, 2025

Codecov Report

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

Project coverage is 19.86%. Comparing base (9b775b7) to head (4b228a6).
Report is 2 commits behind head on release-1.30.

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 (9b775b7) and HEAD (4b228a6). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (9b775b7) HEAD (4b228a6)
e2etests 1 0
Additional details and impacted files
@@                Coverage Diff                @@
##           release-1.30   #12633       +/-   ##
=================================================
- Coverage         40.32%   19.86%   -20.46%     
=================================================
  Files               187      184        -3     
  Lines             19223    19131       -92     
=================================================
- Hits               7752     3801     -3951     
- Misses            10280    14901     +4621     
+ Partials           1191      429      -762     
Flag Coverage Δ
e2etests ?
unittests 19.86% <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 merged commit 971bbd5 into k3s-io:release-1.30 Jul 14, 2025
54 checks passed
@vitorsavian vitorsavian deleted the refac-shell-completion-1.30 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