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

Create 1 PR for the same update across update configs #1595

Open
hisuwh opened this issue Dec 23, 2019 · 20 comments
Open

Create 1 PR for the same update across update configs #1595

hisuwh opened this issue Dec 23, 2019 · 20 comments
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-improvement Requests to improve existing features T: feature-request Requests for new features

Comments

@hisuwh
Copy link

hisuwh commented Dec 23, 2019

We have a monorepo for some microservices and have config something like this:

version: 1
update_configs:
- package_manager: "javascript"
  directory: "/path/to/project1"
  update_schedule: "daily"

- package_manager: "javascript"
  directory: "/path/to/project2"
  update_schedule: "daily"

- package_manager: "dotnet:nuget"
  directory: "/path/to/project3"
  update_schedule: "daily"

- package_manager: "dotnet:nuget"
  directory: "/path/to/project4"
  update_schedule: "daily"

So if for example Typescript gets updated we end up with two PRs, 1 each for project1 and project2.

Its worse with dotnet because we have common assemblies between the two projects, so if a dependency in one of them changes, we end up with two PRs for the same project. This obviously resolves and dependabot closes the second one when we merge the first one but it is still extra noise.

Perhaps you could support multiple folders per configuration so they can be easily grouped?

version: 1
update_configs:
- package_manager: "javascript"
  directory:
  - "/path/to/project1"
  - "/path/to/project2"
  update_schedule: "daily"

- package_manager: "dotnet:nuget"
  directory: 
  - "/path/to/project3"
  - "/path/to/project4"
  update_schedule: "daily"
@stale stale bot added the stale label Feb 21, 2020
@hisuwh

This comment was marked as outdated.

@stale stale bot removed the stale label Feb 21, 2020
@infin8x
Copy link
Contributor

infin8x commented Jul 20, 2020

Similar to #1190

@infin8x infin8x added F: noise related to Dependabot being noisy, or initiatives to make Dependabot quieter T: feature-request Requests for new features labels Jul 20, 2020
@scottrobertson
Copy link

This would be awesome for us.

Screenshot 2020-07-23 at 11 23 04

@abdulapopoola
Copy link
Member

Update: We've started doing some grouped updates work! This particular issue might not be part of the first ship but if you want to track our updates, do follow #1190.

@abdulapopoola
Copy link
Member

abdulapopoola commented Oct 9, 2023

Following up; we've started doing some exploration to allow multiple directories to be grouped together.

@abdulapopoola abdulapopoola pinned this issue Oct 9, 2023
@abdulapopoola
Copy link
Member

tagging @Nishnha and @honeyankit

@danielknell
Copy link

danielknell commented Oct 23, 2023

I have been finding this increasingly problematic with local interdependencies within a python monorepo.

if package1 depends on package2 and a dep is bumped in package2 then the poetry lock file in package1 still depends on the older version of the transitive dependency.

this will fail the build, as the lock file for package1 contains the old version of dep1, which does not meet the new transitive requirement from package2, so we end up having to manually untangle that.

updating across the entire repo would prevent this.

@yeikel
Copy link
Contributor

yeikel commented Oct 29, 2023

I have been finding this increasingly problematic with local interdependencies within a python monorepo.

if package1 depends on package2 and a dep is bumped in package2 then the poetry lock file in package1 still depends on the older version of the transitive dependency.

this will fail the build, as the lock file for package1 contains the old version of dep1, which does not meet the new transitive requirement from package2, so we end up having to manually untangle that.

updating across the entire repo would prevent this.

I ignore how other ecosystems work, but can your Python package manager store and share version definitions across projects?

In the Java world, this is easily solved defining the version in the parent project and letting the children projects inherit the version.

When this happens, not only dependabot but any tool or developer can update the version in a single place

@danielknell
Copy link

I have been finding this increasingly problematic with local interdependencies within a python monorepo.
if package1 depends on package2 and a dep is bumped in package2 then the poetry lock file in package1 still depends on the older version of the transitive dependency.
this will fail the build, as the lock file for package1 contains the old version of dep1, which does not meet the new transitive requirement from package2, so we end up having to manually untangle that.
updating across the entire repo would prevent this.

I ignore how other ecosystems work, but can your Python package manager store and share version definitions across projects?

In the Java world, this is easily solved defining the version in the parent project and letting the children projects inherit the version.

When this happens, not only dependabot but any tool or developer can update the version in a single place

no, this is not supported by the tooling at the moment.

@yeikel
Copy link
Contributor

yeikel commented Oct 31, 2023

I have been finding this increasingly problematic with local interdependencies within a python monorepo.
if package1 depends on package2 and a dep is bumped in package2 then the poetry lock file in package1 still depends on the older version of the transitive dependency.
this will fail the build, as the lock file for package1 contains the old version of dep1, which does not meet the new transitive requirement from package2, so we end up having to manually untangle that.
updating across the entire repo would prevent this.

I ignore how other ecosystems work, but can your Python package manager store and share version definitions across projects?

In the Java world, this is easily solved defining the version in the parent project and letting the children projects inherit the version.

