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

feat: refactor minikube test bot message #19036

Merged
merged 16 commits into from
Jul 9, 2024

Conversation

ComradeProgrammer
Copy link
Member

@ComradeProgrammer ComradeProgrammer commented Jun 5, 2024

After:

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux_crio_arm64 (3 failed) TestMultiControlPlane/serial/RestartCluster(gopogh) 11.56% (chart)

Besides the following environments also have failed tests:

To see the flake rates of all tests by environment, click here.

@k8s-ci-robot k8s-ci-robot added 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 5, 2024
@ComradeProgrammer
Copy link
Member Author

/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 Jun 5, 2024
@minikube-pr-bot

This comment has been minimized.

@medyagh
Copy link
Member

medyagh commented Jun 6, 2024

@ComradeProgrammer lets make it in a way that if it has more than 10 failures in an environment it should be skipped and instead just a english message that this enviroment had ALOT of failures...

@minikube-pr-bot

This comment has been minimized.

hack/jenkins/test-flake-chart/report_flakes/main.go Outdated Show resolved Hide resolved
hack/jenkins/test-flake-chart/report_flakes/main.go Outdated Show resolved Hide resolved
hack/jenkins/test-flake-chart/report_flakes/main.go Outdated Show resolved Hide resolved
hack/jenkins/test-flake-chart/report_flakes/main.go Outdated Show resolved Hide resolved
@ComradeProgrammer ComradeProgrammer force-pushed the limit_msg branch 2 times, most recently from 67fcdb5 to 7a50327 Compare June 25, 2024 20:28
@minikube-pr-bot

This comment has been minimized.

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.

Looking at your example output:

Environment Test Name Flake Rate
Docker_Linux_crio (2 failed) TestAddons/parallel/Ingress(gopogh) 100.00% (chart)
Docker_Linux_crio (2 failed) TestAddons/parallel/MetricsServer(gopogh) 100.00% (chart)
Docker_macOS (1 failed) TestSkaffold(gopogh) 93.10% (chart)

I think we should have a flake threshold that we don't show. Showing flakes that are at or near 100% isn't very helpful, it's just noise that we have to read through to find failures that we care about. In the existing flake rate comment we only show tests that have less than 50% flake rate if ($3 < 50) printf "%s:%s,%s\n", $1, $2, $3, I think we should implement something similar.

@medyagh
Copy link
Member

medyagh commented Jun 26, 2024

Looking at your example output:

Environment Test Name Flake Rate
Docker_Linux_crio (2 failed) TestAddons/parallel/Ingress(gopogh) 100.00% (chart)
Docker_Linux_crio (2 failed) TestAddons/parallel/MetricsServer(gopogh) 100.00% (chart)
Docker_macOS (1 failed) TestSkaffold(gopogh) 93.10% (chart)
I think we should have a flake threshold that we don't show. Showing flakes that are at or near 100% isn't very helpful, it's just noise that we have to read through to find failures that we care about. In the existing flake rate comment we only show tests that have less than 50% flake rate if ($3 < 50) printf "%s:%s,%s\n", $1, $2, $3, I think we should implement something similar.

thats a a good idea

@ComradeProgrammer ComradeProgrammer force-pushed the limit_msg branch 2 times, most recently from 50c8c07 to 8a6a254 Compare June 29, 2024 17:09
@ComradeProgrammer
Copy link
Member Author

Now tests with >50% flake rate will not be shown

@minikube-pr-bot

This comment has been minimized.

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

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ComradeProgrammer, 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 2, 2024
hack/jenkins/test-flake-chart/report_flakes/main.go Outdated Show resolved Hide resolved
result := map[string]map[string]float64{}
for i := 1; i < len(records); i++ {
// for each line in csv we extract env, test name and flake rate
if len(records[i]) < 2 {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if len(records[i]) < 2 {
if len(records[i]) < 3 {

records[i][2] is below, so need to increase length check

@medyagh
Copy link
Member

medyagh commented Jul 8, 2024

@ComradeProgrammer can you plz take a look

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.

Good work, looks really good

// $3 is the file containing a list of finished environments, one item per line
func main() {
ctx := context.Background()
client, err := storage.NewClient(context.Background())
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
client, err := storage.NewClient(context.Background())
client, err := storage.NewClient(ctx)

Comment on lines +83 to +84
btk := client.Bucket("minikube-builds")
obj := btk.Object(fmt.Sprintf("logs/%s/%s/%s_summary.json", pr, rootJob, env))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
btk := client.Bucket("minikube-builds")
obj := btk.Object(fmt.Sprintf("logs/%s/%s/%s_summary.json", pr, rootJob, env))
bkt := client.Bucket("minikube-builds")
obj := bkt.Object(fmt.Sprintf("logs/%s/%s/%s_summary.json", pr, rootJob, env))

Comment on lines +110 to +111
btk := client.Bucket("minikube-flake-rate")
obj := btk.Object("flake_rates.csv")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
btk := client.Bucket("minikube-flake-rate")
obj := btk.Object("flake_rates.csv")
bkt := client.Bucket("minikube-flake-rate")
obj := bkt.Object("flake_rates.csv")

for i := 1; i < len(records); i++ {
// for each line in csv we extract env, test name and flake rate
if len(records[i]) < 3 {
// the csv must have at least 2 columns
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// the csv must have at least 2 columns
// the csv must have at least 3 columns


}

// flakeRate downloads recent flake rates from GCS, and returns a map{env->map{testname->flake rate}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// flakeRate downloads recent flake rates from GCS, and returns a map{env->map{testname->flake rate}}
// flakeRate downloads recent flake rates from GCS, and returns a
// map{env->map{testname->flake rate}}

Shortening long comments for better readability

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19036) |
+----------------+----------+---------------------+
| minikube start | 50.1s    | 50.2s               |
| enable ingress | 25.0s    | 25.7s               |
+----------------+----------+---------------------+

Times for minikube ingress: 23.9s 24.4s 27.9s 24.9s 23.9s
Times for minikube (PR 19036) ingress: 24.4s 24.9s 26.9s 27.4s 24.9s

Times for minikube start: 47.7s 51.1s 51.8s 50.2s 49.8s
Times for minikube (PR 19036) start: 48.5s 49.1s 50.2s 49.6s 53.4s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19036) |
+----------------+----------+---------------------+
| minikube start | 21.3s    | 22.1s               |
| enable ingress | 21.5s    | 22.0s               |
+----------------+----------+---------------------+

Times for minikube start: 21.3s 21.3s 21.0s 21.6s 21.5s
Times for minikube (PR 19036) start: 20.8s 23.0s 23.5s 19.7s 23.5s

Times for minikube (PR 19036) ingress: 21.7s 22.8s 21.8s 21.8s 21.8s
Times for minikube ingress: 21.8s 21.2s 21.3s 21.8s 21.2s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19036) |
+----------------+----------+---------------------+
| minikube start | 21.2s    | 20.9s               |
| enable ingress | 29.8s    | 32.1s               |
+----------------+----------+---------------------+

Times for minikube start: 23.5s 19.6s 23.0s 19.8s 19.9s
Times for minikube (PR 19036) start: 19.8s 20.5s 22.2s 22.7s 19.4s

Times for minikube (PR 19036) ingress: 32.2s 31.8s 32.2s 32.2s 32.2s
Times for minikube ingress: 33.3s 32.3s 31.7s 32.8s 18.8s

@medyagh medyagh merged commit d798e6c into kubernetes:master Jul 9, 2024
6 checks passed
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