dependabot / dependabot-core

πŸ€– Dependabot's core logic for creating update PRs.
https://docs.github.com/en/code-security/dependabot
MIT License
4.74k stars 1.03k forks source link

Dependabot, Multi-repo, AzureDevOps #10289

Open CodeMalasartes opened 4 months ago

CodeMalasartes commented 4 months ago

Is there an existing issue for this?

Package ecosystem

AzureDevOps

Package manager version

Terraform

Language version

Terraform

Manifest location and content before the Dependabot update

I’m using Dependabot to manage Terraform dependencies in my Azure DevOps pipeline, but I’m encountering the "Requirements to unlock update_not_possible" message for all my Terraform providers. Despite trying various configurations, Dependabot does not generate pull requests to update the dependencies.

dependabot.yml content

version: 2 updates:

Updated dependency

Found 7 dependency file(s) at commit d98b4bc2a4b172fd84a6770c6d6cd5e36dd7ac32

What you expected to see, versus what you actually saw

I was expecting a creation of a Pull Request for the updates of the dependencies

Native package manager behavior

No response

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

No response

Smallest manifest that reproduces the issue

No response

rhyskoedijk commented 4 months ago

Hey @CodeMalasartes, looking at your log output, you're using the Dependabot Azure DevOps Extension. There are some known issues with the version of the update script you are using and it is possible that this issue is caused by the Azure DevOps implementation, not dependabot-core itself. Are you able to see if any of the below helps fix your issue:

  1. Use the newer "vNext" update script in the DevOps extension; This is based on newer updater code from dependabot-core's updater project and should be more accurate when compared to the update script shown in your logs. You can enable the vNext script by ticking the "Use latest update script (vNext)" checkbox under "Advanced" in the task options, or using useUpdateScriptvNext: true if using YML pipelines.

  2. Add dependency-type: all to your allowed dependencies in dependabot.yml. e.g.

    allow:
      - dependency-name: "akeyless-community/akeyless"
        dependency-type: all
      - dependency-name: "azure/azapi"
        dependency-type: all
      - dependency-name: "hashicorp/azurerm"
        dependency-type: all
      - dependency-name: "hashicorp/tls"
        dependency-type: all
      - dependency-name: "tchupp/env"
        dependency-type: all

    This shouldn't be required as "all" is the default based on official examples, but it is possible the Azure DevOps extension is not defaulting this to "all" so explicitly setting might help.

  3. When using Terrform, the versioning-strategy option is not supported. I'm not sure if this would be causing any issues