Skip to content

SAIFTRBL0024 ยท permalink

Dependabot config fails with registries have not been referenced by any update

Remove each unused registry from the root registries: block, or reference it from the registries: list of the updates entry that needs it. The dependabot@2 task treats an unreferenced registry as a hard error.


๐Ÿšจ Symptom

The Dependabot pipeline fails during configuration validation, before the updater runs:

##[error]Registries: 'saif-npm' have not been referenced by any update

The registry name in the message matches an entry in the root registries: block of .github/dependabot.yml.


๐Ÿ“Œ Applies to

Aspect Value
Component Azure DevOps dependabot@2 task (Paklo), .github/dependabot.yml
Observed on dependabot@2 2.68.7
Not for The reverse error, where an updates entry references a registry that the root block does not define

Prerequisites and safety

  • Edit access to the repository's .github/dependabot.yml.
  • Decide whether the repository needs the registry. A repository with no package.json needs no npm registry, for example.

โœ… Fix

Pick the option that matches the repository:

  • The repository does not use the registry. Delete it from the root registries: block:

    registries:
      saif-nuget:
        type: nuget-feed
        url: https://pkgs.dev.azure.com/SAIFCorporation/_packaging/SAIFCorporation/nuget/v3/index.json
        token: PAT:${{ AZURE_DEVOPS_EXT_PAT }}
      # saif-npm removed: no updates entry uses it
    
  • The repository uses the registry. Add an updates entry for that ecosystem and list the registry:

    updates:
      - package-ecosystem: "npm"
        directory: "/"
        schedule:
          interval: 'cron'
          cronjob: '0 11 * * *'
        registries:
          - saif-npm
    

Commit the change and run the Dependabot pipeline.


๐Ÿ”ฌ Verify

The run passes configuration validation and starts the updater. In the tested repository, the run moved past this error and then stopped at a different one, so expect to fix errors in sequence.


๐Ÿง  Cause

The task cross-checks registries against updates entries in both directions. A root registry that no entry lists fails with have not been referenced by any update, and a referenced registry that the root block lacks fails with have not been configured in the root of dependabot.yml. The tests for both checks live in packages/core/src/dependabot/config.test.ts in mburumaxwell/paklo.