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

Problem with grouping updates #10287

Closed
1 task done
Maggus85 opened this issue Jul 25, 2024 · 5 comments
Closed
1 task done

Problem with grouping updates #10287

Maggus85 opened this issue Jul 25, 2024 · 5 comments
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules L: ruby:bundler RubyGems via bundler T: bug 🐞 Something isn't working

Comments

@Maggus85
Copy link

Maggus85 commented Jul 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

Nuget

Package manager version

No response

Language version

C#

Manifest location and content before the Dependabot update

No response

dependabot.yml content

version: 2
registries:
  farm-cloud:
    type: nuget-feed
    url: https://agrisolutionseu.pkgs.visualstudio.com/_packaging/FarmCloud/nuget/v3/index.json
    token: PAT:${{VSS_NUGET_ACCESSTOKEN}}
  nuget:
    type: nuget-feed
    url: https://api.nuget.org/v3/index.json
schedule:
  interval: "daily"
updates:
  - package-ecosystem: "nuget"
    directory: 
      - /src/API/AS.FarmCloud.Sensor.Storage/
    open-pull-requests-limit: 20
    registries:
      - farm-cloud
      - nuget
groups:
  internal-libs:
    applies-to: version-updates
    patterns:
      - "AS.Farm*
  external-libs:
    applies-to: version-updates
    patterns:
      - *

Updated dependency

No response

What you expected to see, versus what you actually saw

I wanted to create one pr that updates the packages from our internal feed and a second that updates the others nugets.
For this reason, I added a section

groups:
  internal-libs:
    applies-to: version-updates
    patterns:
      - "AS.Farm*"
  external-libs:
    applies-to: version-updates
    patterns:
      - "*"

Without this section, everything works, but a lot of pr is created, which is not the expected behavior

Translated with DeepL.com (free version)

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

running NuGet updater:
/opt/nuget/NuGetUpdater/NuGetUpdater.Cli update --repo-root /home/dependabot/dependabot-updater/tmp/agrisolutionseu/Agri\%20Solutions/_git/FarmCloud --solution-or-project /home/dependabot/dependabot-updater/tmp/agrisolutionseu/Agri\%20Solutions/_git/FarmCloud/src/API/AS.FarmCloud.Sensor.Storage/tests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests.csproj --dependency coverlet.collector --new-version 6.0.2 --previous-version 3.0.3 --result-output-path /tmp/update-result.json --verbose
  No dotnet-tools.json file found.
  No global.json file found.
Running for project file [src/API/AS.FarmCloud.Sensor.Storage/tests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests.csproj]
Updating project [/home/dependabot/dependabot-updater/tmp/agrisolutionseu/Agri%20Solutions/_git/FarmCloud/src/API/AS.FarmCloud.Sensor.Storage/tests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests.csproj]
  Running for SDK-style project
    Package [coverlet.collector] already meets the requested dependency version in [/home/dependabot/dependabot-updater/tmp/agrisolutionseu/Agri%20Solutions/_git/FarmCloud/src/API/AS.FarmCloud.Sensor.Storage/tests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests/AS.FarmCloud.Sensor.Storage.Domain.UnitTests.csproj].
Update complete.
  Writing update result to [/tmp/update-result.json].
I, [2024-07-24T19:53:23.971283 #7]  INFO -- : update result: {
  "ErrorType": null,
  "ErrorDetails": null
}
Submitting coverlet.collector pull request for creation.
E, [2024-07-24T19:53:23.973486 #7] ERROR -- : Error while generating commit message: Passed `nil` into T.must
E, [2024-07-24T19:53:23.973531 #7] ERROR -- : /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/_types.rb:222:in `must'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:285:in `pr_name_directory'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:59:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:59:in `block in create_validator_method_fast0'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:185:in `solo_pr_name'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:59:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:59:in `block in create_validator_method_fast0'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:115:in `pr_name'

Smallest manifest that reproduces the issue

No response

@Maggus85 Maggus85 added the T: bug 🐞 Something isn't working label Jul 25, 2024
@github-actions github-actions bot added L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules L: ruby:bundler RubyGems via bundler labels Jul 25, 2024
@brettfo
Copy link
Contributor

brettfo commented Jul 25, 2024

@jakecoffman Could I get your help in triaging this? I don't see anything that's specific to the NuGet updater (i.e., it doesn't do anything specific with groups that I know of. Have you seen similar issues with other ecosystems?

@brettfo brettfo removed L: ruby:bundler RubyGems via bundler L: git:submodules Git submodules L: dotnet:nuget NuGet packages via nuget or dotnet labels Jul 25, 2024
@github-actions github-actions bot added L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules L: ruby:bundler RubyGems via bundler labels Jul 25, 2024
@rhyskoedijk
Copy link

rhyskoedijk commented Jul 26, 2024

This might be unrelated, but the stacktrace exactly matches issues recently reported here:

L285: "Error while generating commit message: Passed nil into T.must"

def pr_name_directory
return "" if T.must(files.first).directory == "/"
" in #{T.must(files.first).directory}"
end

files.first is nil, no files were updated by NuGetUpdater.Cli for the dependency.

The issue in tinglesoftware/dependabot-azure-devops#1232 was ultimately caused due to auth issues accessing the private nuget-feed, which is a known issue with dependabot-core when consuming Azure DevOps NuGet feeds (see: #8927). However there are no auth errors are mentioned in OP's logs, so the root cause may be different here but the output from NuGetUpdater.Cli appears to be the same; no files were changed.

The comment #9555 (comment) also suggest this might be a NuGet auth issue

@ghost
Copy link

ghost commented Jul 26, 2024

Have you seen similar issues with other no

@Maggus85
Copy link
Author

Maggus85 commented Aug 1, 2024

https://github.com/tinglesoftware/dependabot-azure-devops/issues/1257 using this docker image and
useUpdateScriptvNext: true solve this pipeline error

@rhyskoedijk
Copy link

@Maggus85 or @brettfo are you able to close this issue? It is not an issue with dependabot-core, it is an auth issue in https://github.com/tinglesoftware/dependabot-azure-devops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet L: git:submodules Git submodules L: ruby:bundler RubyGems via bundler T: bug 🐞 Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants