tinglesoftware / dependabot-azure-devops

Tools for updating dependencies in Azure DevOps repositories using https://dependabot.com
MIT License
189 stars 63 forks source link

Another Passed `nil` into T.must error. #1257

Open MarkTallentire opened 1 month ago

MarkTallentire commented 1 month ago

Running the latest image, this one seems subtely different to the previous closed issues as its related to generating a commit message.

Submitting dotnet-ef pull request for creation.
E, [2024-07-30T08:46:44.387991 #7] ERROR -- : Error while generating commit message: Passed `nil` into T.must
E, [2024-07-30T08:46:44.388179 #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.rb:270:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/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.rb:270:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/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'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:292:in `commit_subject'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:159:in `commit_message'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator.rb:315:in `azure_creator'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation.rb:270:in `validate_call'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
    from bin/update_script.rb:845:in `block in <main>'
    from bin/update_script.rb:558:in `each'
    from bin/update_script.rb:558:in `<main>'
rhyskoedijk commented 1 month ago

Hey @MarkTallentire, are you able to provide any more info to help reproduce this issue? I assume this is an update for dotnet-tools.json? can you share the [relevant] contents of the file being updated?

Rutix commented 1 month ago

@rhyskoedijk I am also running into this:

Submitting Microsoft.Azure.AppConfiguration.AspNetCore pull request for creation.
E, [2024-07-31T02:14:04.944447 #7] ERROR -- : Error while generating commit message: Passed `nil` into T.must
E, [2024-07-31T02:14:04.944717 #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'
/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:292:in `commit_subject'
/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:159:in `commit_message'
/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.rb:315:in `azure_creator'
/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.rb:241:in `create'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:393: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:393:in `block in create_validator_method_skip_return_fast0'
bin/update_script.rb:845:in `block in <main>'
bin/update_script.rb:558:in `each'
bin/update_script.rb:558:in `<main>'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/_types.rb:222:in `must': Passed `nil` into T.must (TypeError)

      raise TypeError.new("Passed `nil` into T.must")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:292:in `commit_subject'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:166:in `rescue in commit_message'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:158:in `commit_message'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator.rb:315:in `azure_creator'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator.rb:241:in `create'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:393:in `bind_call'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:393:in `block in create_validator_method_skip_return_fast0'
    from bin/update_script.rb:845:in `block in <main>'
    from bin/update_script.rb:558:in `each'
    from bin/update_script.rb:558:in `<main>'
/home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/_types.rb:222:in `must': Passed `nil` into T.must (TypeError)

      raise TypeError.new("Passed `nil` into T.must")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:292:in `commit_subject'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator/message_builder.rb:159:in `commit_message'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator.rb:315:in `azure_creator'
    from /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'
    from /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'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/dependabot-common-0.266.0/lib/dependabot/pull_request_creator.rb:241:in `create'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:393:in `bind_call'
    from /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11493/lib/types/private/methods/call_validation_2_7.rb:393:in `block in create_validator_method_skip_return_fast0'
    from bin/update_script.rb:845:in `block in <main>'
    from bin/update_script.rb:558:in `each'
    from bin/update_script.rb:558:in `<main>'

What info can I supply to be able to fix this? What I do see that it certainly doesn't happen in all repo's. We loop through repo's and the first one succeeds and in the second repo this error happens.

rhyskoedijk commented 1 month ago

What info can I supply to be able to fix this?

If you can provide any infomation that would help me reproduce the issue, that would help. The project link (if public), the relevant parts of your csproj file, the dependency name and from/to versions, etc.

rhyskoedijk commented 1 month ago

The stack traces match comments in these issues:

rhyskoedijk commented 1 month ago

If you haven't tried already, would be interesting to know if image tag 1.30.3-ci0008 or the vNext scripts work any better for you. e.g.

- task: dependabot@1
  inputs:
    dockerImageTag: '1.30.3-ci0008'
    useUpdateScriptvNext: true
MarkTallentire commented 1 month ago

Running on the new image now and will report back but it does seem to have gotten further already. Will try and provide a csproj if it fails but unfortunately our repo is private.

MarkTallentire commented 1 month ago

Okay so it doesnt hard fail anymore but the logs still show a failiure

2024/07/31 08:47:30 INFO <job_1722414843> Updating dotnet-ef from 7.0.8 to 8.0.7
running NuGet updater:
/opt/nuget/NuGetUpdater/NuGetUpdater.Cli update --repo-root /home/dependabot/dependabot-updater/job/1722414843/repo/existec/Hazcheck\%20Detect/_git/Hazcheck\%20Detect --solution-or-project /home/dependabot/dependabot-updater/job/1722414843/repo/existec/Hazcheck\%20Detect/_git/Hazcheck\%20Detect/src/CaseManagement/Common/Common.csproj --dependency dotnet-ef --new-version 8.0.7 --previous-version 7.0.8 --result-output-path /tmp/update-result.json --verbose
  Updating [src/.config/dotnet-tools.json] file.
    Saved [src/.config/dotnet-tools.json].
  No global.json file found.
Running for project file [src/CaseManagement/Common/Common.csproj]
Updating project [/home/dependabot/dependabot-updater/job/1722414843/repo/existec/Hazcheck%20Detect/_git/Hazcheck%20Detect/src/CaseManagement/Common/Common.csproj]
  Running for SDK-style project
    Package [dotnet-ef] Does not exist as a dependency in [/home/dependabot/dependabot-updater/job/1722414843/repo/existec/Hazcheck%20Detect/_git/Hazcheck%20Detect/src/CaseManagement/Common/Common.csproj].
Update complete.
  Writing update result to [/tmp/update-result.json].
2024/07/31 08:47:33 INFO <job_1722414843> update result: {
  "ErrorType": null,
  "ErrorDetails": null
}
2024/07/31 08:47:33 ERROR <job_1722414843> Error processing dotnet-ef (Dependabot::DependabotError)
2024/07/31 08:47:33 ERROR <job_1722414843> FileUpdater failed
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/dependency_change_builder.rb:69:in `run'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation_2_7.rb:59:in `bind_call'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation_2_7.rb:59:in `block in create_validator_method_fast0'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/dependency_change_builder.rb:42:in `create_from'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation.rb:167:in `bind_call'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation.rb:167:in `validate_call_skip_block_type'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation.rb:109:in `block in create_validator_slow_skip_block_type'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:136:in `check_and_create_pull_request'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:64:in `check_and_create_pr_with_error_handling'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `block in perform'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `each'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `perform'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:45:in `run'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/tinglesoftware/dependabot/commands/update_all_dependencies_synchronous_command.rb:161:in `run_updates_for'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/tinglesoftware/dependabot/commands/update_all_dependencies_synchronous_command.rb:145:in `update_all_dependencies'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/tinglesoftware/dependabot/commands/update_all_dependencies_synchronous_command.rb:54:in `perform_job'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/base_command.rb:37:in `run'
2024/07/31 08:47:33 ERROR <job_1722414843> bin/update_script_vnext.rb:26:in `<main>'
2024/07/31 08:47:33 INFO <job_1722414843> Finished job processing
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `block in perform'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `each'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `perform'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:45:in `run'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/tinglesoftware/dependabot/commands/update_all_dependencies_synchronous_command.rb:161:in `run_updates_for'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/tinglesoftware/dependabot/commands/update_all_dependencies_synchronous_command.rb:145:in `update_all_dependencies'
2024/07/31 08:47:33 ERROR <job_1722414843> /home/dependabot/dependabot-updater/lib/tinglesoftware/dependabot/commands/update_all_dependencies_synchronous_command.rb:54:in `perform_job'
+-------------------------------+
| Dependencies failed to update |
+---------------+---------------+
| dotnet-ef     | unknown_error |
+---------------+---------------+

It doesn't specifically say what file is failing however, the only reference to dotnet-ef i can find in our project is dotnet-tools.json as mentioned in a previous comment by @rhyskoedijk contents are

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-ef": {
      "version": "7.0.8",
      "commands": [
        "dotnet-ef"
      ]
    }
  }
}
rhyskoedijk commented 1 month ago

