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

Different Scheduling Rules #978

Closed luxcem closed 4 years ago

luxcem commented 4 years ago

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub.com

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

Yes,

I think what's blocking is this line for every PR:

DEBUG: Branch renovate/xxxxx is blocked by a Pin PR

I close the first Renovate PR and pushed the renovate.json file myself with the following config but Renovate is stalled.

What would you like to do?

I'm trying to set up different scheduling rules depending on updates:

My config looks like this:

{
  "extends": ["config:base"],
  "labels": ["renovate"],
  "packageRules": [
    {
      "depTypeList": ["devDependencies"],
      "updateTypes": ["minor", "patch", "pin", "digest"],
      "automerge": true
    },
    {
      "packagePatterns": ["eslint"],
      "groupName": "eslint"
    },
    {
      "depTypeList": ["devDependencies"],
      "updateTypes": ["major"],
      "schedule": ["before 2am on monday"]
    },
    {
      "depTypeList": ["dependencies"],
      "schedule": ["before 2am on monday"]
    }
  ]
}

There is no PR for minor / patch devDependencies and I think it is because of scheduling rules.

viceice commented 4 years ago

as you can see from the logs, you need to merge the pin pr or disable dependency pinning

luxcem commented 4 years ago

I don't have a pin PR I think that's the issue.

rarkins commented 4 years ago

What's the list of branches you have?

luxcem commented 4 years ago

Nothing under renovate/*

viceice commented 4 years ago

@luxcem can you please rename the closed renovate pr, eg append - wrong or anything else @rarkins maybe blocked because of the closed pr?

luxcem commented 4 years ago

I'll try, if that doesn't work should I remove the renovate.json file to restart the bot?

rarkins commented 4 years ago

I'm interested to know first what the logs say about the branch renovate/pin-dependencies

luxcem commented 4 years ago

I found

DEBUG: getBranchPr(renovate/pin-dependencies)
DEBUG: findPr(renovate/pin-dependencies, undefined, open)
...
(branch="renovate/pin-dependencies")
DEBUG: branchExists=false(branch="renovate/pin-dependencies")
DEBUG: Branch has 109 upgrade(s)(branch="renovate/pin-dependencies")
DEBUG: recreateClosed is true(branch="renovate/pin-dependencies")
DEBUG: Checking schedule(before 2am on monday, null)(branch="renovate/pin-dependencies")
DEBUG: Checking 1 schedule(s)(branch="renovate/pin-dependencies")
DEBUG: Checking schedule "before 2am on monday"(branch="renovate/pin-dependencies")
...
DEBUG: Does not match schedule because 67361 is later than 7200(branch="renovate/pin-dependencies")
DEBUG: Package not scheduled(branch="renovate/pin-dependencies")
DEBUG: Skipping branch creation as not within schedule(branch="renovate/pin-dependencies")
DEBUG: getBranchPr(renovate/pin-dependencies)(branch="renovate/pin-dependencies")
DEBUG: findPr(renovate/pin-dependencies, undefined, open)(branch="renovate/pin-dependencies")
viceice commented 4 years ago

You should add a updates type filter to your schedule rules, so they only apply to major, minor and patch updates. So the pin deps pr can open.

You can also disable pinning if you develop a library.

luxcem commented 4 years ago

Ok I manually pin the dependencies and it seems to work now.