Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocument .NET Monitor 9 arch-specific tags #5948

Open
wants to merge 9 commits into
base: nightly
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ See the [documentation](https://go.microsoft.com/fwlink/?linkid=2158052) for how

Tags | Dockerfile | OS Version
-----------| -------------| -------------
9.0.0-rc.2-amd64, 9.0-amd64, 9.0.0-rc.2, 9.0, 9, latest | [Dockerfile](src/monitor/9.0/azurelinux-distroless/amd64/Dockerfile) | Azure Linux 3.0
9.0.0-rc.2, 9.0, 9, latest | [Dockerfile](src/monitor/9.0/azurelinux-distroless/amd64/Dockerfile) | Azure Linux 3.0
8.0.4-ubuntu-chiseled-amd64, 8.0-ubuntu-chiseled-amd64, 8.0.4-ubuntu-chiseled, 8.0-ubuntu-chiseled, 8.0.4, 8.0 | [Dockerfile](src/monitor/8.0/ubuntu-chiseled/amd64/Dockerfile) | Ubuntu 22.04
8.0.4-cbl-mariner-distroless-amd64, 8.0-cbl-mariner-distroless-amd64, 8.0.4-cbl-mariner-distroless, 8.0-cbl-mariner-distroless | [Dockerfile](src/monitor/8.0/cbl-mariner-distroless/amd64/Dockerfile) | CBL-Mariner 2.0
6.3.8-alpine-amd64, 6.3-alpine-amd64, 6-alpine-amd64, 6.3.8-alpine, 6.3-alpine, 6-alpine, 6.3.8, 6.3, 6 | [Dockerfile](src/monitor/6.3/alpine/amd64/Dockerfile) | Alpine 3.20
Expand All @@ -81,7 +81,7 @@ Tags | Dockerfile | OS Version

Tags | Dockerfile | OS Version
-----------| -------------| -------------
9.0.0-rc.2-arm64v8, 9.0-arm64v8, 9.0.0-rc.2, 9.0, 9, latest | [Dockerfile](src/monitor/9.0/azurelinux-distroless/arm64v8/Dockerfile) | Azure Linux 3.0
9.0.0-rc.2, 9.0, 9, latest | [Dockerfile](src/monitor/9.0/azurelinux-distroless/arm64v8/Dockerfile) | Azure Linux 3.0
8.0.4-ubuntu-chiseled-arm64v8, 8.0-ubuntu-chiseled-arm64v8, 8.0.4-ubuntu-chiseled, 8.0-ubuntu-chiseled, 8.0.4, 8.0 | [Dockerfile](src/monitor/8.0/ubuntu-chiseled/arm64v8/Dockerfile) | Ubuntu 22.04
8.0.4-cbl-mariner-distroless-arm64v8, 8.0-cbl-mariner-distroless-arm64v8, 8.0.4-cbl-mariner-distroless, 8.0-cbl-mariner-distroless | [Dockerfile](src/monitor/8.0/cbl-mariner-distroless/arm64v8/Dockerfile) | CBL-Mariner 2.0
6.3.8-alpine-arm64v8, 6.3-alpine-arm64v8, 6-alpine-arm64v8, 6.3.8-alpine, 6.3-alpine, 6-alpine, 6.3.8, 6.3, 6 | [Dockerfile](src/monitor/6.3/alpine/arm64v8/Dockerfile) | Alpine 3.20
Expand Down
4 changes: 2 additions & 2 deletions eng/mcr-tags-metadata-templates/monitor-tags.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$(McrTagsYmlRepo:monitor)
$(McrTagsYmlTagGroup:9.0-amd64)
$(McrTagsYmlTagGroup:9.0-arm64v8)
$(McrTagsYmlTagGroup:9.0)
$(McrTagsYmlTagGroup:9)
$(McrTagsYmlTagGroup:8.1-preview-ubuntu-chiseled-amd64)
customSubTableTitle: .NET Monitor Preview Tags
$(McrTagsYmlTagGroup:8.1-preview-ubuntu-chiseled-arm64v8)
Expand Down
10 changes: 2 additions & 8 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9418,10 +9418,7 @@
"dockerfileTemplate": "eng/dockerfile-templates/monitor/Dockerfile.linux.extensions",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
"tags": {
"$(monitor|9.0|fixed-tag)-amd64": {},
"$(monitor|9.0|minor-tag)-amd64": {}
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
}
"tags": {}
},
{
"architecture": "arm64",
Expand All @@ -9432,10 +9429,7 @@
"dockerfileTemplate": "eng/dockerfile-templates/monitor/Dockerfile.linux.extensions",
"os": "linux",
"osVersion": "azurelinux3.0-distroless",
"tags": {
"$(monitor|9.0|fixed-tag)-arm64v8": {},
"$(monitor|9.0|minor-tag)-arm64v8": {}
},
"tags": {},
"variant": "v8"
}
]
Expand Down
36 changes: 22 additions & 14 deletions tests/Microsoft.DotNet.Docker.Tests/StaticTagTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
if (ApplianceRepos.Any(repo.Name.Contains))
{
// Only appliance repos have major version tags
// Only appliance repos have floating distro tags (<cref="IsApplianceVersionUsingOldSchema"/>)
// Only appliance repos have floating distro tags (<cref="IsApplianceVersionWithDistroTags"/>)
testObjects.AddRange(new[]
{
GetTagTestInput(
Expand All @@ -283,7 +283,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.MajorMinorPatch,
checkOs: true,
checkArchitecture: true,
skipDockerfileOn: IsApplianceVersionUsingNewSchema
skipDockerfileOn: info => IsApplianceVersionWithoutDistroTags(info) || IsApplianceVersionWithoutArchTags(info)
), // <Major.Minor.Patch>-<os>-<architecture>

GetTagTestInput(
Expand All @@ -292,7 +292,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.MajorMinorPatch,
checkOs: true,
checkArchitecture: false,
skipDockerfileOn: IsApplianceVersionUsingNewSchema
skipDockerfileOn: IsApplianceVersionWithoutDistroTags
), // <Major.Minor.Patch>-<os>

GetTagTestInput(
Expand All @@ -301,7 +301,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.MajorMinorPatch,
checkOs: false,
checkArchitecture: true,
skipDockerfileOn: IsApplianceVersionUsingOldSchema
skipDockerfileOn: info => IsApplianceVersionWithDistroTags(info) || IsApplianceVersionWithoutArchTags(info)
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
), // <Major.Minor.Patch>-<architecture>

GetTagTestInput(
Expand All @@ -310,7 +310,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.MajorMinor,
checkOs: true,
checkArchitecture: true,
skipDockerfileOn: IsApplianceVersionUsingNewSchema
skipDockerfileOn: info => IsApplianceVersionWithoutDistroTags(info) || IsApplianceVersionWithoutArchTags(info)
), // <Major.Minor>-<os>-<architecture>

GetTagTestInput(
Expand All @@ -319,7 +319,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.MajorMinor,
checkOs: true,
checkArchitecture: false,
skipDockerfileOn: IsApplianceVersionUsingNewSchema
skipDockerfileOn: IsApplianceVersionWithoutDistroTags
), // <Major.Minor>-<os>

GetTagTestInput(
Expand All @@ -328,7 +328,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.MajorMinor,
checkOs: false,
checkArchitecture: true,
skipDockerfileOn: IsApplianceVersionUsingOldSchema
skipDockerfileOn: info => IsApplianceVersionWithDistroTags(info) || IsApplianceVersionWithoutArchTags(info)
), // <Major.Minor>-<architecture>

GetTagTestInput(
Expand All @@ -337,7 +337,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.Major,
checkOs: true,
checkArchitecture: true,
skipDockerfileOn: IsApplianceVersionUsingNewSchema
skipDockerfileOn: info => IsApplianceVersionWithoutDistroTags(info) || IsApplianceVersionWithoutArchTags(info)
), // <Major>-<os>-<architecture>

GetTagTestInput(
Expand All @@ -346,7 +346,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.Major,
checkOs: true,
checkArchitecture: false,
skipDockerfileOn: IsApplianceVersionUsingNewSchema
skipDockerfileOn: IsApplianceVersionWithoutDistroTags
) // <Major>-<os>
});

Expand All @@ -359,7 +359,7 @@ private static IEnumerable<object[]> GetTagTestObjects(TestType testType)
VersionType.Major,
checkOs: false,
checkArchitecture: true,
skipDockerfileOn: IsApplianceVersionUsingOldSchema
skipDockerfileOn: IsApplianceVersionWithDistroTags
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
)); // <Major>-<architecture>
}
}
Expand Down Expand Up @@ -533,16 +533,24 @@ private static object[] GetTagTestInput(
private static bool IsWindows(ManifestHelper.DockerfileInfo dockerfileInfo) =>
dockerfileInfo.Os.Contains("windowsservercore") || dockerfileInfo.Os.Contains("nanoserver");

// All appliance-style images do not have arch-specific tags starting with version 9
private static bool IsApplianceVersionWithArchTags(ManifestHelper.DockerfileInfo dockerfileInfo) =>
(dockerfileInfo.Repo.Contains("monitor") && GetVersion(dockerfileInfo.MajorMinor).Major <= 8) ||
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
(dockerfileInfo.Repo.Contains("aspire") && GetVersion(dockerfileInfo.MajorMinor).Major <= 8);

private static bool IsApplianceVersionWithoutArchTags(ManifestHelper.DockerfileInfo dockerfileInfo) =>
!IsApplianceVersionWithArchTags(dockerfileInfo);

// Certain versions of appliance repos use a new tag schema.
// This new schema excludes the OS from all tags.
// The aspire-dashboard repo uses this schema for all versions.
// The monitor and monitor-base repos use this schema for versions 9 and above.
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
private static bool IsApplianceVersionUsingOldSchema(ManifestHelper.DockerfileInfo dockerfileInfo) =>
private static bool IsApplianceVersionWithDistroTags(ManifestHelper.DockerfileInfo dockerfileInfo) =>
dockerfileInfo.Repo.Contains("monitor") && GetVersion(dockerfileInfo.MajorMinor).Major <= 8;

// <cref="IsApplianceVersionUsingOldSchema"/>
private static bool IsApplianceVersionUsingNewSchema(ManifestHelper.DockerfileInfo dockerfileInfo) =>
!IsApplianceVersionUsingOldSchema(dockerfileInfo);
// <cref="IsApplianceVersionWithDistroTags"/>
private static bool IsApplianceVersionWithoutDistroTags(ManifestHelper.DockerfileInfo dockerfileInfo) =>
!IsApplianceVersionWithDistroTags(dockerfileInfo);

private static bool IsDotNet6(ManifestHelper.DockerfileInfo dockerfileInfo) =>
dockerfileInfo.MajorMinor.StartsWith("6");
Expand Down
4 changes: 1 addition & 3 deletions tests/performance/ImageSize.nightly.linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@
"src/monitor/8.1/ubuntu-chiseled/amd64": 127821834,
"src/monitor/8.1/ubuntu-chiseled/arm64v8": 134958622,
"src/monitor/8.1/cbl-mariner-distroless/amd64": 141200979,
"src/monitor/8.1/cbl-mariner-distroless/arm64v8": 148117492,
"src/monitor/9.0/azurelinux-distroless/amd64": 143287803,
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
"src/monitor/9.0/azurelinux-distroless/arm64v8": 149490964
"src/monitor/8.1/cbl-mariner-distroless/arm64v8": 148117492
},
"dotnet/nightly/monitor/base": {
"src/monitor-base/8.0/ubuntu-chiseled/amd64": 119965752,
Expand Down
Loading