renovate icon indicating copy to clipboard operation
renovate copied to clipboard

Sync versions within a group

Open nejch opened this issue 3 years ago • 20 comments

What would you like Renovate to be able to do?

This may be related to one of the following 2 issues so feel free to close but I think actually preventing PRs from being open hasn't been discussed there:

  • https://github.com/renovatebot/renovate/issues/4404
  • https://github.com/renovatebot/renovate/issues/1342

The use case here is that you still want fast updates, but you don't want to open a PR for a group until some required deps have new versions, ensuring they are always updated together:

  • for example in https://gitlab.com/renovate-bot/renovate-runner, to always update the slim and normal Docker image together to avoid creating a major release for the CI template twice when both images get updated (not really possible because slim is in the docker tag not in the image, I think, but just to illustrate the point).
  • in my case, a (very dirty) proposed dependency scheme that tracks the git submodule and its deployed package at the same time for the convenience of local development with sources.

Although the issues above might partially solve this (maybe I missed something), I'd like to prevent at least merging a PR until all/required updates are available, and if possible even prevent PR creation to avoid compute waste if I know it will fail without both updates.

Did you already have any implementation ideas?

Not sure about implementation but an option like this is how I imagine it:

Since we don't know the exact dependency names, define a minimum number of deps updates required before opening a PR for that group:

  "packageRules": [
    {
      "matchDepTypes": ["devDependencies"],
      "groupName": "devDependencies",
      "requiredUpdates": 2
    },
]

If it's an easy addition I'd be willing to give it a try, with some pointers :)

nejch avatar Apr 27 '21 09:04 nejch