Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

tctl: always format resources as lists in JSON/YAML #4281

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

awly
Copy link
Contributor

@awly awly commented Sep 1, 2020

This makes it more practical for parsing (e.g. with jq).

Also, refactor the formatting code because all JSON/YAML formatting is
the same.

@awly
Copy link
Contributor Author

awly commented Sep 8, 2020

The original behavior was introduced in #652.
I don't see a specific reason in code comments or commit description.

@awly
Copy link
Contributor Author

awly commented Sep 8, 2020

OK, the original behavior was imitating the behavior of older kubectl get versions.
At least in 1.18, kubectl get also always returns a list.

Copy link
Contributor

@fspmarshall fspmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+7 -245

Nice.

@benarent
Copy link
Contributor

I reviewed this with @russjones I think since it can potentially cause a breaking change for customers scripts we should add this 5.0 and list it as a potential breaking changes to customers automation scripts.

@awly awly added this to the 5.0 "Snoqualmie" milestone Sep 17, 2020
@webvictim
Copy link
Contributor

Sounds good - should we close this for now, then reopen and merge it after we've cut the 4.4 branch?

@benarent
Copy link
Contributor

Let's keep it open, adding to the milestone is enough for now.

@awly awly force-pushed the andrew/tctl-resource-formatting branch from 5e23069 to 1502a61 Compare October 19, 2020 17:25
@awly
Copy link
Contributor Author

awly commented Oct 19, 2020

branch/4.4 has been cut.
I've rebased this PR on master and will merge a soon as tests pass.

This makes it more practical for parsing (e.g. with `jq`).

Also, refactor the formatting code because all JSON/YAML formatting is
the same.
@awly awly force-pushed the andrew/tctl-resource-formatting branch from 1502a61 to b9bb485 Compare October 19, 2020 17:36
@awly awly merged commit f6eb065 into master Oct 19, 2020
@awly awly deleted the andrew/tctl-resource-formatting branch October 19, 2020 17:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants