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

Add support for multiple update_schedules / update_type combos for a single ecosystem / directory #1778

Open
shleeable opened this issue Apr 5, 2020 · 19 comments · Fixed by dribia/deepl-haystack#52
Labels
F: grouped-updates 🎳 Relates to bumping more than one dependency in a single PR Keep Exempt this from being marked by stalebot T: feature-request Requests for new features

Comments

@shleeable
Copy link

Hey, I'd love to be able to trigger and receive PRs for security updates on a live schedule.
and my regular scheduled all updates weekly.

The following is a mock for my config.yml -- obviously fails the validator as a dupe atm :)

version: 1

update_configs:
  - package_manager: "ruby:bundler"
    directory: "/"
    update_schedule: "weekly"
    version_requirement_updates: auto
    allowed_updates:
      - match:
          update_type: "all"

  - package_manager: "javascript"
    directory: "/"
    update_schedule: "weekly"
    version_requirement_updates: auto
    allowed_updates:
      - match:
          update_type: "all"


  - package_manager: "ruby:bundler"
    directory: "/"
    update_schedule: "live"
    version_requirement_updates: auto
    allowed_updates:
      - match:
          update_type: "security"

  - package_manager: "javascript"
    directory: "/"
    update_schedule: "live"
    allowed_updates:
      - match:
          update_type: "security"
@feelepxyz feelepxyz added F: noise related to Dependabot being noisy, or initiatives to make Dependabot quieter T: feature-request Requests for new features labels Apr 9, 2021
@asciimike
Copy link
Contributor

This is equally valid in a v2 config world, and is something we're considering for the future.

@natlibfi-jonollil
Copy link

Would love to have this feature. Hoping to have minor update merging automagicaly if passes the tests and send PR to lead devs for major updates.
Example .yml

version: 2
updates:
  # Minor updates to npm production dependencies daily
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
      time: "06:45"
      timezone: "Europe/Helsinki"
    versioning-strategy: lockfile-only
    labels:
      - "npm minor dependencies"
    allow:
      - dependency-type: "production"

  # Major updates to npm dependencies weekly @tuesday
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "tuesday"
      time: "07:00"
      timezone: "Europe/Helsinki"
    versioning-strategy: increase-if-necessary
    labels:
      - "npm major dependencies"
    reviewers:
      - "foobar/js-lead"

@mariusburfey
Copy link

Would love to have this feature. Hoping to have minor update merging automagicaly if passes the tests and send PR to lead devs for major updates.

This is exactly our use case. I would appreciate it very much.

@adamniedzielski
Copy link

The use case for my team is updating production dependencies weekly and dev dependencies monthly.

@jamime
Copy link

jamime commented Jun 25, 2022

I'm also after this functionality.

I'd like to allow the default of 5 PR's for external dependencies, but unlimited PR's for dependencies from my organisation.

@elstgav
Copy link

elstgav commented Sep 30, 2022

Are there any possible workarounds for this? I have the exact same use case as @jamime

I’d like to allow the default of 5 PR’s for external dependencies, but unlimited PR’s for dependencies from my organization.

@davidmurdoch
Copy link

I'd like to enable security updates for all packages, but version updates for only a handful.

@ianks
Copy link

ianks commented Oct 10, 2022

We just tried hacking around this with:

directory: "./" # instead of directory: "/"

This bypassed dependabot's validation, so we'll see what happens next...

UPDATE: Doesn't work.

@snesm
Copy link

snesm commented Nov 7, 2022

Would like to do something similar for daily checks for dependencies with security vulnerabilities:

  # Security only daily
  - package-ecosystem: "npm"
    directory: "/mysite"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 0
  # All packages weekly
  - package-ecosystem: "npm"
    directory: "/mysite"
    schedule:
      interval: "weekly"

pippolo84 added a commit to pippolo84/cilium that referenced this issue Dec 6, 2022
This reverts commit 5a6fb94.

Currently, it is not possible to have "duplicated updates" (i.e.:
multiple updates with the same <package-ecosystem, directory,
target-branch> tuple) in dependabot configuration:
dependabot/dependabot-core#1778.

In order to avoid the following error while parsing dependabot config:

The property '#/updates/1' is a duplicate. Update configs must have a
unique combination of 'package-ecosystem', 'directory', and
'target-branch'

the commit is reverted.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84 added a commit to cilium/cilium that referenced this issue Dec 6, 2022
This reverts commit 5a6fb94.

Currently, it is not possible to have "duplicated updates" (i.e.:
multiple updates with the same <package-ecosystem, directory,
target-branch> tuple) in dependabot configuration:
dependabot/dependabot-core#1778.

In order to avoid the following error while parsing dependabot config:

The property '#/updates/1' is a duplicate. Update configs must have a
unique combination of 'package-ecosystem', 'directory', and
'target-branch'

the commit is reverted.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
derailed pushed a commit to derailed/cilium that referenced this issue Dec 9, 2022
This reverts commit 5a6fb94.

