renovatebot / config-help

Please use the Discussions feature of https://github.com/renovatebot/renovate instead
https://github.com/renovatebot/renovate/discussions
MIT License
27 stars 16 forks source link

Renovate not creating Pull requests #1006

Closed plegner closed 3 years ago

plegner commented 3 years ago

Which Renovate are you using?

Renovate Open Source CLI

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

https://app.renovatebot.com/dashboard#github/mathigon/boost.js

What would you like to do?

In some cases (but not all) Renovate is creating a branch with updated dependencies, but not a pull request. Here are two examples:

Screenshot 2020-12-01 at 10 27 22

Of course, I can manually create a pull request in those cases. The main problem is that these won't have a rebase/retry checkbox, which means I have to manually resolve any merge conflicts (which can be quite messy in package-lock.json files). Here is the config I'm using:

{
  "extends": ["config:base"],
  "schedule": ["before 5am on the first day of the month"],
  "packageRules": [{
    "packagePatterns": ["eslint"],
    "groupName": "lint",
    "automerge": true,
    "automergeType": "branch"
  }, {
    "packagePatterns": ["^@mathigon"],
    "schedule": ["at any time"],
    "groupName": "mathigon",
    "automerge": true,
    "automergeType": "branch"
  }, {
    "packagePatterns": ["ts-node", "^typescript"],
    "groupName": "typescript",
    "automerge": true,
    "automergeType": "branch"
  }, {
    "packagePatterns": ["^@types/"],
    "groupName": "types",
    "automerge": true,
    "automergeType": "branch"
  }, {
    "packagePatterns": ["^rollup", "^@rollup"],
    "groupName": "rollup",
    "automerge": true,
    "automergeType": "branch"
  }, {
    "updateTypes": ["patch", "pin", "digest"],
    "groupName": "versions",
    "automerge": true,
    "automergeType": "branch"
  }]
}
rarkins commented 3 years ago

You've got "automergeType": "branch" enabled which tells Renovate "don't create a PR right away - try to automerge with just a branch first". A PR will only be created if the automerging fails. Do you have CI/tests enabled for this repo?

rarkins commented 3 years ago

Or more specifically:

plegner commented 3 years ago

Thanks for the clarifications! We do have tests running on Travis, but we shouldn't be hitting any limits. In fact, the build succeeded for that specific branch:

Screenshot 2020-12-01 at 11 25 00

In many cases everything works great (Renovate creates PRs or automerges changes), just one or two groups seem to be skipped every time, with just the branch being created.

Is it possible that we need to increase the "before 5am" schedule, so that Renovate has more time to try running tests and then merge branches or create PRs?

rarkins commented 3 years ago

If you see a branch you think should be automerging (if passing) or PR created (if failing), then you need to inspect if any branch tests have run on it before the PR is created. I agree with you though that it seems like tests ran when they should

If there's a passing test and no automerge for a long time then check when the last job on the dashboard ran. if a job ran after the branch went green but didn't automerge, the logs should give some hint why.

If you enable dependencyDashboard then it will give you access to a checkbox to let you request Renovate run "on demand", e.g. to speed up an automerge you're waiting for.

Don't worry about the schedule being too narrow. it only controls when branches are created and automerging or PR creation may happen out of schedule if necessary

plegner commented 3 years ago

Thanks so much for your help, @rarkins! I've been checking the logs and it does say Skipping PR creation out of schedule, however, it might be easiest to just remove the automergeType from the config, and manually merge all the PRs.

DEBUG: Does not match schedule because 20146 is later than 18000(branch="renovate/lint")
DEBUG: Package not scheduled(branch="renovate/lint")
DEBUG: Skipping PR creation out of schedule(branch="renovate/lint")
DEBUG: getBranchPr(renovate/lint)(branch="renovate/lint")
DEBUG: findPr(renovate/lint, undefined, open)(branch="renovate/lint")
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. If this question is not done (either you plan to update it or are waiting on someone to respond) then please add a comment here to bump it and/or get the other person's attention. We aim to do our best to solve every problem. This bot is here to help us clean up issues which are no longer of use to the original poster, and not to close anything prematurely, so bump as you need!