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

Prevent all major upgrades unless explicitly allowed #2976

Open
nadavwr opened this issue Feb 16, 2023 · 1 comment
Open

Prevent all major upgrades unless explicitly allowed #2976

nadavwr opened this issue Feb 16, 2023 · 1 comment

Comments

@nadavwr
Copy link

nadavwr commented Feb 16, 2023

We are about to roll out Scala Steward to some 70 private repos.
We have our own internal libraries (all having the same groupId) for which we want minors and patches to be upgraded.
We of course also rely on many 3rd party libraries, for which we only want patch upgrades. possibly minors too, but never majors.

I start out with this:

pullRequests.grouping = [
  { name = internal, title = "internal minor upgrades", filter = [
    { group = internal, version = minor },
    { group = internal, version = patch }
  ] },
  { name = patches, title = "3rd party patches", filter = [ { version = patch } ] }
  { name = unsafe, title = "upgrades with no compatibility guarantees (unsafe)", filter = [ { version = major } ] }
]

So:

  • all internal patches+minors end up in an "internal minor upgrades" PR
  • all 3rd party patch upgrades end up in a "3rd party patches" PR
  • all major upgrades end up in the "unsafe" PR
  • 3rd party minor upgrade aren't covered by grouping rules, so each receives its own PR

My foremost concern is about the "unsafe" PR for major upgrades. Using the grouping rule I can put all major upgrades in one PR and limit noise, but realistically this PR will always fail CI and we would never consider merging it. It's just wasteful.

Note that #1163 isn't what I'm looking for -- I can't preemptively add ignore/allow/etc rules for any dependency added down the road in any of our repos.

Is there a way to prevent all major upgrades by Scala Steward? Any workaround? Maybe a pointer for adding this? (I'd love to contribute)

@fthomas
Copy link
Member

fthomas commented Feb 19, 2023

Is there a way to prevent all major upgrades by Scala Steward? Any workaround?

Nothing I'm aware of.

Maybe a pointer for adding this?

Maybe we can tweak UpdatePattern so that is possible to have a configuration like updates.ignore = [ { version = major } ]. The elements of the updates.ignore list are UpdatePatterns and it currently requires a groupId and the version: VersionPattern field does not yet support major, minor, patch values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants