Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181 stars 126 forks source link

As a package author, I should be able to GA release individual packages on vcpkg with confidence by having automated testing that detects potential build errors earlier based on package permutations #6069

Open ahsonkhan opened 1 month ago

ahsonkhan commented 1 month ago

The problem:

An example of the problem we experienced:

Where we are today:

Where we'd like to be:

P.S. This issue is related to the beta registry package testing, but different since it focuses on testing and shipping of individual packages as GA to the main vcpkg registry (and not about mixing packages of different dev stages).

cc @RickWinter, @ronniegeraghty, @danieljurek

danieljurek commented 1 month ago

In practice there are a couple of "core" packages (core, identity) and the tests we want to run are with vcpkg released GA versions and what's in source. This would be 4N complexity (excluding packages like those in storage that depend on storage-common).

If using the 4N approach, this could take the form of jobs which build a sample project with core and identity from current state of the repo and from vcpkg.

danieljurek commented 4 weeks ago

Spoke with @weshaggard. We agree that this pattern follows our min/max testing approach.

This can be accomplished by setting environment variables in the matrix. Either create a few (up to 4) new matrix entries or set these on existing matrix entries.

Probably something like:

CORE_VERSION IDENTITY_VERSION
source source
vcpkg vcpkg
source vcpkg
vcpkg source

You'd probably want safe defaults for these variables so that a customer install scenario does the right thing.

  1. Edit platform-matrix.json with the new environment variables
  2. Update build system to switch dependencies of core and identity depending on the values of these variables (probably with safe defaults)

The real test will be if this build catches the behavior that raised this issue initially.