Skip to content

Cache for projects using microsoft/vcpkg broken by cache v2 API #2032

Closed
@ADKaster

Description

@ADKaster

As noted in microsoft/vcpkg#45073 (comment), The vcpkg tool was using the cache v1 endpoint manually to upload binary caches of built C and C++ packages.

In vcpkg-tool, this is managed by two classes, GHABinaryProvider and GHABinaryPushProvider. https://github.com/microsoft/vcpkg-tool/blob/113b38ab37819b673e2a773ac00f9c9c9d48407f/src/vcpkg/binarycaching.cpp#L817 and https://github.com/microsoft/vcpkg-tool/blob/113b38ab37819b673e2a773ac00f9c9c9d48407f/src/vcpkg/binarycaching.cpp#L902 , respectively.

I'm not sure how this dependency was missed for the deprecation of the old cache API. The Microsoft docs still mention the old, broken environment variables: https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache#1---export-required-github-actions-environment-variables

Looking around in https://github.com/actions/toolkit/tree/main/packages/cache/src, it seems like the new API is based on protobufs, rather than a REST API? Either way.

Please provide guidance on how to update vcpkg-tool's binary cache API usage to the new v2. The 'migration guide' mentioned in the discussions was only about actual actions, not native binaries that were piggy-backing off the actions cache API directly. This feature not working has significant impact on C and C++ projects using GitHub Actions and vcpkg, going from comments in the vcpkg issue. The impact can be as severe as pushing individual PR CI times from 10 minutes to 3 hours.

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