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 --audit flag to minikube logs command #13991

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

EdwinWalela
Copy link
Contributor

@EdwinWalela EdwinWalela commented Apr 20, 2022

Fixes #13978

I haven't included tests since this test seems to be checking if the minikube logs command output contains keywords i.e Audit

func validateLogsCmd(ctx context.Context, t *testing.T, profile string) {

Running minikube logs --audit=true before PR:

Error: unknown flag: --audit
See 'minikube logs --help' for usage.

Running minikube logs --audit=true after PR

==> Audit <==
|--------------|--------------------|----------|-------|--------------|-------------------------------|-------------------------------|
|   Command    |        Args        | Profile  | User  |   Version    |          Start Time           |           End Time            |
|--------------|--------------------|----------|-------|--------------|-------------------------------|-------------------------------|
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 09:31:52 EAT | Wed, 23 Mar 2022 09:31:53 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 09:42:38 EAT | Wed, 23 Mar 2022 09:42:38 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 11:42:17 EAT | Wed, 23 Mar 2022 11:42:18 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 12:00:25 EAT | Wed, 23 Mar 2022 12:00:25 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 14:04:07 EAT | Wed, 23 Mar 2022 14:04:08 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 14:13:57 EAT | Wed, 23 Mar 2022 14:13:58 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 14:36:19 EAT | Wed, 23 Mar 2022 14:36:20 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 14:42:12 EAT | Wed, 23 Mar 2022 14:45:22 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 16:25:24 EAT | Wed, 23 Mar 2022 16:25:25 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 23 Mar 2022 19:40:40 EAT | Wed, 23 Mar 2022 19:40:42 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 24 Mar 2022 09:15:08 EAT | Thu, 24 Mar 2022 09:15:09 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 24 Mar 2022 09:38:38 EAT | Thu, 24 Mar 2022 09:38:39 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 24 Mar 2022 10:00:17 EAT | Thu, 24 Mar 2022 10:00:18 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 24 Mar 2022 16:55:30 EAT | Thu, 24 Mar 2022 16:55:30 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Fri, 25 Mar 2022 09:03:00 EAT | Fri, 25 Mar 2022 09:03:01 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Mon, 28 Mar 2022 09:22:00 EAT | Mon, 28 Mar 2022 09:22:01 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Mon, 28 Mar 2022 10:17:43 EAT | Mon, 28 Mar 2022 10:17:43 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Mon, 28 Mar 2022 11:56:06 EAT | Mon, 28 Mar 2022 11:56:06 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Tue, 29 Mar 2022 09:45:57 EAT | Tue, 29 Mar 2022 09:45:58 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Tue, 29 Mar 2022 11:55:14 EAT | Tue, 29 Mar 2022 11:55:15 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 30 Mar 2022 08:30:33 EAT | Wed, 30 Mar 2022 08:30:35 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 30 Mar 2022 11:11:23 EAT | Wed, 30 Mar 2022 11:11:27 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 30 Mar 2022 14:58:45 EAT | Wed, 30 Mar 2022 14:58:50 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 31 Mar 2022 08:35:04 EAT | Thu, 31 Mar 2022 08:35:06 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 31 Mar 2022 10:48:41 EAT | Thu, 31 Mar 2022 10:48:42 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 31 Mar 2022 16:06:11 EAT | Thu, 31 Mar 2022 16:06:12 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 31 Mar 2022 16:43:59 EAT | Thu, 31 Mar 2022 16:44:00 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Fri, 01 Apr 2022 09:04:48 EAT | Fri, 01 Apr 2022 09:04:49 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Fri, 01 Apr 2022 11:29:57 EAT | Fri, 01 Apr 2022 11:29:58 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Tue, 05 Apr 2022 09:51:42 EAT | Tue, 05 Apr 2022 09:51:43 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Thu, 07 Apr 2022 14:26:02 EAT | Thu, 07 Apr 2022 14:26:03 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Tue, 12 Apr 2022 09:58:01 EAT | Tue, 12 Apr 2022 09:58:02 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Wed, 13 Apr 2022 09:17:01 EAT | Wed, 13 Apr 2022 09:22:57 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 13 Apr 2022 14:13:05 EAT | Wed, 13 Apr 2022 14:13:06 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Thu, 14 Apr 2022 08:33:45 EAT | Thu, 14 Apr 2022 08:36:37 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Fri, 15 Apr 2022 11:56:46 EAT | Fri, 15 Apr 2022 11:59:45 EAT |
| stop         |                    | minikube | edwin | v1.25.1      | Fri, 15 Apr 2022 12:50:25 EAT | Fri, 15 Apr 2022 12:50:37 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Fri, 15 Apr 2022 12:51:02 EAT | Fri, 15 Apr 2022 12:52:52 EAT |
| stop         |                    | minikube | edwin | v1.25.1      | Fri, 15 Apr 2022 13:01:47 EAT | Fri, 15 Apr 2022 13:01:59 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Fri, 15 Apr 2022 13:02:04 EAT | Fri, 15 Apr 2022 13:03:53 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Tue, 19 Apr 2022 11:12:26 EAT | Tue, 19 Apr 2022 11:15:08 EAT |
| logs         | --help             | minikube | edwin | v1.25.1      | Tue, 19 Apr 2022 11:53:10 EAT | Tue, 19 Apr 2022 11:53:10 EAT |
| stop         |                    | minikube | edwin | v1.25.1      | Tue, 19 Apr 2022 15:03:15 EAT | Tue, 19 Apr 2022 15:03:27 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Tue, 19 Apr 2022 15:19:41 EAT | Tue, 19 Apr 2022 15:21:57 EAT |
| stop         |                    | minikube | edwin | v1.25.1      | Tue, 19 Apr 2022 15:46:53 EAT | Tue, 19 Apr 2022 15:47:06 EAT |
| start        |                    | minikube | edwin | v1.25.1      | Tue, 19 Apr 2022 15:48:21 EAT | Tue, 19 Apr 2022 15:49:22 EAT |
| update-check |                    | minikube | edwin | v1.25.1      | Wed, 20 Apr 2022 08:59:15 EAT | Wed, 20 Apr 2022 08:59:16 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 19:57:00 EAT | Wed, 20 Apr 2022 19:57:00 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 19:57:26 EAT | Wed, 20 Apr 2022 19:57:26 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 19:58:27 EAT | Wed, 20 Apr 2022 19:58:27 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 19:59:27 EAT | Wed, 20 Apr 2022 19:59:27 EAT |
| logs         | --audit=true       | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:00:37 EAT | Wed, 20 Apr 2022 20:00:37 EAT |
| logs         | --audit=true       | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:01:14 EAT | Wed, 20 Apr 2022 20:01:15 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:01:23 EAT | Wed, 20 Apr 2022 20:01:23 EAT |
| logs         | --audit=true -n=1  | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:01:32 EAT | Wed, 20 Apr 2022 20:01:32 EAT |
| logs         | --audit=true -n=10 | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:01:37 EAT | Wed, 20 Apr 2022 20:01:37 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:08:01 EAT | Wed, 20 Apr 2022 20:08:01 EAT |
| logs         | --help             | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:22:19 EAT | Wed, 20 Apr 2022 20:22:19 EAT |
| logs         | --audit=true -n=10 | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:22:28 EAT | Wed, 20 Apr 2022 20:22:28 EAT |
| logs         | --audit=true -n=1  | minikube | edwin | v0.0.0-unset | Wed, 20 Apr 2022 20:22:31 EAT | Wed, 20 Apr 2022 20:22:31 EAT |
|--------------|--------------------|----------|-------|--------------|-------------------------------|-------------------------------|

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 20, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: EdwinWalela / name: Edwin Walela (4684903)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Apr 20, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @EdwinWalela!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 20, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @EdwinWalela. 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 the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 20, 2022
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 20, 2022
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.

do u mind please put before/after this PR output of minikube in the PR description ?

@EdwinWalela
Copy link
Contributor Author

@medyagh I have updated the description

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

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

Hi @EdwinWalela, this PR looks good, could you please just run make generate-docs and include the documentation changes (new flag) into this PR, thanks! After that it will be good to merge.

@medyagh
Copy link
Member

medyagh commented Apr 21, 2022

/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 Apr 21, 2022
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13991) |
+----------------+----------+---------------------+
| minikube start | 52.1s    | 52.0s               |
| enable ingress | 30.3s    | 29.4s               |
+----------------+----------+---------------------+

