ci-chat-bot icon indicating copy to clipboard operation
ci-chat-bot copied to clipboard

Mergeable PR said as needing to be rebased

Open jotak opened this issue 4 years ago • 12 comments

It looks like there is a bug with the usage of the Mergeable flag here: https://github.com/openshift/ci-chat-bot/blob/9dac707eae449c29f3872773fcb7ce298b2cdd36/manager.go#L945-L947

This value can not only be true or false, but also null, cf https://docs.github.com/en/rest/reference/pulls#get-a-pull-request, when github is refreshing this flag. And it happens to us quite often that a PR is said needing rebase although it's actually mergeable; repeating the cluster-bot command several times in a row would ultimately make it work.

So, would it be possible to either have a small retry mechanism when Mergeable is null, or alternatively, allow to build on non-mergeable PRs ?

jotak avatar Aug 10 '21 14:08 jotak

Did someone have a look at that? Thanks

jotak avatar Sep 24 '21 07:09 jotak

We decode the json response, from GitHub, into a GitHubPullRequest. This means that if/when Mergeable is returned as null, from GitHub, it will only ever be False to us. While I understand that this may not be ideal, the best we can probably do here is to add some more verbiage to the message. As far as allowing builds of non-mergeable PR's, I'm not a big fan of that idea because you'd be building/testing code that'll eventually need to be rebased, regardless, and therefore should then be (re-)tested again.

bradmwilliams avatar Sep 24 '21 14:09 bradmwilliams

The current message is indeed wrong regarding the situation, I agree that at least it should be modified. Though I don't understand why having a quick retry mechanism isn't even an option, since in general, manually retrying just a couple of seconds later works.

jotak avatar Sep 27 '21 06:09 jotak

Hi @bradmwilliams - adding more/changed verbiage would certainly will helpful while it verifies the merge-ability in the back.ground. Let me know if we need to create an JIRA issue for this. Also +1 to @jotak retry idea if that's possible. Thanks!

memodi avatar Sep 27 '21 14:09 memodi

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Dec 26 '21 16:12 openshift-bot

/remove-lifecycle stale

bradmwilliams avatar Jan 06 '22 22:01 bradmwilliams

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Apr 06 '22 23:04 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar May 07 '22 00:05 openshift-bot

/remove-lifecycle rotten

bradmwilliams avatar May 07 '22 12:05 bradmwilliams

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Aug 05 '22 13:08 openshift-bot

/remove-lifecycle stale

bradmwilliams avatar Aug 05 '22 14:08 bradmwilliams

/lifecycle frozen

bradmwilliams avatar Aug 05 '22 14:08 bradmwilliams