Skip to content

Use test dependencies for test matrix#3421

Merged
mthalman merged 1 commit intodotnet:mainfrom
mthalman:test-dependencies
Jan 20, 2022
Merged

Use test dependencies for test matrix#3421
mthalman merged 1 commit intodotnet:mainfrom
mthalman:test-dependencies

Conversation

@mthalman
Copy link
Member

The changes from dotnet/docker-tools#941 exposed an issue in the test matrix generation related to .NET Core 3.1 sdk images for Debian/Ubuntu. Those Dockerfiles are based on buildpack-deps and so they don't have a direct dependency on the runtime-related Dockerfiles. However, for testing purposes we want them tested together. To accomplish this, the manifest defines a customBuildLegGroup named test-dependencies that causes the matrix generation to integrate these platforms for testing:

dotnet-docker/manifest.json

Lines 3151 to 3159 in 69758fd

"customBuildLegGroups": [
{
"name": "test-dependencies",
"type": "Integral",
"dependencies": [
"$(Repo:aspnet):3.1-buster-slim"
]
}
]

However, in the test stage of the build, this test-dependencies customBuildLegGroup was not enabled. This led the matrix generation to include two separate test legs: one for the runtime-related Dockerfiles and one for the sdk Dockerfile. The test legs had the same name. Because of the changes in dotnet/docker-tools#941, this is now causing an exception.

In reality, having the duplicate test legs names was not causing any tests from being excluded. We were still testing everything that should have been tested before. That's because the --path parameters of the test leg, which are different between the two test legs, aren't actually used by the test code; it's driven off the contents of the image info file that is passed as input. However, we still want to address the issue of duplicate leg names to ensure correctness.

I've fixed this by setting the testMatrixCustomBuildLegGroupArgs pipeline parameter so that test-dependencies is included.

@mthalman mthalman merged commit 41d0c1b into dotnet:main Jan 20, 2022
@mthalman mthalman deleted the test-dependencies branch January 20, 2022 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants