Skip to content

Allow test-dependencies between arch/platform in GenerateBuildMatrix command #1177

@lbussell

Description

@lbussell

https://github.com/dotnet/dotnet-docker/blob/f270639b443e85fe6db63fe598a4ab1eec24ff33/manifest.json#L948-L957

Currently, we offer arm32v7 native AOT images for runtime-deps but not for sdk. This means that we need to use the arm64 AOT SDK to test the arm32 AOT deps image.

When generating the PlatformVersionedOs build matrix (for tests), ImageBuilder currently groups legs by architecture/platform before integral test dependencies. We want to build and test arm32 AOT images in the same leg as arm64 AOT SDK images for the PlatformVersionedOS build matrix type. The GenerateBuildMatrix command needs changes to allow custom build leg dependencies to transcend architecture like that.

The code in question is here:

// Pass 1: Get the set of subgraphs of all platforms grouped by their FROM dependencies as well as any
// integral custom leg dependencies. We use all platforms as the set of platforms to walk the graph because
// there can be edge cases where Dockerfiles share a parent Dockerfile that was not built (pulled from
// cache). The parent Dockerfile doesn't need to be tested but it still needs to be included in the graph
// generation, otherwise the two sibling Dockerfiles would end up in separate build legs. We filter the set
// of platforms in Pass 2 to only test what was already built.
IEnumerable<IEnumerable<PlatformInfo>> subgraphs = platformGrouping
.GetCompleteSubgraphs(platform =>
Manifest.GetParents(platform, allPlatforms)
.Union(GetCustomLegGroupPlatforms(platform, CustomBuildLegDependencyType.Integral)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions