Skip to content

Dependency graph submission failed #48347

@CruvixDev

Description

@CruvixDev

Describe the bug
Dependency graph submission failed

Environment

  • OS: [Windows]
  • Compiler: Visual Studio 17 2022

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install --dry-run --debug
  2. Dependency graph submission failed
    Repro code when

Hello,

I am encountering an issue while using the VCPKG_FEATURE_FLAGS flag in a basic CMake project that only uses the fmt library. My goal is to populate the GitHub dependency graph, following the official documentation: GitHub Integration with vcpkg.

Here is the GitHub Actions workflow I am using:

name: C/C++ CI

on:
  push:
    branches: [ main ]
  workflow_dispatch:

permissions:
  contents: write

env:
  GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
  VCPKG_FEATURE_FLAGS: dependencygraph

jobs:
  build:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v4
      with:
        submodules: 'recursive'

    - name: bootstrap vcpkg
      run: ${{ github.workspace }}/submodules/vcpkg//bootstrap-vcpkg.bat
        

    # This will execute a dry-run, meaning that libraries will not be built and
    # installed, but they will still be reported to the GitHub dependency graph.
    # This step assumes `vcpkg` has been bootstrapped (run `./vcpkg/bootstrap-vcpkg`)
    - name: Run vcpkg
      run: ${{ github.workspace }}/submodules/vcpkg/vcpkg install --dry-run --debug

When the workflow runs, no errors are reported, but the logs show the message: "Dependency graph submission failed" (logs are attached to this issue).

From what I understand, curl is used to submit a JSON-formatted string to the GitHub submission API. Here is an example of the JSON structure generated by vcpkg:

{
  "job": {
    "id": "19406372881",
    "correlator": "C/C++ CI-19406372881"
  },
  "version": 0,
  "sha": "d353033e526171a46ccf51f174c308935bb5f630",
  "ref": "refs/heads/main",
  "scanned": "2025-11-16T13:31:12Z",
  "detector": {
    "name": "vcpkg",
    "url": "https://github.com/microsoft/vcpkg",
    "version": "1.0.0"
  },
  "manifests": {
    "vcpkg.json": {
      "name": "vcpkg.json",
      "resolved": {
        "pkg:github/vcpkg/vcpkg-cmake-config:x64-windows@2024-05-23": {
          "package_url": "pkg:github/vcpkg/vcpkg-cmake-config:x64-windows@2024-05-23",
          "relationship": "direct",
          "dependencies": []
        },
        "pkg:github/vcpkg/vcpkg-cmake:x64-windows@2024-04-23": {
          "package_url": "pkg:github/vcpkg/vcpkg-cmake:x64-windows@2024-04-23",
          "relationship": "direct",
          "dependencies": []
        },
        "pkg:github/vcpkg/fmt:[email protected]": {
          "package_url": "pkg:github/vcpkg/fmt:[email protected]",
          "relationship": "direct",
          "dependencies": [
            "pkg:github/vcpkg/vcpkg-cmake:x64-windows@2024-04-23",
            "pkg:github/vcpkg/vcpkg-cmake-config:x64-windows@2024-05-23"
          ]
        }
      }
    }
  }
}

The URL used by vcpkg is: https://github.com/api/v3/repos/CruvixDev/vcpkg_test/dependency-graph/snapshots. I tried submitting the request manually using the corrected URL (https://api.github.com/repos/CruvixDev/vcpkg_test/dependency-graph/snapshots) and the same JSON string, with the following command:

curl -v -X POST \
      -H "Authorization: Bearer <my token>" \
      -H "Accept: application/vnd.github+json" \
      -H "X-GitHub-Api-Version: 2022-11-28" \
      https://api.github.com/repos/CruvixDev/vcpkg_test/dependency-graph/snapshots \
      -d '{"job":{"id":"123","correlator":"test"},"version":0,"sha":"d353033e526171a46ccf51f174c308935bb5f630","ref":"refs/heads/main","scanned":"2025-11-16T13:31:12Z","detector":{"name":"vcpkg","url":"https://github.com/microsoft/vcpkg","version":"1.0.0"},"manifests":{"vcpkg.json":{"name":"vcpkg.json","resolved":{"pkg:github/vcpkg/fmt:[email protected]":{"package_url":"pkg:github/vcpkg/fmt:[email protected]","relationship":"direct","dependencies":[]}}}}'

This command works as expected and produces the correct result, as shown below:

Image

I created the project following this official tutorial: Get started with vcpkg in VS Code.
I am wondering if this issue is due to an error on my part or if it is a bug related to the URL used by vcpkg for submitting data to the GitHub API.

Have you encountered this issue before, or do you have any suggestions on how to resolve it?
Thank you in advance for your help.

Best regards,

0_build.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions