Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automergeSchedule not working if it's outside of normal schedule #24275

Open
rarkins opened this issue Sep 6, 2023 Discussed in #24005 · 5 comments
Open

automergeSchedule not working if it's outside of normal schedule #24275

rarkins opened this issue Sep 6, 2023 Discussed in #24005 · 5 comments
Labels
core:automerge Relating to Renovate's automerge capabilities help wanted Help is needed or welcomed on this issue priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality

Comments

@rarkins
Copy link
Collaborator

rarkins commented Sep 6, 2023

Discussed in #24005

Originally posted by fallemand August 21, 2023

How are you running Renovate?

Mend Renovate hosted app on github.com

If you're self-hosting Renovate, tell us what version of Renovate you run.

No response

If you're self-hosting Renovate, select which platform you are using.

None

Was this something which used to work for you, and then stopped?

It used to work, and then stopped

Describe the problem

I have the following config:

"packageRules": [
    {
      "matchUpdateTypes": [
        "minor",
        "patch"
      ],
      "automerge": true
    }
  ],
  "schedule": [
    "after 9am every weekend"
  ],
  "automergeSchedule": [
    "after 9am and before 5pm every weekday"
  ],

I want PRs to be created during the weekend (where CI consumption is low), and then be automerged in working hours (in case a problem appears). But the automerge is not happening because it's outside of the schedule.

Relevant debug logs

Logs

renovate.log

@rarkins rarkins added type:bug Bug fix of existing functionality help wanted Help is needed or welcomed on this issue priority-4-low Low priority, unlikely to be done unless it becomes important to more people status:ready core:automerge Relating to Renovate's automerge capabilities labels Sep 6, 2023
@WietseJT
Copy link
Contributor

Hi, I think I found out what's happening. It's because updateNotScheduled is set to false. Which means it stops processing the branch here:

if (config.updateNotScheduled === false && !config.rebaseRequested) {
logger.debug('Skipping branch update as not within schedule');
return {
branchExists,
prNo: branchPr?.number,
result: 'update-not-scheduled',
};
before it can reach the automerge part which starts on line 613
I tested it manually with updateNotScheduled set to true and the included config and the automerge happened as expected.

@paddyroddy
Copy link
Contributor

paddyroddy commented Dec 1, 2023

I tested it manually with updateNotScheduled set to true and the included config and the automerge happened as expected.

I have observed the same effect/problem, my config

{
  $schema: "https://docs.renovatebot.com/renovate-schema.json",
  extends: [
    "config:best-practices",
    "schedule:automergeWeekdays",
    "schedule:monthly",
    ":assignAndReview(paddyroddy)",
    ":automergeBranch",
    ":automergeDigest",
    ":automergeMinor",
    ":automergePatch",
    ":disableDependencyDashboard",
    ":enablePreCommit",
    ":label(renovate)",
    ":maintainLockFilesMonthly",
    ":prHourlyLimitNone",
  ],
}

I recently changed to schedule:monthly, but after that triggered for the first time today, I noticed that I had hit the prHourlyLimit (which is why I have now set it to None). It seemed that I would have some branches created, not merged until next month, so I added schedule:automergeWeekdays. These weren't being merged until I removed :noUnscheduledUpdates. Would be good to have slightly more documentation on what exactly updateNotScheduled does?

paddyroddy added a commit to paddyroddy/.github that referenced this issue Jan 24, 2024
paddyroddy added a commit to UCL-MIRSG/.github that referenced this issue Apr 3, 2024
There seems to be a bug in @renovatebot renovatebot/renovate#24275. This may increase CI use (although we're still setting a `schedule` and an `automergeSchedule` so it shouldn't be much). This PR should fix blocked @renovatebot updates.
paddyroddy added a commit to UCL-ARC/.github that referenced this issue Apr 3, 2024
There seems to be a bug in @renovatebot renovatebot/renovate#24275. This may increase CI use (although we're still setting a `schedule` and an `automergeSchedule` so it shouldn't be much). This PR should fix blocked @renovatebot updates.
paddyroddy added a commit to UCL-ARC/.github that referenced this issue Apr 4, 2024
There seems to be a bug in @renovatebot renovatebot/renovate#24275. This
may increase CI use (although we're still setting a `schedule` and an
`automergeSchedule` so it shouldn't be much). This PR should fix blocked
@renovatebot updates.
@yunex-ts

This comment has been minimized.

@mdankbar
Copy link

I ran into the same issue. We want merge requests to be created two days before merging, so there would be a chance for manual review and intervention. However, currently the the merge requests do not get merged the way I expected.

@qmg-jturner
Copy link

We've also been experiencing the same issue, whereby setting updateNotScheduled to true makes automerging work as expected. We're unsure as to the effects of setting it to true globally right now. Is there any further update available on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:automerge Relating to Renovate's automerge capabilities help wanted Help is needed or welcomed on this issue priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

6 participants