Renovate: Renovate opens and closes a bunch of PRs despite nothing changed

Created on 19 May 2020  路  17Comments  路  Source: renovatebot/renovate

What Renovate type are you using?


Self hosted version 19.239.9 with gitea.

Describe the bug


I have a go repo with renovate installed and correctly set up.
Renovate seems to open and closing a bunch of PRs randomly every time it runs, but neither the dependency nor my code did change. It goes a bit like this:

  1. A dependency releases an update
  2. Renovate opens a PR
  3. My tests run, it turns out the dependency update broke something - I wont merge that PR.
  4. Renovate closes the PR
  5. GOTO 2

This happens all the time often at night when I'm not reviewing and merging PRs which has the effect of me waking up in the morning to 30 PR notification emails from renovate over the night and something like 15 closed PRs.

From what I understood renovate should only reopen an unmerged PR if either the dependency changed or the code in the repo.

Did you see anything helpful in debug logs?

I got something like that, not sure if thats related to my issue:

level=info msg="DEBUG: GitHub failure: rate limit (repository=

(and then a full request log with headers etc)

I could dig out more logging if you tell me what to look for.

To Reproduce

This happens at a repo in my gitea instance which is open-source.

Additional context


I also have renovate set up for a different repo which is not a go application but a vue js spa, I don't have such problems with that repo.

gitea

Most helpful comment

Glad to see that it's just a configuration issue, rather than an issue with Gitea or Renovate :smile:

@kolaente I don't think the docs linked appear on docs.renovatebot.com anywhere... yet.

All 17 comments

I can see that all the closed PRs have - autoclosed appended to them. That makes me think that you have pruneStaleBranches enabled? Could search the logs for "autoclosed" and "pruneStaleBranches"? You can also upload the logs here. Secrets are redacted from logs.

There are two log entries regarding autocloses:

renovate_1  | time="2020-05-19T16:00:45Z" level=info msg=" INFO: PR autoclosed (repository=vikunja/api)" channel=stdout iteration=1 job.command="/usr/local/bin/node /usr/src/app/dist/renovate.js" job.position=0 job.schedule="0 * * * *"
renovate_1  | time="2020-05-19T16:00:45Z" level=info msg="       \"prNo\": 560," channel=stdout iteration=1 job.command="/usr/local/bin/node /usr/src/app/dist/renovate.js" job.position=0 job.schedule="0 * * * *"
renovate_1  | time="2020-05-19T16:00:45Z" level=info msg="       \"prTitle\": \"Update module mattn/go-sqlite3 to v2.0.5\"" channel=stdout iteration=1 job.command="/usr/local/bin/node /usr/src/app/dist/renovate.js" job.position=0 job.schedule="0 * * * *"
...
renovate_1  | time="2020-05-19T19:00:39Z" level=info msg=" INFO: PR autoclosed (repository=vikunja/api)" channel=stdout iteration=4 job.command="/usr/local/bin/node /usr/src/app/dist/renovate.js" job.position=0 job.schedule="0 * * * *"
renovate_1  | time="2020-05-19T19:00:39Z" level=info msg="       \"prNo\": 561," channel=stdout iteration=4 job.command="/usr/local/bin/node /usr/src/app/dist/renovate.js" job.position=0 job.schedule="0 * * * *"
renovate_1  | time="2020-05-19T19:00:39Z" level=info msg="       \"prTitle\": \"Update module mattn/go-sqlite3 to v2.0.5\"" channel=stdout iteration=4 job.command="/usr/local/bin/node /usr/src/app/dist/renovate.js" job.position=0 job.schedule="0 * * * *"

I did not find anything related to pruneStaleBranches.

I've attached the full log I have since I set the log level to debug here.

Okay, so it's definitely falling down this logic here. I'll debug more tomorrow, but it looks like Gitea is returning true for isModified.

Sounds great, thanks. I'm actually running the latest gitea (master build from a commit a few days old) so it could be this is an issue only happening with that and not a release... But on the other hand, I've seen this happen quite a while, so if its that the latest release may also have it.

Secondly, I'm also one of gitea's maintainers, so if there's anything that would need to get fixed on the gitea side of things, please let me know 馃檭

Have you configured a GitHub.com token in your config? Lack of one could explain rate limiting of go modules lookup requests

I tried to configure one as per this guide which was linked in a pr created by renovate, but it didn't seem to have worked.

It's much simpler to configure when you're self-hosted. e.g. export it to GITHUB_COM_TOKEN before running Renovate.

@kolaente you can't use the renovate app encryption. You need to configure [encryption)(https://docs.renovatebot.com/self-hosted-configuration/#privatekey) to use encrypted token. ot you need to pass the token unencrypted.

You can simply pass it as env GITHUB_COM_TOKEN=xxx

@viceice Ah that makes sense, thanks. I guess the docs should be fixed then :upside_down_face:

nope, the guide you mentioned is for gitlab app, so you just followed the wrong guide 馃檭

but yes, we can improve the docs for those.

As you can see here we have some gitlab samples.

Can you help us to add a sample for gittea

Relevant docs were here: https://github.com/renovatebot/renovate/blob/master/docs/development/self-hosting.md#gitea

image

The message displayed in PRs is generated here: https://github.com/renovatebot/renovate/blob/680edf3d1ac15368a0b61f5e9f4842956e86ac06/lib/workers/pr/index.ts#L222-L232

It was worded to target gitlab.com app users because self-hosted users hopefully have seen the instructions already, while hosted users have not.

I've updated the PR warning text so that it's clearer for self-hosted users too.

@rarkins Thanks! I've changed that in my config accordingly.

Can you help us to add a sample for gittea

@viceice I'll take a look. Do the docs you linked to appear somewhere?

Glad to see that it's just a configuration issue, rather than an issue with Gitea or Renovate :smile:

@kolaente I don't think the docs linked appear on docs.renovatebot.com anywhere... yet.

Currently we don't publish the development docs to docs.renovatebot.com so that none of them confuse end users unnecessarily. However we should make sure all self-hosting guides are in the right place and published.

I can confirm it didn't open any more PRs (since there are already some) since adding the github api token to my renovate config.

(I'll close this as it seems to be resolved)

I've opened a PR which clarifies the docs a bit further: #6292

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZauberNerd picture ZauberNerd  路  4Comments

jycouet picture jycouet  路  4Comments

hutson picture hutson  路  3Comments

zephraph picture zephraph  路  3Comments

Arcanemagus picture Arcanemagus  路  4Comments