It doesn't specifically say what file is failing however, the only reference to dotnet-ef i can find in our project is dotnet-tools.json

@MarkTallentire does your dotnet-tool.json have any white-space lines? like an empty line at top or bottom of the file? If so, does removing all empty lines fix the problem?

Rutix commented 1 month ago

If you haven't tried already, would be interesting to know if image tag 1.30.3-ci0008 or the vNext scripts work any better for you. e.g.

- task: dependabot@1
  inputs:
    dockerImageTag: '1.30.3-ci0008'
    useUpdateScriptvNext: true

It doesn't seem to fail in the pipeline but the log seems littered with errors and ends with: Dependabot encountered '8' error(s) during execution, please check the logs for more details. +--------------------------------------------------------------+ | Dependencies failed to update | +----------------------------------------------+---------------+ | MediatR | unknown_error | | Microsoft.Azure.AppConfiguration.AspNetCore | unknown_error | | Microsoft.Identity.Web | unknown_error | | Microsoft.FeatureManagement.AspNetCore | unknown_error | | .ServiceBus | unknown_error | | SonarAnalyzer.CSharp | unknown_error | | | unknown_error | | | unknown_error | +----------------------------------------------+---------------+

I can share the log but rather not do it on the public thread here to avoid leaking private names :)

rhyskoedijk commented 1 month ago

