Skip to content

[27.x] cli/command/completion: alias ValidArgsFn instead of strong type#5828

Closed
thaJeztah wants to merge 1 commit intodocker:27.xfrom
thaJeztah:27.x_cobra_compat
Closed

[27.x] cli/command/completion: alias ValidArgsFn instead of strong type#5828
thaJeztah wants to merge 1 commit intodocker:27.xfrom
thaJeztah:27.x_cobra_compat

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

This may help with signature changes in Cobra 1.9.0, which defines a new CompletionFunc type.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

This may help with signature changes in Cobra 1.9.0, which defines
a new CompletionFunc type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 27.5.2 milestone Feb 16, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.58%. Comparing base (915f5cf) to head (ae3d4db).

Additional details and impacted files
@@           Coverage Diff           @@
##             27.x    #5828   +/-   ##
=======================================
  Coverage   58.58%   58.58%           
=======================================
  Files         346      346           
  Lines       29322    29322           
=======================================
  Hits        17178    17178           
  Misses      11171    11171           
  Partials      973      973           

@ccoVeille
Copy link
Copy Markdown

I confirm your fix should work. But please note I provided a PR to fix the issue in cobra

@thaJeztah
Copy link
Copy Markdown
Member Author

Thanks! I opened a draft PR to verify current Cobra main, and locally testing indeed showed it to work; pushed a draft PR (#5829) to also let CI do its thing, but indeed looks fixed. Thanks!!

@tassa-yoniso-manasi-karoto
Copy link
Copy Markdown

I can second @ccoVeille that this does build successfully with cobra v1.9.0

@thaJeztah
Copy link
Copy Markdown
Member Author

Let me close this one, as we don't need it now that cobra updated things in v1.9.1

@thaJeztah thaJeztah closed this Feb 25, 2025
@thaJeztah thaJeztah deleted the 27.x_cobra_compat branch February 25, 2025 14:03
@thaJeztah thaJeztah removed this from the 27.5.2 milestone Feb 25, 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.

4 participants