Times for minikube start: 51.2s 50.8s 54.8s 51.2s 52.6s
Times for minikube (PR 13991) start: 51.3s 52.0s 52.2s 52.7s 51.7s

Times for minikube ingress: 30.1s 30.1s 30.1s 31.1s 30.1s
Times for minikube (PR 13991) ingress: 29.1s 29.6s 29.1s 29.7s 29.6s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13991) |
+----------------+----------+---------------------+
| minikube start | 26.0s    | 25.2s               |
| enable ingress | 22.4s    | 23.0s               |
+----------------+----------+---------------------+

Times for minikube start: 29.9s 24.8s 25.5s 25.2s 24.8s
Times for minikube (PR 13991) start: 25.1s 25.4s 25.3s 25.2s 25.1s

Times for minikube ingress: 21.9s 22.5s 22.0s 21.9s 23.5s
Times for minikube (PR 13991) ingress: 23.0s 23.4s 22.4s 23.0s 23.0s

docker driver with containerd runtime

+-------------------+----------+---------------------+
|      COMMAND      | MINIKUBE | MINIKUBE (PR 13991) |
+-------------------+----------+---------------------+
| minikube start    | 35.4s    | 39.9s               |
| ⚠️  enable ingress | 22.3s    | 30.2s ⚠️             |
+-------------------+----------+---------------------+

Times for minikube start: 29.7s 28.6s 39.3s 40.4s 39.0s
Times for minikube (PR 13991) start: 39.9s 39.8s 39.7s 40.7s 39.5s

Times for minikube ingress: 22.5s 22.4s 22.4s 22.0s 22.5s
Times for minikube (PR 13991) ingress: 21.9s 22.4s 22.4s 31.9s 52.4s

@EdwinWalela
Copy link
Contributor Author

@spowelljr, I have updated the docs using make generate-docs command. Let me know if there's something I've missed out.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13991) |
+----------------+----------+---------------------+
| minikube start | 51.8s    | 51.7s               |
| enable ingress | 29.4s    | 28.7s               |
+----------------+----------+---------------------+

Times for minikube (PR 13991) start: 52.0s 51.0s 52.0s 52.1s 51.6s
Times for minikube start: 53.6s 50.4s 51.2s 51.4s 52.3s

Times for minikube ingress: 29.1s 28.5s 29.6s 30.0s 29.6s
Times for minikube (PR 13991) ingress: 28.6s 29.1s 30.1s 26.5s 29.1s

docker driver with docker runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10
docker driver with containerd runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for your contribution!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EdwinWalela, spowelljr

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 Apr 22, 2022
@spowelljr spowelljr merged commit 58eed15 into kubernetes:master Apr 22, 2022
@EdwinWalela EdwinWalela deleted the edwin-dev branch December 8, 2022 12:58
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --audit flag to minikube logs that only shows audit
6 participants