@Rutix can you confirm if you are using a dotnet-tools.json anywhere in the project. If so, does it contain any white-space/empty lines?

Rutix commented 1 month ago

@Rutix can you confirm if you are using a dotnet-tools.json anywhere in the project. If so, does it contain any white-space/empty lines?

I searched all our repos and we don't have that file. I see a lot of

running NuGet discovery:
/opt/nuget/NuGetUpdater/NuGetUpdater.Cli discover --repo-root /home/dependabot/dependabot-updater/job/1722431973/repo/omniplan/PersonalFinancePlatform/_git/Omniplan.FeatureFlagsApi --workspace /src --output /tmp/.dependabot/discovery.1.json --verbose
Discovering build files in workspace [/home/dependabot/dependabot-updater/job/1722431973/repo/omniplan/PersonalFinancePlatform/_git/Omniplan.FeatureFlagsApi/src].
  No dotnet-tools.json file found.
  No global.json file found.
  Discovering projects beneath [src].
  No packages.config file found.
dotnet build in GetAllPackageDependenciesAsync failed. STDOUT:   Determining projects to restore...
/usr/local/dotnet/current/sdk/8.0.300/NuGet.targets(694,5): error : Value cannot be null or empty string. (Parameter 'username') [/tmp/package-dependency-resolution_I3BVWi/Project.csproj]

Build FAILED.

