-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
scripts: add script to measure percentage of commits with failed status #13175
scripts: add script to measure percentage of commits with failed status #13175
Conversation
cc @serathius |
f1e8f27
to
b447aaf
Compare
There was a failure in one of the GitHub Actions Workflows - https://github.com/etcd-io/etcd/runs/2977019406 for the
Error - I removed the usage of |
Looks good, but I would reconsider writing to local file. Leaving trash in current directory is a bad practice as it can be easily avoided. Could you try writing a file? Some ideas:
|
Makes sense 👍 I'll write to a temp file and I'll also remove the git ignore too in that case |
b447aaf
to
354de1b
Compare
@serathius I made the changes and wrote to a Unrelated question - By the way, is |
354de1b
to
2d47ff7
Compare
Oops. Another https://github.com/etcd-io/etcd/pull/13175/checks?check_run_id=3001649934 Fixed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We could consider cleaning up the temp directory on bash exit.
trap '{ rm -f -- "$temp_dir"; }' EXIT
Makes sense @serathius ! I was thinking about that too, since it's a temporary thing, but then later felt that it's a small file and is in |
2d47ff7
to
d09f928
Compare
@serathius I made the changes for deleting the temp directory 👍 |
d0855fa
to
75a27fb
Compare
@serathius As part of this PR, shall I also create a GitHub Action Workflow config to run the script once a week automatically? Based on a cron schedule. Or should we do that as a separate PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
Lets add the github job here so we can solve any possible issues with the script.
This is to start measuring the test flakiness and see the numbers improving once we improve and deflake flaky tests Fixes etcd-io#13167
…ommits with failed status The workflow runs on a cron schedule on a weekly basis - once every week Fixes etcd-io#13167
75a27fb
to
3317716
Compare
I changed the script file's name to fix the typo - The script output currently looks like this - $ ./scripts/measure-test-flakiness.sh
Commit status failure percentage is - 30 % I have also added the GitHub Actions Workflow config now. It uses the built in Also, should we add a Looking forward to the review of the workflow config! :) cc @lilic @serathius |
I run the workflow every week once using a cron schedule - https://crontab.guru/#0_0_*_*_0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ptabor @gyuho @hexfusion Can an maintainer take a look? |
@karuppiah7890 there seems to be a failing test, it looks like a flake only but do you mind just having a quick look. Thanks! Otherwise agreed lgtm :) |
@lilic makes sense! I'll take a look! |
@lilic The errors don't seem related to this PR. I was checking this - https://github.com/etcd-io/etcd/pull/13175/checks?check_run_id=3191066005 and https://semaphoreci.com/etcd-io/etcd/branches/pull-request-13175/builds/8 . I don't have much context, and it was a lot of logs. I just know that https://github.com/etcd-io/etcd/pull/13175/checks?check_run_id=3191066005 is a Golang Test failure for some test(s) and not related to this PR , same for https://semaphoreci.com/etcd-io/etcd/branches/pull-request-13175/builds/8 . But I'll try to dig more into it to contribute to the tests including flaky tests in my upcoming PRs :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
cc @lilic @serathius , some help here? Or should I reopen the PR? |
This is to start measuring the test flakiness and see the numbers improving once we improve and deflake flaky tests
This PR is a part of the fix for the issue #13167
What this PR does -
It tries to get the last 100 etcd commits and their commit status data from the GitHub GraphQL API and count the number of failures and shows the failure percentage
It uses the following tools
What this PR does not do -
This PR does not introduce any GitHub Actions Workflow to run the script automatically weekly once as mentioned in Deflake etcd tests #13167 . Let me know if we need to do it as part of this PR, I could add a GitHub Action Workflow config Yaml for it with cron schedule - This has been addedSecrets
This PR introduces a script which needs a GitHub Token to access the GitHub API and get etcd repo commit data
Documentation
This script does not have any documentation as of now. Let me know if I need to add any details in some docs. Like what it does, it's purpose in some README and any other details
Questions
Commit status failure percentage is 31 %
make sense? Or we want to give some other message talking about test flayness directly?Fixes #13167
in the commit message but this is only part of fixing Deflake etcd tests #13167. I think it might close Deflake etcd tests #13167 with the merge of this PR. If it does, we can reopen the issue, yeah?