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

Tide blocks PRs which have checks with "skipped" status #130

Closed
sbueringer opened this issue Apr 22, 2024 · 10 comments · Fixed by #131
Closed

Tide blocks PRs which have checks with "skipped" status #130

sbueringer opened this issue Apr 22, 2024 · 10 comments · Fixed by #131

Comments

@sbueringer
Copy link
Member

Since a few days (I think since the weekend) tide is not merging PRs with skipped actions anymore.

It reports: Pending — Not mergeable. Job Approve ok-to-test has not succeeded.

For full context, see: https://kubernetes.slack.com/archives/C09QZ4DQB/p1713803378307299

It looks like GitHub changed the "check-runs" API to additionally return a "skipped" status which is not handled in

prow/pkg/tide/tide.go

Lines 2133 to 2139 in a25fe4d

if checkRun.Conclusion == checkRunConclusionNeutral || checkRun.Conclusion == githubql.String(githubql.StatusStateSuccess) {
context.State = githubql.StatusStateSuccess
return context
}
context.State = githubql.StatusStateFailure
return context

Some referenced:

image

This will affect a few more repositories as just this action alone was copy&pasted across a few repos: ~ https://cs.k8s.io/?q=%27ok-to-test%27&i=nope&files=&excludeFiles=&repos=

@sbueringer sbueringer changed the title Tide blocks PR which have checks with "skipped" status Tide blocks PRs which have checks with "skipped" status Apr 22, 2024
@tuminoid
Copy link
Contributor

+1. We also hit same in Metal3 today. Skipped optional action was blocking tide from merging. Worked around it by editing PR title which causes actions to run again, and then tide agreed to merge.

@cardil
Copy link

cardil commented Apr 22, 2024

+1. This affects a lot of Knative repos. For example: knative/serving#15147

@dprotaso
Copy link

Oddly the Check run API isn't returning skipped jobs ATM

gh api \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /repos/knative/serving/commits/acdcf4fd9bad1fce9f17a29f3638ede1833cf8c9/check-runs | jq '.check_runs | .[] | .name'

@dprotaso
Copy link

I think I'm hitting the wrong endpoint cause when I create new PRs the tide is still blocking it on skipped checks

@JohnNiang
Copy link

JohnNiang commented Apr 23, 2024

I faced the same problem yesterday.

image
{
      "id": 24134812784,
      "name": "github-release",
      "node_id": "CR_kwDOB4VVe88AAAAFnowEcA",
      "head_sha": "ff334baa39e8d8ff74886c5d9b6de342f1f6ae5b",
      "external_id": "4ff2e047-c2ab-5477-8844-6e71b9d83ccc",
      "url": "https://api.github.com/repos/halo-dev/halo/check-runs/24134812784",
      "html_url": "https://github.com/halo-dev/halo/actions/runs/8751217578/job/24134812784",
      "details_url": "https://github.com/halo-dev/halo/actions/runs/8751217578/job/24134812784",
      "status": "completed",
      "conclusion": "skipped",
      "started_at": "2024-04-23T04:23:25Z",
      "completed_at": "2024-04-23T04:23:25Z",
      "output": {
        "title": null,
        "summary": null,
        "text": null,
        "annotations_count": 0,
        "annotations_url": "https://api.github.com/repos/halo-dev/halo/check-runs/24134812784/annotations"
       }
}

I'm using version v20231103-74dcf8db5c.

@saschagrunert
Copy link
Member

@sbueringer are you already working on a fix for this?

@sbueringer
Copy link
Member Author

@saschagrunert No, mostly because I'm not familiar with the code base and I don't know if it is more than just adjusting that one single if

saschagrunert added a commit to saschagrunert/prow that referenced this issue Apr 23, 2024
The GitHub API seems to have changed the conclusion to now return
`skipped`. Tide should consider this status as success to be able to
merge the PR.

Fixes kubernetes-sigs#130

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member

Working towards a fix in #131

@saschagrunert
Copy link
Member

It works, PR's like kubernetes-sigs/security-profiles-operator#2225 merge again. :)

@sbueringer
Copy link
Member Author

Thank you very much!

Prucek pushed a commit to Prucek/prow that referenced this issue May 21, 2024
The GitHub API seems to have changed the conclusion to now return
`skipped`. Tide should consider this status as success to be able to
merge the PR.

Fixes kubernetes-sigs#130

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Prucek pushed a commit to Prucek/prow that referenced this issue May 21, 2024
The GitHub API seems to have changed the conclusion to now return
`skipped`. Tide should consider this status as success to be able to
merge the PR.

Fixes kubernetes-sigs#130

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants