Skip to content

Draft: Migrate to UrfaveCLI v3 #12184

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

Closed
wants to merge 2 commits into from
Closed

Conversation

acheong08
Copy link

@acheong08 acheong08 commented Apr 21, 2025

Proposed Changes

Migrate to urfaveCLI v3, following the migration guide. Notable changes include:

  • StringSliceFlag -> []string
  • EnvVars: []string{} -> cli.EnvVars()
  • MAJOR CHANGE: cli.Context has been completely removed

Types of Changes

CLI migration

Verification

¯_(ツ)_/¯ - TODO - Works on my machine

Testing

Linked Issues

User-Facing Change

`-i` option for `k3s completion` removed to allow for auto generated completions. TBD - Might be rolled back and simply add hard coded fish/powershell completions following previous style

Further Comments

I did this purely to have fish autocomple. Feel free to ignore.

@acheong08 acheong08 requested a review from a team as a code owner April 21, 2025 09:39
@acheong08 acheong08 marked this pull request as draft April 21, 2025 09:39
@acheong08
Copy link
Author

There are still issues to be resolved, namely

Fish completion still doesn't work properly

@dereknola
Copy link
Member

dereknola commented Apr 21, 2025

Due to how containerd is embedded inside K3s, we cannot move to urfaveCLI v3 until that project also moves to it. I handled the migration to V2... and it took 2 years to complete that project.

@acheong08
Copy link
Author

acheong08 commented Apr 22, 2025

Due to how containerd is embedded inside K3s

Yup I noticed there were still places that relied on v2 - rip. I might just use the partial migration to generate fish completions and that's it

@acheong08 acheong08 closed this Apr 22, 2025
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