Currently, it is not possible to have "duplicated updates" (i.e.:
multiple updates with the same <package-ecosystem, directory,
target-branch> tuple) in dependabot configuration:
dependabot/dependabot-core#1778.

In order to avoid the following error while parsing dependabot config:

The property '#/updates/1' is a duplicate. Update configs must have a
unique combination of 'package-ecosystem', 'directory', and
'target-branch'

the commit is reverted.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
@jeffwidman jeffwidman changed the title [Feature] Support for multiple update_schedules / update_type combos Add support for multiple update_schedules / update_type combos for a single ecosystem / directory Feb 5, 2023
@jeffwidman jeffwidman added the F: dependency-ignores Allow excluding certain versions label Apr 7, 2023
@ff137
Copy link

ff137 commented May 28, 2023

Is this ... possible yet?

To configure more than one schedule for the same ecosystem.

Pinging active contributors:
@brrygrdn
@deivid-rodriguez
@mctofu
@Nishnha
@jakecoffman

This seems like quite a prevalent question, and the issue is still open. Apologies if I've overlooked an obvious answer.

As far as I can tell the documentation on scheduling doesn't cover any advice to the natural scenario of wanting 2 separate schedules. Any feedback will be appreciated

@abdulapopoola abdulapopoola added the F: grouped-updates 🎳 Relates to bumping more than one dependency in a single PR label Mar 4, 2024
@alecgibson
Copy link

We just hacked our way around this by actively setting target-branch: main for one config, and leaving it unset for the other config (obviously only limited to 2 configs)

@lubo
Copy link

lubo commented Mar 11, 2024

@alecgibson's workaround seems to work for me. See my dependabot.yml.

chemicL added a commit to reactor/reactor-core that referenced this issue Mar 13, 2024
Previous attempt to group enhancement dependency updates separately from
build/test dependency bumps failed as Dependabot requires a unique
combination of 'package-ecosystem', 'directory', and 'target-branch'.

Perhaps this ability will be implemented in the future via
dependabot/dependabot-core#1778.
chemicL added a commit to reactor/reactor-core that referenced this issue Mar 13, 2024
Previous attempt to group enhancement dependency updates separately from
build/test dependency bumps failed as Dependabot requires a unique
combination of 'package-ecosystem', 'directory', and 'target-branch'.

Perhaps this ability will be implemented in the future via
dependabot/dependabot-core#1778.
dbaty added a commit to pass-culture/pass-culture-main that referenced this issue Apr 16, 2024
…iguration

The previous version of the configuration failed with the following
error:

    Update configs must have a unique combination of
    'package-ecosystem', 'directory', and 'target-branch'

To avoid that, apply the workaround that has been suggested here:
dependabot/dependabot-core#1778 (comment)
@jonjanego jonjanego added the Keep Exempt this from being marked by stalebot label May 2, 2024
@torokati44
Copy link

Hey, I'm also interested in this feature so that we can bump our direct / indirect go.mod dependencies on different schedules

Same but with Rust/Cargo! (Also, with different grouping, not just schedules.)

@kahagerman
Copy link

kahagerman commented Jul 26, 2024

We just hacked our way around this by actively setting target-branch: main for one config, and leaving it unset for the other config (obviously only limited to 2 configs)

It appears to also be possible to use target-branch: MAIN (or other uppercase/lowercase combinations) to get more than two configs.

Edit: Doesn't work.

@danieleades
Copy link

given that hacking the config to fool dependabot into thinking two schedules for the same package manager are unique works perfectly it should be relatively easy to enable first-class support for this, no?
Are there some edge cases here that need to be considered or is it really this easy?

@danieleades
Copy link

if anyone's looking for further examples, i use the following config to make minor and major updates as soon as they're available, and group patch releases on a monthly basis (cargo)-

version: 2
updates:
  # bump major and minor updates as soon as available
  - package-ecosystem: cargo
    target-branch: main # see https://github.com/dependabot/dependabot-core/issues/1778#issuecomment-1988140219
    directory: /
    schedule:
      interval: daily
    commit-message:
      prefix: chore
      include: scope
    ignore:
      - dependency-name: "*"
        update-types:
          - "version-update:semver-patch"

  # bundle patch updates together on a monthly basis
  - package-ecosystem: cargo
    directory: /
    schedule:
      interval: monthly
    commit-message:
      prefix: chore
      include: scope
    groups:
      patch-updates:
        update-types:
          - patch
    ignore:
      - dependency-name: "*"
        update-types:
          - "version-update:semver-minor"
          - "version-update:semver-major"

  # update github actions as soon as available
  - package-ecosystem: github-actions
    directory: "/"
    schedule:
      interval: daily
    ignore:
      - dependency-name: dtolnay/rust-toolchain
    commit-message:
      prefix: "ci"
      include: "scope"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: grouped-updates 🎳 Relates to bumping more than one dependency in a single PR Keep Exempt this from being marked by stalebot T: feature-request Requests for new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.