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

Set 'currentstep' for PullingBaseImage json event #9844

Merged

Conversation

ilya-zuyev
Copy link
Contributor

Fixes #9754

Before:

izuyev@izuyev-macbookpro --- z/minikube ‹gh_9754_downloadprogress_currentstep* M?› » out/minikube start --driver=docker -o=json -v=8 | tee start.log
{"data":{"currentstep":"0","message":"minikube v1.15.1 on Darwin 10.15.7","name":"Initial Minikube Setup","totalsteps":"12"},"datacontenttype":"application/json","id":"aa727e4d-a5df-48d8-8a7d-7563a33d2e01","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}
{"data":{"currentstep":"1","message":"Using the docker driver based on user configuration","name":"Selecting Driver","totalsteps":"12"},"datacontenttype":"application/json","id":"5893b876-f201-40b1-9169-b00888677fa3","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}
{"data":{"currentstep":"3","message":"Starting control plane node minikube in cluster minikube","name":"Starting Node","totalsteps":"12"},"datacontenttype":"application/json","id":"a5d9eaa4-73f8-4bd1-8eef-395a3f68c1e3","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}
{"data":{.     "currentstep":"",     "message":"Pulling base image ...","name":"Pulling Base Image","totalsteps":"12"},"datacontenttype":"application/json","id":"1143f123-0f34-4e7b-8e0a-7527c65eb38e","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}

After:

izuyev@izuyev-macbookpro --- z/minikube ‹gh_9754_downloadprogress_currentstep* M?› » out/minikube start --driver=docker -o=json -v=8 | tee start.log
{"data":{"currentstep":"0","message":"minikube v1.15.1 on Darwin 10.15.7","name":"Initial Minikube Setup","totalsteps":"13"},"datacontenttype":"application/json","id":"f6b4ea90-0704-419e-a108-bc1c657e6942","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}
{"data":{"currentstep":"1","message":"Using the docker driver based on existing profile","name":"Selecting Driver","totalsteps":"13"},"datacontenttype":"application/json","id":"e93110b7-1d22-45a4-ae26-24413593f499","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}
{"data":{"currentstep":"3","message":"Starting control plane node minikube in cluster minikube","name":"Starting Node","totalsteps":"13"},"datacontenttype":"application/json","id":"c83a685a-07b6-4673-83bd-af367a8ff021","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}
{"data":{.   "currentstep":"4",    "message":"Pulling base image ...","name":"Pulling Base Image","totalsteps":"13"},"datacontenttype":"application/json","id":"8e392ad7-808c-4c37-83b4-19f4e3807894","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 4, 2020
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 4, 2020
Copy link

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

lgtm, let's make sure tests pass -- looks like there's a lint error

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2020
@medyagh
Copy link
Member

medyagh commented Dec 4, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 4, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
error collecting results for kvm2 driver: timing run 0 with Minikube (PR 9844): timing cmd: [/home/performance-monitor/.minikube/minikube-binaries/9844/minikube start --driver=kvm2]: starting cmd: fork/exec /home/performance-monitor/.minikube/minikube-binaries/9844/minikube: exec format error
docker Driver
error collecting results for docker driver: timing run 0 with Minikube (PR 9844): timing cmd: [/home/performance-monitor/.minikube/minikube-binaries/9844/minikube start --driver=docker]: starting cmd: fork/exec /home/performance-monitor/.minikube/minikube-binaries/9844/minikube: exec format error

if err != nil {
t.Errorf("failed to download only. args: %q %v", args, err)
}
s := bufio.NewScanner(bytes.NewReader(rt.Stdout.Bytes()))
Copy link
Member

Choose a reason for hiding this comment

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

This could potentially be a Subtest
another t.Run with a name like "validateStepNumber"

so when it fails we know exaclty what part of download only test failed

example of adding subtests in TestStartStop test
https://github.com/medyagh/minikube/blob/b6ee8f2f6777921a87959df78e2497fafc9c5864/test/integration/start_stop_delete_test.go#L100

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: 66.8s 63.0s 62.1s
Average time for minikube: 64.0s

Times for Minikube (PR 9844): 62.0s 61.9s 63.9s
Average time for Minikube (PR 9844): 62.6s

Averages Time Per Log

+--------------------------------+----------+--------------------+
|              LOG               | MINIKUBE | MINIKUBE (PR 9844) |
+--------------------------------+----------+--------------------+
| * minikube v1.15.1 on Debian   | 0.1s     | 0.0s               |
|                           9.11 |          |                    |
| * Using the kvm2 driver based  | 0.0s     | 0.0s               |
| on user configuration          |          |                    |
| * Starting control plane node  | 0.0s     | 0.0s               |
| minikube in cluster minikube   |          |                    |
| * Creating kvm2 VM (CPUs=2,    | 38.8s    | 36.8s              |
| Memory=3700MB, Disk=20000MB)   |          |                    |
| ...                            |          |                    |
| * Preparing Kubernetes v1.19.4 | 23.2s    | 23.8s              |
| on Docker 19.03.13 ...         |          |                    |
| * Verifying Kubernetes         | 1.5s     | 1.7s               |
| components...                  |          |                    |
| * Enabled addons:              | 0.8s     |                    |
| default-storageclass,          |          |                    |
| storage-provisioner            |          |                    |
|                                | 0.1s     | 0.0s               |
|   - Want kubectl v1.19.4? Try  |          |                    |
| 'minikube kubectl -- get pods  |          |                    |
| -A'                            |          |                    |
| * Done! kubectl is now         |          |                    |
| configured to use "minikube"   |          |                    |
| cluster and "default"          |          |                    |
| namespace by default           |          |                    |
+--------------------------------+----------+--------------------+

docker Driver
Times for minikube: 29.6s 27.9s 28.9s
Average time for minikube: 28.8s

Times for Minikube (PR 9844): 28.4s 29.4s 29.9s
Average time for Minikube (PR 9844): 29.2s

Averages Time Per Log

+--------------------------------+----------+--------------------+
|              LOG               | MINIKUBE | MINIKUBE (PR 9844) |
+--------------------------------+----------+--------------------+
| * minikube v1.15.1 on Debian   | 0.2s     | 0.2s               |
|                           9.11 |          |                    |
| * Using the docker driver      | 0.1s     | 0.1s               |
| based on user configuration    |          |                    |
| * Starting control plane node  | 0.1s     | 0.1s               |
| minikube in cluster minikube   |          |                    |
| * Creating docker container    | 9.0s     | 8.7s               |
| (CPUs=2, Memory=3700MB) ...    |          |                    |
| * Preparing Kubernetes v1.19.4 | 18.1s    | 19.1s              |
| on Docker 19.03.13 ...         |          |                    |
| * Verifying Kubernetes         | 1.1s     | 1.1s               |
| components...                  |          |                    |
| * Enabled addons:              | 0.1s     | 0.1s               |
| default-storageclass,          |          |                    |
| storage-provisioner            |          |                    |
|                                | 0.0s     | 0.0s               |
|   - Want kubectl v1.19.4? Try  |          |                    |
| 'minikube kubectl -- get pods  |          |                    |
| -A'                            |          |                    |
| * Done! kubectl is now         |          |                    |
| configured to use "minikube"   |          |                    |
| cluster and "default"          |          |                    |
| namespace by default           |          |                    |
+--------------------------------+----------+--------------------+

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ilya-zuyev, priyawadhwa, sharifelgamal

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:
  • OWNERS [priyawadhwa,sharifelgamal]

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

@medyagh medyagh merged commit 268a938 into kubernetes:master Dec 8, 2020
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DownloadProgress step does not always emit currentstep
6 participants