When this happens, not only dependabot but any tool or developer can update the version in a single place

no, this is not supported by the tooling at the moment.

Relevant python-poetry/poetry#2270

@danielknell
Copy link

Relevant python-poetry/poetry#2270

I don't see that ticket being realistically touched in the foreseeable future, it's just an unnecessary distraction from the issue here.

@yeikel
Copy link
Contributor

yeikel commented Nov 14, 2023

Relevant python-poetry/poetry#2270

I don't see that ticket being realistically touched in the foreseeable future, it's just an unnecessary distraction from the issue here.

Apologies, I did not mean to suggest that the issue would solve the problem here.

It just answered my question and could help others with a similar curiosity. Dependabot can definitely support this independently even if poetry never does

@magnusjtvisma
Copy link

Is this now supported given this recent PR: #8541 ?

@jzabroski
Copy link

@magnusjtvisma Not sure but I opened #8808 because I can't read Ruby well enough to know how to configure whatever it is 8541 is doing.

@abdulapopoola abdulapopoola removed F: noise related to Dependabot being noisy, or initiatives to make Dependabot quieter F: monorepo 📦 Issues related to bumping a dep in manifests from multiple apps labels Mar 11, 2024
@jurre jurre added T: feature-request Requests for new features T: feature-improvement Requests to improve existing features labels Mar 19, 2024
@abdulapopoola
Copy link
Member

Multi-dir configuration is now in public beta; open to hearing your thoughts as you try out the beta!

Tagging @carlincherry

@bjorhn
Copy link

bjorhn commented Apr 30, 2024

I've attemped to modify our dependabot.yml according to the blog post but it doesn't appear to be working correctly on my end. The below code snippet results in 4 pull requests being created, only for the project file in the root ("/") folder, despite several packages in the other project files being out of date.

When I check the dependabot logs it says "Errored with the message "Dependabot cannot open any more pull requests"". I don't recall 4 being the limit but perhaps it is nowadays. Should I expect to see a single pull request if the same package is referenced in multiple project files, or one pull request for each project where the package is referenced?

All projects are Poetry projects in pyproject.toml format.

  # Enable version updates for pip
  - package-ecosystem: "pip"
    directories:
      - "/"
      - "/cli"
      - "/dbt"
      - "/agent"
      - "/report"
      - "/pipeline"
      - "/realtime"
      - "/deployment"
      - "/flow_audit"
      - "/integration"
      - "/maintenance"
      - "/orchestration"
      - "/scripts"
    # Check for updates once a month
    schedule:
      interval: "monthly"
      day: "monday"
      time: "04:00"
      timezone: "Europe/Stockholm"

Edit: My mistake, of course I had to create groups as well. Now things work as expected!

@jzabroski
Copy link

jzabroski commented Apr 30, 2024

You should be able to configure the PR limit.

open-pull-requests-limit: 10

The use case to limit it is that sometimes it can be overbearing to review a bunch of dependencies.

@jzabroski
Copy link

jzabroski commented Apr 30, 2024

For me, the annoying part so far testing out the beta is that I can't seem to get dependabot to update existing incorrect PRs. I tried @dependabot recreate and it told me that it was previously created with a different config. It then suggested I close the PR: "The dependabot.yml entry that created this PR has been deleted so this PR can't be recreated. Please close the PR so Dependabot can create a new one with the current dependabot.yml." I did so. It then responded with "OK, I won't notify you again about this release, but will get in touch when a new version is available. [...]" - is this message incorrect?

Edit: If I go to Insights -> Dependency Graph -> Dependabot, I can see the dependabot logs that one of the directories was a top-level directory, and so dependabot failed to unify the directories to find csproj files to consider. So, the message may be incorrect.

@stevehipwell
Copy link

This worked great in the repo I tested it in. I had 3 outstanding PRs and after changing the config these were closed and replaced with a single PR.

@jonjanego jonjanego added the Keep Exempt this from being marked by stalebot label May 2, 2024
@carlincherry
Copy link
Member

For me, the annoying part so far testing out the beta is that I can't seem to get dependabot to update existing incorrect PRs. I tried @dependabot recreate and it told me that it was previously created with a different config. It then suggested I close the PR: "The dependabot.yml entry that created this PR has been deleted so this PR can't be recreated. Please close the PR so Dependabot can create a new one with the current dependabot.yml." I did so. It then responded with "OK, I won't notify you again about this release, but will get in touch when a new version is available. [...]" - is this message incorrect?

Edit: If I go to Insights -> Dependency Graph -> Dependabot, I can see the dependabot logs that one of the directories was a top-level directory, and so dependabot failed to unify the directories to find csproj files to consider. So, the message may be incorrect.

Hi @jzabroski I also replied in another issue but wanted to add here too in case folks are reading this thread. I'm sorry you experienced this behavior; this is a known issue; our team is actively investigating and we'll update here as we investigate.

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-improvement Requests to improve existing features T: feature-request Requests for new features
Projects
Status: In Progress
Development

No branches or pull requests