/usr/local/dotnet/current/sdk/8.0.300/NuGet.targets(694,5): error : Value cannot be null or empty string. (Parameter 'username') [/tmp/package-dependency-resolution_I3BVWi/Project.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.53

 STDERR: 

  No packages.config file found.
dotnet build in GetAllPackageDependenciesAsync failed. STDOUT:   Determining projects to restore...
/usr/local/dotnet/current/sdk/8.0.300/NuGet.targets(694,5): error : Value cannot be null or empty string. (Parameter 'username') [/tmp/package-dependency-resolution_cuo6WT/Project.csproj]

Build FAILED.

/usr/local/dotnet/current/sdk/8.0.300/NuGet.targets(694,5): error : Value cannot be null or empty string. (Parameter 'username') [/tmp/package-dependency-resolution_cuo6WT/Project.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.57

 STDERR: 

  Central Package Management is not enabled.

and

2024/07/31 13:20:18 INFO <job_1722431973> Updating Microsoft.FeatureManagement.AspNetCore from 3.4.0 to 3.5.0
running NuGet updater:
/opt/nuget/NuGetUpdater/NuGetUpdater.Cli update --repo-root /home/dependabot/dependabot-updater/job/1722431973/repo/omniplan/PersonalFinancePlatform/_git/Omniplan.FeatureFlagsApi --solution-or-project /home/dependabot/dependabot-updater/job/1722431973/repo/omniplan/PersonalFinancePlatform/_git/Omniplan.FeatureFlagsApi/src/Omniplan.FeatureFlagsApi/Omniplan.FeatureFlagsApi.csproj --dependency Microsoft.FeatureManagement.AspNetCore --new-version 3.5.0 --previous-version 3.4.0 --result-output-path /tmp/update-result.json --verbose
  No dotnet-tools.json file found.
  No global.json file found.
Running for project file [src/Omniplan.FeatureFlagsApi/Omniplan.FeatureFlagsApi.csproj]
Updating project [/home/dependabot/dependabot-updater/job/1722431973/repo/omniplan/PersonalFinancePlatform/_git/Omniplan.FeatureFlagsApi/src/Omniplan.FeatureFlagsApi/Omniplan.FeatureFlagsApi.csproj]
  Running for SDK-style project
dotnet build in GetAllPackageDependenciesAsync failed. STDOUT:   Determining projects to restore...
/usr/local/dotnet/current/sdk/8.0.300/NuGet.targets(694,5): error : Value cannot be null or empty string. (Parameter 'username') [/tmp/package-dependency-resolution_NDzdij/Project.csproj]

Build FAILED.

/usr/local/dotnet/current/sdk/8.0.300/NuGet.targets(694,5): error : Value cannot be null or empty string. (Parameter 'username') [/tmp/package-dependency-resolution_NDzdij/Project.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.54

 STDERR: 

    Package [Microsoft.FeatureManagement.AspNetCore] Does not exist as a dependency in [/home/dependabot/dependabot-updater/job/1722431973/repo/omniplan/PersonalFinancePlatform/_git/Omniplan.FeatureFlagsApi/src/Omniplan.FeatureFlagsApi/Omniplan.FeatureFlagsApi.csproj].
Update complete.
  Writing update result to [/tmp/update-result.json].
2024/07/31 13:20:19 INFO <job_1722431973> update result: {
  "ErrorType": null,
  "ErrorDetails": null
}
2024/07/31 13:20:19 ERROR <job_1722431973> Error processing Microsoft.FeatureManagement.AspNetCore (Dependabot::DependabotError)
2024/07/31 13:20:19 ERROR <job_1722431973> FileUpdater failed
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/lib/dependabot/dependency_change_builder.rb:69:in `run'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation_2_7.rb:59:in `bind_call'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation_2_7.rb:59:in `block in create_validator_method_fast0'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/lib/dependabot/dependency_change_builder.rb:42:in `create_from'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation.rb:167:in `bind_call'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation.rb:167:in `validate_call_skip_block_type'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/sorbet-runtime-0.5.11495/lib/types/private/methods/call_validation.rb:109:in `block in create_validator_slow_skip_block_type'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:136:in `check_and_create_pull_request'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:64:in `check_and_create_pr_with_error_handling'
2024/07/31 13:20:19 ERROR <job_1722431973> /home/dependabot/dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:39:in `block in perform'
MarkTallentire commented 1 month ago

It doesn't specifically say what file is failing however, the only reference to dotnet-ef i can find in our project is dotnet-tools.json

@MarkTallentire does your dotnet-tool.json have any white-space lines? like an empty line at top or bottom of the file? If so, does removing all empty lines fix the problem?

No whitespace anywhere (note the line numbers on screenshot)

image
GunnyDev commented 2 weeks ago

We are also seeing this issue

image

markwemekamp commented 2 weeks ago

I was encountering the nil into T.must error as well as the error @GunnyDev mentions.

It might be related to passing the access token.

I fixed both by prefixing the acces token in .azuredevops/dependabot.yml with PAT as described in the README file.

I changed the following (which worked fine up till v1.24)

registries:
  feed-name:
    type: nuget-feed
    url: <url>
    token: ":${{SYSTEM_ACCESSTOKEN}}"`

to

registries:
  feed-name:
    type: nuget-feed
    url: <url>
    token: "PAT:${{SYSTEM_ACCESSTOKEN}}"`
rhyskoedijk commented 2 weeks ago

It might be related to passing the access token. I fixed both by prefixing the acces token in .azuredevops/dependabot.yml with PAT as described in the README file.

Good spot @markwemekamp, thanks. I've put up https://github.com/tinglesoftware/dependabot-azure-devops/pull/1292 to ensure ":${{PAT}}" and "PAT:${{PAT}}" both work going forward, for safety.

Rutix commented 2 weeks ago

It might be related to passing the access token. I fixed both by prefixing the acces token in .azuredevops/dependabot.yml with PAT as described in the README file.

Good spot @markwemekamp, thanks. I've put up #1292 to ensure ":${{PAT}}" and "PAT:${{PAT}}" both work going forward, for safety.

Great catch @markwemekamp and @rhyskoedijk ! I am running 1.31.1-ci.1 now with useUpdateScriptvNext set to true. I noticed that it's way slower than before. (And with slower I mean when we ran 1.24.0) Is this to be expected? We have a pipeline that does multiple repo; it took a couple of minutes at best in the past. Now it's close to 10-15 and the pipeline times out because we are going over 60 minutes.

rhyskoedijk commented 2 weeks ago

I noticed that it's way slower than before. (And with slower I mean when we ran 1.24.0) Is this to be expected?

Yes, unfortunately. The inner workings of the dependabot-core updater were changed around the release of 1.25.0 to move update logic out of Ruby and in to native tools (e.g. NuGet.exe, NPM, etc). This allows updates to be more accurate, but also increases overall runtime.

There are multiple issues raised in the dependabot-core project around timeouts and increased runtime, so I'm sure the team is aware of this already. Unfortunately for now, this is the new normal and it applies to both the default update script and the vNext update script.

It's not an ideal solution, but you can extend the default timeout beyond 60 minutes. See: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#timeouts

      jobs:
      - job: dependabot
        displayName: Dependabot
        timeoutInMinutes: 180 # max 3 hours
        steps:
           # ...snip...
Rutix commented 2 weeks ago

I noticed that it's way slower than before. (And with slower I mean when we ran 1.24.0) Is this to be expected?

Yes, unfortunately. The inner workings of the dependabot-core updater were changed around the release of 1.25.0 to move update logic out of Ruby and in to native tools (e.g. NuGet.exe, NPM, etc). This allows updates to be more accurate, but also increases overall runtime.

There are multiple issues raised in the dependabot-core project around timeouts and increased runtime, so I'm sure the team is aware of this already. Unfortunately for now, this is the new normal and it applies to both the default update script and the vNext update script.

It's not an ideal solution, but you can extend the default timeout beyond 60 minutes. See: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#timeouts

      jobs:
      - job: dependabot
        displayName: Dependabot
        timeoutInMinutes: 180 # max 3 hours
        steps:
           # ...snip...

Ahh that sucks because it was super fast in the past :). I will try to bump the timeout and else I will have to see if I can cut it up in multiple jobs and run those parallel to counter the overhead of downloading the container.

mburumaxwell commented 2 weeks ago

Another alternative is to use the server versions that you don't have to block your pipeline agents with a lot of other things. Though we are yet to update it to support directories and groups.

Rutix commented 2 weeks ago

Another alternative is to use the server versions that you don't have to block your pipeline agents with a lot of other things. Though we are yet to update it to support directories and groups.

There is a server version?

mburumaxwell commented 2 weeks ago

Server version docs at: https://github.com/tinglesoftware/dependabot-azure-devops/blob/main/docs/server.md