Force on lockFileMaintenance breaks PR creation in Gitlab #44211
Unanswered
Daniel-I-Am
asked this question in
Request Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate CLI
Which platform you running Renovate on?
GitLab (.com or self-hosted)
Which version of Renovate are you using?
43.214.2
Please tell us more about your question or problem
Most of our repositories have a schedule defined for creating their merge requests by Renovatebot. Sometimes, MRs should be created outside that schedule for whatever reason. For that, I have a manually triggered run of Renovatebot with the
RENOVATE_FORCEenvironment variable set.In the current version this breaks the creation of
lockFileMaintenanceMRs.The documentation reads:
This sounded great and is what I applied:
RENOVATE_FORCE={"schedule":null, "lockFileMaintenance": {"enabled": true, "schedule": null}, "prHourlyLimit": 50}in the Gitlab scheduled pipeline running Renovatebot.This is also everything needed to reproduce alongside a repository with a pending lockFileMaintenance upgrade.
lockFileMaintenanceis marked as 'mergeable' in the documentation. So this should pick up the default configuration, overriding the scheduling.I am pretty sure it was able to do so in the past, but I was unable to validate this, since we don't use this very often. But it did send me on a wild goose chase leading to this discussion.
However, setting any part of the
lockFileMaintenancekey using force also seems to remove the defaultlockFileMaintenance.branchTopicsetting, causing Renovate to default to a branch namedrenovate/.xwhich is not a valid branchname for Git.It can be worked around by copying over the entire default value for the 'lockFileMaintenance' configuration block, i.e.:
RENOVATE_FORCE={"schedule":null, "lockFileMaintenance": {"enabled": true, "recreateWhen": "always", "branchTopic": "lock-file-maintenance", "commitMessageAction": "Lock file maintenance", "commitMessageTopic": null, "commitMessageExtra": null, "schedule": null, "groupName": null, "prBodyDefinitions": {"Change": "All locks refreshed"}}, "prHourlyLimit": 50}I think it's a bug that setting
lockFileMaintenanceoverrides the full object rather than only the nested keys that are configured.I am assuming this is a really niche feature/use-case so maybe just accepting the bug and documenting it is sufficient. If there was a warning in the docs for
forcesaying 'when overridinglockFileMaintenance, the entire object is overridden including the branch name leading to unpredictable behavior', it would have saved me many hours of debugging 😅However, looking at the sledgehammer I am using to solve a scheduling problem, this might also be a feature request. Which is to allow the behavior mentioned in the documentation, bypassing configured schedules, without having to reach out to
force. I would not mind aignoreSchedulesetting in the self-hosted options for accomplishing this behavior.Logs (if relevant)
Logs
(latest logs I have that are somewhat small enough to dig through were of a failed branch, so it ends with no-work, but still shows the branch naming issue after
branchifyUpgrades.Beta Was this translation helpful? Give feedback.
All reactions