Skip to content
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

Add method for customized box output #11709

Merged
merged 1 commit into from
Jul 27, 2021
Merged

Conversation

dinever
Copy link
Contributor

@dinever dinever commented Jun 21, 2021

Part of #11207

This gives developers the ability to print out customized box output.

For example:

boxCfg := box.Config{
	Py:       1,
	Px:       2,
	TitlePos: "Inside",
	Type:     "Double",
	Color:    "Yellow",
}

out.BoxedWithConfig(boxCfg, style.Warning, "Warning", "This is a warning")

Screenshot from 2021-06-20 23-37-26

@k8s-ci-robot
Copy link
Contributor

Hi @dinever. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 21, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

}

// BoxedWithConfig writes a templated message in a box with customized style config to stdout
func BoxedWithConfig(cfg box.Config, st style.Enum, title string, format string, a ...V) {
Copy link
Member

Choose a reason for hiding this comment

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

this is currently not being used anywhere in the code, and the rule of thumb is not to keep code never used anywhere...how about find a good place/example for this func to be used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this part of the minikube tips feature. Please see my proposal: #11696

I was trying to create smaller PRs for easier review. But I can have all the changes in one PR as well if it makes more sense.

Signed-off-by: Peixuan Ding <dingpeixuan911@gmail.com>
@medyagh
Copy link
Member

medyagh commented Jun 21, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 21, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11709) |
+----------------+----------+---------------------+
| minikube start | 47.8s    | 47.8s               |
| enable ingress | 34.3s    | 33.7s               |
+----------------+----------+---------------------+

Times for minikube start: 49.4s 46.6s 47.7s 48.4s 46.8s
Times for minikube (PR 11709) start: 47.5s 47.2s 46.6s 49.9s 47.7s

Times for minikube ingress: 33.7s 33.8s 34.7s 34.7s 34.6s
Times for minikube (PR 11709) ingress: 34.2s 33.3s 34.2s 34.2s 32.7s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11709) |
+----------------+----------+---------------------+
| minikube start | 21.9s    | 21.6s               |
| enable ingress | 30.5s    | 30.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 30.5s 30.0s 29.5s 31.0s 31.5s
Times for minikube (PR 11709) ingress: 29.0s 36.5s 31.5s 27.5s 29.4s

Times for minikube start: 22.5s 22.2s 20.8s 21.9s 22.3s
Times for minikube (PR 11709) start: 21.3s 22.5s 21.1s 21.9s 21.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11709) |
+----------------+----------+---------------------+
| minikube start | 42.2s    | 43.9s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 31.4s 42.2s 46.5s 43.2s 47.5s
Times for minikube (PR 11709) start: 42.5s 42.8s 43.5s 47.4s 43.3s

@minikube-bot
Copy link
Collaborator

These are the flake rates of all failed tests on KVM_Linux_containerd.

Failed Tests Flake Rate (%)
TestErrorSpam/setup 100.00 (chart)

@dinever
Copy link
Contributor Author

dinever commented Jun 25, 2021

/retest

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

Thank you @dinever for this pr look forward to see more

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinever, medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2021
@medyagh medyagh merged commit 75d0c72 into kubernetes:master Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants