Closed wxsms closed 1 year ago
I've seen those too on gitea recently. Maybe it's a caching issue when we run renovate a second time after automerge. 🤔
Maybe we need to clear config.prList
here?
https://github.com/renovatebot/renovate/blob/4a99883048843fbb7504bd7cd47fb7b73540156c/lib/platform/github/index.ts#L1646-L1650
The screenshot shows that a user merged it though, not the bot - so maybe not.
It's being called if we think the PR is Closed instead of Merged: https://github.com/renovatebot/renovate/blob/40f3aa2e1550d951298e0d3738b52d3c407467f3/lib/workers/branch/handle-existing.ts#L9
This points to perhaps a platform layer bug rather than application, and I don't see how it could be a cache problem if it was never in the state of Closed.
Here's where PR state is computed: https://github.com/renovatebot/renovate/blob/40f3aa2e1550d951298e0d3738b52d3c407467f3/lib/platform/github/index.ts#L766-L769
Here it happens on gitea:
Found that PR using the same API Renovate uses. It certainly has a merged_at
field now:
Timestamps:
@viceice I'm not sure Gitea is supporting the concept of merged state.
It's passed straight through: https://github.com/renovatebot/renovate/blob/f290c8d34a69e3f0b80edd46bf65b6c5ef1813c9/lib/platform/gitea/index.ts#L95
Elsewhere it doesn't include it: https://github.com/renovatebot/renovate/blob/f290c8d34a69e3f0b80edd46bf65b6c5ef1813c9/lib/platform/gitea/gitea-helper.ts#L8
here is another normal working pr
But here's another thing: this comment should only happen if Renovate thinks a Closed/Merged PR is blocking an update. Why would Renovate think an update is blocked? e.g. was it a race condition where:
If so then the only thing surprising is why it thought it's closed instead of merged.
My pr's are automerged by bot, so no user coincident. 😕
Three merges close together:
Two jobs ran close together:
Job 2 saw the latest commit as https://github.com/uiv-lib/uiv/commit/771fcbc9dcd8e6ca931bc3d8a7b92f9b64fd4e46 which was after the eslint merge.
It extracted the updated value as expected:
Job 1 saw the latest commit as https://github.com/uiv-lib/uiv/commit/811b41c583127a44be61b7500ade18efd65040ff and added the comment. It got the closed PR from the GraphQL API: Returning from graphql closed PR list
.
Here's when I query it manually:
"number": 560,
"state": "MERGED",
"headRefName": "renovate/eslint-7.x",
"title": "chore(deps): update dependency eslint to v7.29.0",
At this point it's hard to tell if the mistake was at our end or GitHub's but I'm leaning towards GitHub's - e.g. maybe the fact the PR had been merged hadn't populated to the data which GraphQL returns and it just knew it was "not open".
problem PR link: https://github.com/uiv-lib/uiv/pull/560
How are you running Renovate?
If using the hosted app, please skip to the next section. Otherwise, if self-hosted, please complete the following:
Please select which platform you are using:
Renovate version:
Describe the bug
Relevant debug logs
Click me to see logs
``` Copy/paste any log here, between the starting and ending backticks ```Have you created a minimal reproduction repository?
Please read the minimal reproductions documentation to learn how to make a good minimal reproduction repository.
Additional context