From 8255a338c3742ac94159f1f8e301a83fc8ecf415 Mon Sep 17 00:00:00 2001 From: Karuppiah Natarajan Date: Fri, 2 Jul 2021 02:01:42 +0530 Subject: [PATCH] add etcd-io/etcd#13167 issue --- etcd-io/etcd/issue-13167/STORY.md | 899 ++++++++++++++++++ .../issue-13167/commit-and-check-data.json | 796 ++++++++++++++++ .../etcd/issue-13167/find-flaky-tests-data.sh | 9 + 3 files changed, 1704 insertions(+) create mode 100644 etcd-io/etcd/issue-13167/STORY.md create mode 100644 etcd-io/etcd/issue-13167/commit-and-check-data.json create mode 100755 etcd-io/etcd/issue-13167/find-flaky-tests-data.sh diff --git a/etcd-io/etcd/issue-13167/STORY.md b/etcd-io/etcd/issue-13167/STORY.md new file mode 100644 index 0000000..93cc000 --- /dev/null +++ b/etcd-io/etcd/issue-13167/STORY.md @@ -0,0 +1,899 @@ +I am attending the etcd community meeting through Google Meet - meet.google.com/umg-nrxn-qvs + +https://docs.google.com/document/d/16XEGyPBisZvmmoIHSZzv__LoyOeluC5a4x353CX0SIM + +I noticed some issues and proposals being mentioned. It was pretty cool to hear but I didn't understand it all and it's pretty late now - 12 am IST and I'm dizzy :P + +Among the things being discussed, a cool thing that came up was - + +https://github.com/etcd-io/etcd/issues/13167 + +Which talks about flaky tests and they were talking about how the community could help with stuff + +I decided to try my hand at this issue and write some automation scripts to start off with finding the percentage of flakiness / flakyness ;) + +I was reading through the issues and I'm planning to write bash scripts and also try my hand at some basic golang tool to do this thing of analyzing the last 100 runs and see how much is flaky + +Ideas? Well, for starters, I think I'll need a GitHub Access Token and access the GitHub API and work with some JSON data - data where I can get a list of CI/CD runs - GitHub Actions runs and their results. Also, ideally, I would need the commit sha for the failed GitHub Actions or even the non failed ones and then also be able to track the PR that lead the commit in the main branch so that we can also probably analyze the PR and more + +I think it would be good to get the above data in the format of a JSON or something so that it can be processed by something else later. Or used to convert to some human readable content too, or for any analysis basically. Hmm. Anyways, let's get this going now! :D + +I'll start with a basic bash script first and then we can move to golang, even write some tests if needed :P or I "guess" we "surely" need it :P ;) + +--- + +- Get GitHub Token - DONE +- Checkout GitHub API and look for API to list last few commits and check their CI/CD status. Or look for API to list last few CI/CD runs and their status and for which commit they were run run +- Call the GitHub API using curl and the GitHub token and see if it works at all +- Set the GitHub token in the shell environment using environment variables +- Give error when the token is not set +- Later, instead of error, ask the user to type / paste the GitHub token if it's not available :) Maybe mask the token so that no one sees it ;) +- Output data in JSON or put the JSON data in a file? +- Show some human readable data too maybe? :) + + + +https://duckduckgo.com/?t=ffab&q=github+api&ia=web + +https://docs.github.com/en/rest + +https://docs.github.com/en/rest/overview + +https://docs.github.com/en/rest/guides/getting-started-with-the-rest-api + +```bash +$ curl https://api.github.com/zen +Non-blocking is better than blocking. +``` + +Lol :D + +```bash +$ curl https://api.github.com/users/defunkt +{ + "login": "defunkt", + "id": 2, + "node_id": "MDQ6VXNlcjI=", + "avatar_url": "https://avatars.githubusercontent.com/u/2?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/defunkt", + "html_url": "https://github.com/defunkt", + "followers_url": "https://api.github.com/users/defunkt/followers", + "following_url": "https://api.github.com/users/defunkt/following{/other_user}", + "gists_url": "https://api.github.com/users/defunkt/gists{/gist_id}", + "starred_url": "https://api.github.com/users/defunkt/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/defunkt/subscriptions", + "organizations_url": "https://api.github.com/users/defunkt/orgs", + "repos_url": "https://api.github.com/users/defunkt/repos", + "events_url": "https://api.github.com/users/defunkt/events{/privacy}", + "received_events_url": "https://api.github.com/users/defunkt/received_events", + "type": "User", + "site_admin": false, + "name": "Chris Wanstrath", + "company": null, + "blog": "http://chriswanstrath.com/", + "location": null, + "email": null, + "hireable": null, + "bio": "🍔", + "twitter_username": null, + "public_repos": 107, + "public_gists": 273, + "followers": 21220, + "following": 210, + "created_at": "2007-10-20T05:24:19Z", + "updated_at": "2019-11-01T21:56:00Z" +} +``` + +```bash +curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/users/defunkt +``` + +```bash +$ ./find-flaky-tests-data.sh +{ + "login": "defunkt", + "id": 2, + "node_id": "MDQ6VXNlcjI=", + "avatar_url": "https://avatars.githubusercontent.com/u/2?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/defunkt", + "html_url": "https://github.com/defunkt", + "followers_url": "https://api.github.com/users/defunkt/followers", + "following_url": "https://api.github.com/users/defunkt/following{/other_user}", + "gists_url": "https://api.github.com/users/defunkt/gists{/gist_id}", + "starred_url": "https://api.github.com/users/defunkt/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/defunkt/subscriptions", + "organizations_url": "https://api.github.com/users/defunkt/orgs", + "repos_url": "https://api.github.com/users/defunkt/repos", + "events_url": "https://api.github.com/users/defunkt/events{/privacy}", + "received_events_url": "https://api.github.com/users/defunkt/received_events", + "type": "User", + "site_admin": false, + "name": "Chris Wanstrath", + "company": null, + "blog": "http://chriswanstrath.com/", + "location": null, + "email": null, + "hireable": null, + "bio": "🍔", + "twitter_username": null, + "public_repos": 107, + "public_gists": 273, + "followers": 21220, + "following": 210, + "created_at": "2007-10-20T05:24:19Z", + "updated_at": "2019-11-01T21:56:00Z" +} +``` + +That worked! And bad credentials are shown here, hmm + +```bash +$ ./find-flaky-tests-data.sh +{ + "message": "Bad credentials", + "documentation_url": "https://docs.github.com/rest" +} +``` + +Nice! + +https://docs.github.com/en/rest/overview/resources-in-the-rest-api + +https://docs.github.com/en/rest/overview/openapi-description + +https://github.com/github/rest-api-description/ + +https://github.com/github/rest-api-description/tree/main/descriptions + +https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/ghes-3.1/ghes-3.1.yaml + +That's enterprise edition I guess, looking at the endpoints I saw + +There was also some `se` - standard edition? Idk + +Looks like this is the thing I'm looking for? - + +https://github.com/github/rest-api-description/blob/main/descriptions/api.github.com/api.github.com.yaml + +https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml + +I'm seeing this thingy here after searching for `actions` and `/actions` + +``` +"/repos/{owner}/{repo}/actions/runs": + get: + summary: List workflow runs for a repository + description: |- + Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + + Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + tags: + - actions +``` + +Looking at the https://github.com/etcd-io/etcd/actions it says the number of runs if 4486 and it matches with the API call I just made + +```bash +$ ./find-flaky-tests-data.sh +{ + "total_count": 4486, + "workflow_runs": [ + { + "id": 990758164, + "name": "Linux ARM64 Graviton2", + "node_id": "WFR_lAHOAoB0OM4Aq0e2zjsNxRQ", + "head_branch": "main", + "head_sha": "57a489670474bffc47762372a6f54ca840285b41", + "run_number": 726, + "event": "push", + "status": "completed", + "conclusion": "success", + "workflow_id": 8876815, + "check_suite_id": 3136008910, + "check_suite_node_id": "MDEwOkNoZWNrU3VpdGUzMTM2MDA4OTEw", + "url": "https://api.github.com/repos/etcd-io/etcd/actions/runs/990758164", + "html_url": "https://github.com/etcd-io/etcd/actions/runs/990758164", + "pull_requests": [ + + ], + "created_at": "2021-07-01T16:12:35Z", + "updated_at": "2021-07-01T16:25:18Z", + "jobs_url": "https://api.github.com/repos/etcd-io/etcd/actions/runs/990758164/jobs", + "logs_url": "https://api.github.com/repos/etcd-io/etcd/actions/runs/990758164/logs", + "check_suite_url": "https://api.github.com/repos/etcd-io/etcd/check-suites/3136008910", + "artifacts_url": "https://api.github.com/repos/etcd-io/etcd/actions/runs/990758164/artifacts", + "cancel_url": "https://api.github.com/repos/etcd-io/etcd/actions/runs/990758164/cancel", + "rerun_url": "https://api.github.com/repos/etcd-io/etcd/actions/runs/990758164/rerun", + "workflow_url": "https://api.github.com/repos/etcd-io/etcd/actions/workflows/8876815", + "head_commit": { + "id": "57a489670474bffc47762372a6f54ca840285b41", + "tree_id": "7f103e4573a79f22dbcc21304ad22b50027ff0f1", + "message": "Merge pull request #13170 from gyuho/maintainers\n\nREADME: explain \"MAINTAINERS\"", + "timestamp": "2021-07-01T16:12:30Z", + "author": { + "name": "Gyuho Lee", + "email": "leegyuho@amazon.com" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com" + } + }, + "repository": { + "id": 11225014, + "node_id": "MDEwOlJlcG9zaXRvcnkxMTIyNTAxNA==", + "name": "etcd", + "full_name": "etcd-io/etcd", + "private": false, + "owner": { + "login": "etcd-io", + "id": 41972792, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxOTcyNzky", + "avatar_url": "https://avatars.githubusercontent.com/u/41972792?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/etcd-io", + "html_url": "https://github.com/etcd-io", + "followers_url": "https://api.github.com/users/etcd-io/followers", + "following_url": "https://api.github.com/users/etcd-io/following{/other_user}", + "gists_url": "https://api.github.com/users/etcd-io/gists{/gist_id}", + "starred_url": "https://api.github.com/users/etcd-io/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/etcd-io/subscriptions", + "organizations_url": "https://api.github.com/users/etcd-io/orgs", + "repos_url": "https://api.github.com/users/etcd-io/repos", + "events_url": "https://api.github.com/users/etcd-io/events{/privacy}", + "received_events_url": "https://api.github.com/users/etcd-io/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/etcd-io/etcd", + "description": "Distributed reliable key-value store for the most critical data of a distributed system", + "fork": false, + "url": "https://api.github.com/repos/etcd-io/etcd", + "forks_url": "https://api.github.com/repos/etcd-io/etcd/forks", + "keys_url": "https://api.github.com/repos/etcd-io/etcd/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/etcd-io/etcd/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/etcd-io/etcd/teams", + "hooks_url": "https://api.github.com/repos/etcd-io/etcd/hooks", + "issue_events_url": "https://api.github.com/repos/etcd-io/etcd/issues/events{/number}", + "events_url": "https://api.github.com/repos/etcd-io/etcd/events", + "assignees_url": "https://api.github.com/repos/etcd-io/etcd/assignees{/user}", + "branches_url": "https://api.github.com/repos/etcd-io/etcd/branches{/branch}", + "tags_url": "https://api.github.com/repos/etcd-io/etcd/tags", + "blobs_url": "https://api.github.com/repos/etcd-io/etcd/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/etcd-io/etcd/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/etcd-io/etcd/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/etcd-io/etcd/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/etcd-io/etcd/statuses/{sha}", + "languages_url": "https://api.github.com/repos/etcd-io/etcd/languages", + "stargazers_url": "https://api.github.com/repos/etcd-io/etcd/stargazers", + "contributors_url": "https://api.github.com/repos/etcd-io/etcd/contributors", + "subscribers_url": "https://api.github.com/repos/etcd-io/etcd/subscribers", + "subscription_url": "https://api.github.com/repos/etcd-io/etcd/subscription", + "commits_url": "https://api.github.com/repos/etcd-io/etcd/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/etcd-io/etcd/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/etcd-io/etcd/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/etcd-io/etcd/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/etcd-io/etcd/contents/{+path}", + "compare_url": "https://api.github.com/repos/etcd-io/etcd/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/etcd-io/etcd/merges", + "archive_url": "https://api.github.com/repos/etcd-io/etcd/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/etcd-io/etcd/downloads", + "issues_url": "https://api.github.com/repos/etcd-io/etcd/issues{/number}", + "pulls_url": "https://api.github.com/repos/etcd-io/etcd/pulls{/number}", + "milestones_url": "https://api.github.com/repos/etcd-io/etcd/milestones{/number}", + "notifications_url": "https://api.github.com/repos/etcd-io/etcd/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/etcd-io/etcd/labels{/name}", + "releases_url": "https://api.github.com/repos/etcd-io/etcd/releases{/id}", + "deployments_url": "https://api.github.com/repos/etcd-io/etcd/deployments" + }, + "head_repository": { + "id": 11225014, + "node_id": "MDEwOlJlcG9zaXRvcnkxMTIyNTAxNA==", + "name": "etcd", + "full_name": "etcd-io/etcd", + "private": false, + "owner": { + "login": "etcd-io", + "id": 41972792, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQxOTcyNzky", + "avatar_url": "https://avatars.githubusercontent.com/u/41972792?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/etcd-io", + "html_url": "https://github.com/etcd-io", + "followers_url": "https://api.github.com/users/etcd-io/followers", + "following_url": "https://api.github.com/users/etcd-io/following{/other_user}", + "gists_url": "https://api.github.com/users/etcd-io/gists{/gist_id}", + "starred_url": "https://api.github.com/users/etcd-io/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/etcd-io/subscriptions", + "organizations_url": "https://api.github.com/users/etcd-io/orgs", + "repos_url": "https://api.github.com/users/etcd-io/repos", + "events_url": "https://api.github.com/users/etcd-io/events{/privacy}", + "received_events_url": "https://api.github.com/users/etcd-io/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/etcd-io/etcd", + "description": "Distributed reliable key-value store for the most critical data of a distributed system", + "fork": false, + "url": "https://api.github.com/repos/etcd-io/etcd", + "forks_url": "https://api.github.com/repos/etcd-io/etcd/forks", + "keys_url": "https://api.github.com/repos/etcd-io/etcd/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/etcd-io/etcd/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/etcd-io/etcd/teams", + "hooks_url": "https://api.github.com/repos/etcd-io/etcd/hooks", + "issue_events_url": "https://api.github.com/repos/etcd-io/etcd/issues/events{/number}", + "events_url": "https://api.github.com/repos/etcd-io/etcd/events", + "assignees_url": "https://api.github.com/repos/etcd-io/etcd/assignees{/user}", + "branches_url": "https://api.github.com/repos/etcd-io/etcd/branches{/branch}", + "tags_url": "https://api.github.com/repos/etcd-io/etcd/tags", + "blobs_url": "https://api.github.com/repos/etcd-io/etcd/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/etcd-io/etcd/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/etcd-io/etcd/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/etcd-io/etcd/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/etcd-io/etcd/statuses/{sha}", + "languages_url": "https://api.github.com/repos/etcd-io/etcd/languages", + "stargazers_url": "https://api.github.com/repos/etcd-io/etcd/stargazers", + "contributors_url": "https://api.github.com/repos/etcd-io/etcd/contributors", + "subscribers_url": "https://api.github.com/repos/etcd-io/etcd/subscribers", + "subscription_url": "https://api.github.com/repos/etcd-io/etcd/subscription", + "commits_url": "https://api.github.com/repos/etcd-io/etcd/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/etcd-io/etcd/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/etcd-io/etcd/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/etcd-io/etcd/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/etcd-io/etcd/contents/{+path}", + "compare_url": "https://api.github.com/repos/etcd-io/etcd/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/etcd-io/etcd/merges", + "archive_url": "https://api.github.com/repos/etcd-io/etcd/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/etcd-io/etcd/downloads", + "issues_url": "https://api.github.com/repos/etcd-io/etcd/issues{/number}", + "pulls_url": "https://api.github.com/repos/etcd-io/etcd/pulls{/number}", + "milestones_url": "https://api.github.com/repos/etcd-io/etcd/milestones{/number}", + "notifications_url": "https://api.github.com/repos/etcd-io/etcd/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/etcd-io/etcd/labels{/name}", + "releases_url": "https://api.github.com/repos/etcd-io/etcd/releases{/id}", + "deployments_url": "https://api.github.com/repos/etcd-io/etcd/deployments" + } + }, +.... +... +``` + +```bash +$ ./find-flaky-tests-data.sh | jq '.workflow_runs | length' + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed +100 328k 100 328k 0 0 249k 0 0:00:01 0:00:01 --:--:-- 249k +30 +``` + +That's a lot of runs actually though. I mean, https://github.com/etcd-io/etcd/actions shows multiple runs for each commit, hmm + +For example + +``` + Merge pull request #13170 from gyuho/maintainers Linux ARM64 Graviton2 #726: Commit 57a4896 pushed by gyuho +main + +Merge pull request #13170 from gyuho/maintainers CodeQL #1308: Commit 57a4896 pushed by gyuho +main + +Merge pull request #13170 from gyuho/maintainers E2E #638: Commit 57a4896 pushed by gyuho +main + +Merge pull request #13170 from gyuho/maintainers grpcProxy-tests #585: Commit 57a4896 pushed by gyuho +main + +Merge pull request #13170 from gyuho/maintainers Tests #716: Commit 57a4896 pushed by gyuho +main + +Merge pull request #13170 from gyuho/maintainers functional-tests #592: Commit 57a4896 pushed by gyuho +main +``` + +It's all for `57a4896`, hmm + +I'm gonna check out commits endpoint + +``` +"/repos/{owner}/{repo}/commits": + get: + summary: List commits + description: |- + **Signature verification object** + + The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + + | Name | Type | Description | + | ---- | ---- | ----------- | + | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + | `signature` | `string` | The signature that was extracted from the commit. | + | `payload` | `string` | The value that was signed. | + + These are the possible values for `reason` in the `verification` object: + + | Value | Description | + | ----- | ----------- | + | `expired_key` | The key that made the signature is expired. | + | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + | `gpgverify_error` | There was an error communicating with the signature verification service. | + | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + | `unsigned` | The object does not include a signature. | + | `unknown_signature_type` | A non-PGP signature was found in the commit. | + | `no_user` | No user was associated with the `committer` email address in the commit. | + | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + | `unknown_key` | The key that made the signature has not been registered with any user's account. | + | `malformed_signature` | There was an error parsing the signature. | + | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + | `valid` | None of the above errors applied, so the signature is considered to be verified. | +``` + +```bash + $ ./find-flaky-tests-data.sh +[ + { + "sha": "57a489670474bffc47762372a6f54ca840285b41", + "node_id": "MDY6Q29tbWl0MTEyMjUwMTQ6NTdhNDg5NjcwNDc0YmZmYzQ3NzYyMzcyYTZmNTRjYTg0MDI4NWI0MQ==", + "commit": { + "author": { + "name": "Gyuho Lee", + "email": "leegyuho@amazon.com", + "date": "2021-07-01T16:12:30Z" + }, + "committer": { + "name": "GitHub", + "email": "noreply@github.com", + "date": "2021-07-01T16:12:30Z" + }, + "message": "Merge pull request #13170 from gyuho/maintainers\n\nREADME: explain \"MAINTAINERS\"", + "tree": { + "sha": "7f103e4573a79f22dbcc21304ad22b50027ff0f1", + "url": "https://api.github.com/repos/etcd-io/etcd/git/trees/7f103e4573a79f22dbcc21304ad22b50027ff0f1" + }, + "url": "https://api.github.com/repos/etcd-io/etcd/git/commits/57a489670474bffc47762372a6f54ca840285b41", + "comment_count": 0, + "verification": { + "verified": true, + "reason": "valid", + "signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJg3eluCRBK7hj4Ov3rIwAA3XQIAF2zKc4W0JxNStWPrwWHcX+w\nmnAP2h03DMD+LMQNAI2T0UBrLWQRDRwukSG2ci8XIlIPlZhOE4NaV3ibp88jHgfU\n4XjBAUueaiLoImB2S+h4Db5IS2WU0Qlqjj5eQ8qPWjhi9f5dY1uqC6ODUTQfDsb3\nFZObyUDrhGm1BmGPHnnMWhztzZH7eU+HqJmyiF2+/Bd7NZLVDNty3RU2cmtdo9Jf\nGvAUtnF6+rEFpnv3F6wpEJ5OFWvEdf9w/oMYEpwcuh3mYBeothxG/8S8ztAQsvsO\nP3dzDxiLhzepyznGbuNqQdaN1VISXtWDRFHFl0LH8VCIneer6QltJX1ddf+V+o8=\n=IL2D\n-----END PGP SIGNATURE-----\n", + "payload": "tree 7f103e4573a79f22dbcc21304ad22b50027ff0f1\nparent 40da254d687abfd3561f3cd9a0e3ef47afc5dadf\nparent 1b84b5e8dfd5fb0f29963d5e3f53a6f813619996\nauthor Gyuho Lee 1625155950 -0700\ncommitter GitHub 1625155950 -0700\n\nMerge pull request #13170 from gyuho/maintainers\n\nREADME: explain \"MAINTAINERS\"" + } + }, + "url": "https://api.github.com/repos/etcd-io/etcd/commits/57a489670474bffc47762372a6f54ca840285b41", + "html_url": "https://github.com/etcd-io/etcd/commit/57a489670474bffc47762372a6f54ca840285b41", + "comments_url": "https://api.github.com/repos/etcd-io/etcd/commits/57a489670474bffc47762372a6f54ca840285b41/comments", + "author": { + "login": "gyuho", + "id": 6799218, + "node_id": "MDQ6VXNlcjY3OTkyMTg=", + "avatar_url": "https://avatars.githubusercontent.com/u/6799218?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/gyuho", + "html_url": "https://github.com/gyuho", + "followers_url": "https://api.github.com/users/gyuho/followers", + "following_url": "https://api.github.com/users/gyuho/following{/other_user}", + "gists_url": "https://api.github.com/users/gyuho/gists{/gist_id}", + "starred_url": "https://api.github.com/users/gyuho/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gyuho/subscriptions", + "organizations_url": "https://api.github.com/users/gyuho/orgs", + "repos_url": "https://api.github.com/users/gyuho/repos", + "events_url": "https://api.github.com/users/gyuho/events{/privacy}", + "received_events_url": "https://api.github.com/users/gyuho/received_events", + "type": "User", + "site_admin": false + }, + +... +``` + +Commits don't seem to have much info I guess + +I'm checking docs now, to be able to get data that we have here - + +https://github.com/etcd-io/etcd/commits/main - commits with CI/CD run status - green or red - considering all workflows and jobs put together as a whole + +https://docs.github.com/en/rest/reference/actions + +Sounds interesting - + +https://docs.github.com/en/rest/reference/checks#list-check-runs-for-a-git-reference + +Maybe I could use graphql to get it like a graph instead of making multiple API calls? Hmm + +https://duckduckgo.com/?t=ffab&q=github+graphql&ia=web + +https://graphql.github.com/ + +https://docs.github.com/en/graphql + +https://docs.github.com/en/graphql/overview + +https://docs.github.com/en/graphql/reference + +https://docs.github.com/en/graphql/reference/objects + +https://docs.github.com/en/graphql/reference/objects#commit + +https://docs.github.com/en/graphql/reference/objects#status + +https://docs.github.com/en/graphql/reference/objects#statuscheckrollupcontextconnection + +https://docs.github.com/en/graphql/reference/enums#statusstate + +https://docs.github.com/en/graphql/reference/interfaces#gitobject + +https://docs.github.com/en/graphql/reference/interfaces#node + +https://docs.github.com/en/graphql/reference/objects#repository + +https://duckduckgo.com/?t=ffab&q=list+repo+commits+with+github+graphql+api&ia=web + +http://stackoverflow.com/questions/48285888/ddg#48286191 + +https://docs.github.com/en/graphql/reference/objects#statuscheckrollup + +I think I got what I was looking for. I think it was this - + +``` +Represents the rollup for both the check runs and status for a commit. +``` + +``` +Check and Status rollup information for this commit. +``` + +`StatusCheckRollup` + +``` +{ + repository(owner: "etcd-io", name: "etcd") { + defaultBranchRef { + target { + ... on Commit { + history(first: 10) { + edges { + node { + ... on Commit { + commitUrl + statusCheckRollup { + state + } + } + } + } + } + } + } + } + } +} +``` + +Gives an output like + +```json +{ + "data": { + "repository": { + "defaultBranchRef": { + "target": { + "history": { + "edges": [ + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/57a489670474bffc47762372a6f54ca840285b41", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/1b84b5e8dfd5fb0f29963d5e3f53a6f813619996", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/40da254d687abfd3561f3cd9a0e3ef47afc5dadf", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/7271adecc593412258698f402c9da78def5fe106", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/0d0b6f06fa36cabd440efda19a6023b11f139a84", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/2fb919bef908f4cdf9a841a7d9494614566335e0", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/a6317392f4e436402e4d6fed8620619e286d6f73", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/86f68b9374a8b0393745cdb1b5bebb858bee63b7", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/164a1c80f00c49a499f12908059dd9efc15dd758", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/6ef7629ec69734679c0d040f3b279e7e7ac12b33", + "statusCheckRollup": { + "state": "FAILURE" + } + } + } + ] + } + } + } + } + } +} +``` + +Which is pretty cool! :D + +For last 100 commits it would be like + +``` +{ + repository(owner: "etcd-io", name: "etcd") { + defaultBranchRef { + target { + ... on Commit { + history(first: 100) { + edges { + node { + ... on Commit { + commitUrl + statusCheckRollup { + state + } + } + } + } + } + } + } + } + } +} +``` + +https://docs.github.com/en/graphql/guides/forming-calls-with-graphql#the-graphql-endpoint + +messed up with some JSON stuff I guess + +```bash +$ ./find-flaky-tests-data.sh +{ + "message": "Problems parsing JSON", + "documentation_url": "https://docs.github.com/graphql" +} +``` + +```bash +#!/bin/bash + +curl -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d '{ + repository(owner: "etcd-io", name: "etcd") { + defaultBranchRef { + target { + ... on Commit { + history(first: 100) { + edges { + node { + ... on Commit { + commitUrl + statusCheckRollup { + state + } + } + } + } + } + } + } + } + } +}' \ + https://api.github.com/graphql +``` + +Gotta fix that with lot of double quotes now + +https://docs.github.com/en/graphql/guides/forming-calls-with-graphql#communicating-with-graphql + +https://docs.github.com/en/graphql/guides/forming-calls-with-graphql#example-query + +```bash +#!/bin/bash + +curl -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d '{ + "query": "repository: (owner: \"etcd-io\", name: \"etcd\") { defaultBranchRef { target { ... on Commit { history(first: 10) { edges { node { ... on Commit { commitUrl statusCheckRollup { state } } } } } } } } }" +}' \ + https://api.github.com/graphql + +``` + +```bash +$ ./find-flaky-tests-data.sh +{"errors":[{"message":"Parse error on \"repository\" (IDENTIFIER) at [1, 1]","locations":[{"line":1,"column":1}]}]} +``` + +Gonna sleep and continue on this later :P I need to understand how to put in the graphql query in the POST body + +```bash +#!/bin/bash + +curl -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d "\ +{ \ + \"query\": \"query { repository(owner: \"etcd-io\", name: \"etcd\") { defaultBranchRef { target { ... on Commit { history(first: 10) { edges { node { ... on Commit { commitUrl \n statusCheckRollup { state } } } } } } } } } }\" \ +} \ +" \ + https://api.github.com/graphql + +``` + +https://duckduckgo.com/?t=ffab&q=graphql+github+api+curl&ia=web + +http://stackoverflow.com/questions/42021113/ddg#42021388 + + +```bash +#!/bin/bash + +curl -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d '{ + "query": "query { repository: (owner: \"etcd-io\", name: \"etcd\") { defaultBranchRef { target { ... on Commit { history(first: 10) { edges { node { ... on Commit { commitUrl statusCheckRollup { state } } } } } } } } } }" +}' \ + https://api.github.com/graphql + +``` + +```bash +$ ./find-flaky-tests-data.sh +{"errors":[{"message":"Parse error on \"(\" (LPAREN) at [1, 21]","locations":[{"line":1,"column":21}]}]} +``` + +```bash +#!/bin/bash + +curl -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d '{ + "query": "query { repository(owner: \"etcd-io\", name: \"etcd\") { defaultBranchRef { target { ... on Commit { history(first: 10) { edges { node { ... on Commit { commitUrl statusCheckRollup { state } } } } } } } } } }" +}' \ + https://api.github.com/graphql + +``` + +```bash +$ ./find-flaky-tests-data.sh +{"data":{"repository":{"defaultBranchRef":{"target":{"history":{"edges":[{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/57a489670474bffc47762372a6f54ca840285b41","statusCheckRollup":{"state":"FAILURE"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/1b84b5e8dfd5fb0f29963d5e3f53a6f813619996","statusCheckRollup":{"state":"FAILURE"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/40da254d687abfd3561f3cd9a0e3ef47afc5dadf","statusCheckRollup":{"state":"FAILURE"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/7271adecc593412258698f402c9da78def5fe106","statusCheckRollup":{"state":"SUCCESS"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/0d0b6f06fa36cabd440efda19a6023b11f139a84","statusCheckRollup":{"state":"SUCCESS"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/2fb919bef908f4cdf9a841a7d9494614566335e0","statusCheckRollup":{"state":"SUCCESS"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/a6317392f4e436402e4d6fed8620619e286d6f73","statusCheckRollup":{"state":"SUCCESS"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/86f68b9374a8b0393745cdb1b5bebb858bee63b7","statusCheckRollup":{"state":"SUCCESS"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/164a1c80f00c49a499f12908059dd9efc15dd758","statusCheckRollup":{"state":"SUCCESS"}}},{"node":{"commitUrl":"https://github.com/etcd-io/etcd/commit/6ef7629ec69734679c0d040f3b279e7e7ac12b33","statusCheckRollup":{"state":"FAILURE"}}}]}}}}}} +``` + +WOW! That just worked!! :D + +```bash +$ ./find-flaky-tests-data.sh +$ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges' | less +``` + +```bash +$ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges[] | .node' | less +``` + +```bash +$ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges[] | .node' | jq -s +``` + +https://duckduckgo.com/?t=ffab&q=jq+manual&ia=web + +https://stedolan.github.io/jq/manual/ + +I need to count the number of successes and failures :P + +Or I could just write a Golang program and loop through it, hmm :) + +``` +reduce .[] as $item (0; . + $item) +``` + +https://stedolan.github.io/jq/manual/#ConditionalsandComparisons + +```bash + cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[]' +jq: error: syntax error, unexpected $end, expecting FIELD or as or '.' or '[' (Unix shell quoting issues?) at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] +jq: 1 compile error + ✘ issue-13167 main ✘ $ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state=="SUCCESS" then . + 1 end)' +jq: error: syntax error, unexpected end (Unix shell quoting issues?) at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state=="SUCCESS" then . + 1 end) +jq: error: Possibly unterminated 'if' statement at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state=="SUCCESS" then . + 1 end) +jq: 2 compile errors + ✘ issue-13167 main ✘ $ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state == "SUCCESS" then . + 1 end)' +jq: error: syntax error, unexpected end (Unix shell quoting issues?) at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state == "SUCCESS" then . + 1 end) +jq: error: Possibly unterminated 'if' statement at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state == "SUCCESS" then . + 1 end) +jq: 2 compile errors + ✘ issue-13167 main ✘ $ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state == "SUCCESS" then (. + 1) end)' +jq: error: syntax error, unexpected end (Unix shell quoting issues?) at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state == "SUCCESS" then (. + 1) end) +jq: error: Possibly unterminated 'if' statement at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.state == "SUCCESS" then (. + 1) end) +jq: 2 compile errors +``` + +```bash +$ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.statusCheckRollup.state == "SUCCESS" then (. + 1) end)' +jq: error: syntax error, unexpected end (Unix shell quoting issues?) at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.statusCheckRollup.state == "SUCCESS" then (. + 1) end) +jq: error: Possibly unterminated 'if' statement at , line 1: +.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.statusCheckRollup.state == "SUCCESS" then (. + 1) end) +jq: 2 compile errors +``` + +```bash +$ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if .node.statusCheckRollup.state == "SUCCESS" then (. + 1) else . end)' +jq: error (at :796): Cannot index number with string "node" +``` + +```bash +$ cat commit-and-check-data.json | jq '.data.repository.defaultBranchRef.target.history.edges | reduce .[] as $item (0; if $item.node.statusCheckRollup.state == "SUCCESS" then (. + 1) else . end)' +58 +``` + +And THAT is the right value :D :D + +So, 58% success, hmm diff --git a/etcd-io/etcd/issue-13167/commit-and-check-data.json b/etcd-io/etcd/issue-13167/commit-and-check-data.json new file mode 100644 index 0000000..398fcfb --- /dev/null +++ b/etcd-io/etcd/issue-13167/commit-and-check-data.json @@ -0,0 +1,796 @@ +{ + "data": { + "repository": { + "defaultBranchRef": { + "target": { + "history": { + "edges": [ + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/57a489670474bffc47762372a6f54ca840285b41", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/1b84b5e8dfd5fb0f29963d5e3f53a6f813619996", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/40da254d687abfd3561f3cd9a0e3ef47afc5dadf", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/7271adecc593412258698f402c9da78def5fe106", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/0d0b6f06fa36cabd440efda19a6023b11f139a84", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/2fb919bef908f4cdf9a841a7d9494614566335e0", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/a6317392f4e436402e4d6fed8620619e286d6f73", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/86f68b9374a8b0393745cdb1b5bebb858bee63b7", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/164a1c80f00c49a499f12908059dd9efc15dd758", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/6ef7629ec69734679c0d040f3b279e7e7ac12b33", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/f79d09d48b452f566ea442d2845ea311773afd18", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/2a0f8f073892ea5ea9a4a467dbbc16d1576fd084", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/c3fe63a65893ebdb48a71c309f96da3e87d5965c", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/dcf60888bcb1c5cb689da2becf9561528c71ab55", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/e2740b4afaa5b9ff5a56f3e61ebd16339d7a2c2a", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/3f026866194edd9ddf4d82f34854b75e949c0e38", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/dd62aebfb5bc178e6603f176ef426271c4e70119", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/8f9829cd2dd65479cca9b1497b6e62fdc74df2b6", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/3c6ace066ab991b70f752ad3b4dbaade80a5aecc", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/72cb65233257d6f24945a1c18a79e88c7fdbff41", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/69fadd41b0732f23278daff78166cad20108bfec", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/96b8049d815042d391de74ecdb1029bf0a727386", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/823f85dfc9ee14df3054cf40782d5d25015041b4", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/ab8e5a4f8eeec1c197720f736d49a6b377f9838d", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/c44d89f469de5dc3ec61e6abd7331cdebf93165c", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/6eabc41aee3cc31426ab9e91ef77f960dcd11832", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/4e060dc12725b23a6c65636d1715830c8a0791ee", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/b9d837183ad5bd186456d64c6a45d3151dde2540", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/5d6be34838d7c82425d9a67d9a4e564f2e341741", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/df696a7e76b66de06b3411651d20615be22c7db0", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/556447683112b6ccc00b27a1bd0d0a4edc361692", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/f00231951d420658e9ce69556fd32ec4c35e8a89", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/f992d697ed9269a8bbcdc4a37d1597915c18f417", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/175e235bd5143e421b997528285178223a2db19c", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/3adb2bd57c9917c47edac54a2bb828e417d288e7", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/09392c50592489c658d673469308d9e904df6a5b", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/8bfce5dc016311b4e0e89f938e6ad802946b04d2", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/76df94a8399eafb48eb8a02d6b1b90868d6b4277", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/1a943350b00b74b6ee207ffe9431b0b357c84f18", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/e1b1d93548b8cd642ea6ae3fdc10d5566fa096c5", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/56678038b5e9b076df7c95020ffcd626c9b0e389", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/c2b729d8c3adb93212fd796f2d31c5485374be87", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/9a68ee51b2dcad8fc2203974cecf5b3bbca21d4f", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/940d1e1ec57859d068d96868b74359d1e9d54bbf", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/d4b3a2867185a389cf8b81b7f51cccde66154d29", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/16477a8270b469ebec6e9b848c4d5fb16c3e6efd", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/eca086e2827e617bd49cd136f03041646c6b6b89", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/0d2dd291bd2c5ee7e42b2bf240742b516ad4dbda", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/94ae8ee78cd1daf35a7838c9b55176392058a1da", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/8a0142c8b13b5dfe38e048aa40d0c01feff7598b", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/23e6bf3671248a309a8b4c2e7e40a3093b0bcb56", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/1e18cebcff75fa701e8a05daed56a1a187401b4a", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/5f73afb256b3fc2938faaadcfdb27687063d6f76", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/ed790d96394963a73a7d33db9353afbe8d877a03", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/115c694af65165c6e09f6abbab43745b9b310b3a", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/9b03d36ffbddd2a41435c648222608551a9e7635", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/a26fa0c008e8d1d05157669a658ae88e00e27d2a", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/8552d8ec203653f4d323c4b728c2ddf805eca685", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/d563c76e92e36c53bf47e868cd71c570d7e4c1cb", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/b00803a9c112acf77e929e246052b1cf33478a6f", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/852fae73ae21cb5e3f52c82df80e5e7c4b853ce1", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/fe2c05275bbe7de49e715dc03b0d064ba9a95dc2", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/57034e1b51b4df633f8db095a5e8ee82205669fe", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/11edc76b15f0a1b8a3cf7e2d91f59978b93407b5", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/e32e91c7916107c1bdb1730c5c12fd85dd864d0a", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/404efd70f71044d280cd64240aafa12a434c9ec7", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/edcfe575cfe4bd14d0b7c885238a0ecb17e9475e", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/b240625d219005656dabb7377139e99b12004cd3", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/90cea7d4e73cebcd9e2d7ff52fe6cda9c4aaf2f4", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/576861e61757aa87479422e44f4d348c5a1d43a9", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/af6f3dcba55fed71ac04a6618f1b4269ccd6d614", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/d3ae6f25dd1acd2f1f7d71189d2315774363405e", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/bd475d8731f7b18266978df104b0bccb7c65a01c", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/9e4dd4dc4ec25a447719d4502bdbd240f9ad2f8b", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/573e055cd3bab9ddfa1572c5a05755073cbe5ab5", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/c16805a635ad3f1355c3e86405e229e115548e44", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/af5cf1ac1ccfe1b222ed7f23ceac5916dfcc69b6", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/3aae7d7823867eb0113ec4a8a418f0a2b7cc5af4", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/ddd390af012bf792f7934c4baea4ac5a5c3c92d8", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/5e67b40a9effc2e5a4c9ff77e6b14f409c7ee261", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/65cdf43e48505907bc3df2661540da638ca825a9", + "statusCheckRollup": null + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/4c6c5065753dcf4a1e59b9c2673ff268930d48f1", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/c15af6df035153e1bed1d93dde5b560a346333b9", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/d669eb038d31c7fe71308c9360774539cd2b0ecf", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/0edb69ae557869483b969213839704eefb8bd1fd", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/182aef6e6b28d2f62cd7281f38c12899d8006a15", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/ea8b9e6c180d736fb5436317326e3a572202f795", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/c7cbc6befa32e09a6fa130586a7391740971cd21", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/312908c068dd8c35f19669bde33c371cbe29851c", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/71448cb5166542ac015f5f6bed514353b353f1d0", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/004081cc0827d276a899cb62e1803f7632102bd6", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/f15e0b8237059455c1ecddcd004c0e69c18b4cd6", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/0e496ca2127b09dc113f933072c1ca3c9ced3d79", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/24d8e90dbcb107ec8fbafff451a48b56648936d1", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/8389ab87511317cbf263ad3b61a182a08fbee34f", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/71934ff244ca4e06f4c60e8a0eb27f4889e5cc77", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/db556c11b22148e3f28c95a70cc68f49bf858ac0", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/2ab2b4035cb728fbd57601399693ee9d1dc3d2e1", + "statusCheckRollup": { + "state": "SUCCESS" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/adecd73975d54b3b7f6aa32709448f2f69649d43", + "statusCheckRollup": { + "state": "FAILURE" + } + } + }, + { + "node": { + "commitUrl": "https://github.com/etcd-io/etcd/commit/a3f14cdf538704f37bfbb7f6198ff3b14de70b95", + "statusCheckRollup": { + "state": "FAILURE" + } + } + } + ] + } + } + } + } + } +} diff --git a/etcd-io/etcd/issue-13167/find-flaky-tests-data.sh b/etcd-io/etcd/issue-13167/find-flaky-tests-data.sh new file mode 100755 index 0000000..3162217 --- /dev/null +++ b/etcd-io/etcd/issue-13167/find-flaky-tests-data.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +curl -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d '{ + "query": "query { repository(owner: \"etcd-io\", name: \"etcd\") { defaultBranchRef { target { ... on Commit { history(first: 100) { edges { node { ... on Commit { commitUrl statusCheckRollup { state } } } } } } } } } }" +}' \ + https://api.github.com/graphql | jq . > commit-and-check-data.json +