fix(registry): use RepositoryV2 displayer for list-v2 commands#1851
Open
lohitkolluri wants to merge 2 commits into
Open
fix(registry): use RepositoryV2 displayer for list-v2 commands#1851lohitkolluri wants to merge 2 commits into
lohitkolluri wants to merge 2 commits into
Conversation
The list-v2 subcommands registered the v1 Repository displayer, which advertised the wrong --format columns and broke scripted output that relies on --format and --no-header. Fixes digitalocean#1797
Author
|
@kishlay-singh-DO when you have a moment, could you please take a look at this? Thank You. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
displayers.RepositoryV2forregistry repository list-v2andregistries repository list-v2so--formatand--no-headeruse the correct column definitions.RepositoryV2Displayablecompile-time assertion.--format Name --no-headeroutput.Problem
list-v2registered the v1Repositorydisplayer while rendering v2 data. That caused--formathelp to list the wrong columns and prevented scripted output from honoring--format/--no-headeras reported in #1797.Test plan
go test ./commands/ -run TestRepositoryListV2 -count=1doctl registry repository list-v2 --format Name --no-headerreturns only repository namesFixes #1797