Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/8.0.4xx' into merge/rele…
Browse files Browse the repository at this point in the history
…ase/8.0.3xx-to-release/8.0.4xx
  • Loading branch information
nagilson committed Oct 8, 2024
2 parents 6f76c65 + 12a8fab commit 36741a7
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 65 deletions.
48 changes: 24 additions & 24 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,48 +68,48 @@
<Sha>a69bbaaf5f8d7249b8cab7309e81ad2221ce396c</Sha>
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.8.401-beta.24421.7">
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.8.402-beta.24477.4">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>af2f522de602281d4ef5a7b71507c428e814c5c1</Sha>
<Sha>05af489c957d1846f60b2e6b40df3841c0f1cfa6</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="8.0.401-beta.24421.7">
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="8.0.402-beta.24477.4">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>af2f522de602281d4ef5a7b71507c428e814c5c1</Sha>
<Sha>05af489c957d1846f60b2e6b40df3841c0f1cfa6</Sha>
<SourceBuild RepoName="fsharp" ManagedOnly="true" />
</Dependency>
<Dependency Name="dotnet-format" Version="8.3.536002">
<Uri>https://github.com/dotnet/format</Uri>
<Sha>7bb270d0f3380ff4adcb5e917fb5a2111d50bbad</Sha>
<SourceBuild RepoName="format" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.CodeAnalysis" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.11.0-3.24460.3">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.11.0-3.24504.6">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5649376e0e5f5db3743a94a62b073f2cce4be5d9</Sha>
<Sha>5a06a4caf73c5b086776763ebbee36c9b51c515e</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="8.0.8-servicing.24369.8">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore</Uri>
Expand Down Expand Up @@ -289,18 +289,18 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore</Uri>
<Sha>954f61dd38b33caa2b736c73530bd5a294174437</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Razor.Tooling.Internal" Version="9.0.0-preview.24453.9">
<Dependency Name="Microsoft.CodeAnalysis.Razor.Tooling.Internal" Version="9.0.0-preview.24502.7">
<Uri>https://github.com/dotnet/razor</Uri>
<Sha>41acbdeb665c11bf26fea16b017ebf54e6a74e22</Sha>
<Sha>8b1b103ae8587094180fd43303622205c83e2f71</Sha>
<SourceBuild RepoName="razor" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal" Version="9.0.0-preview.24453.9">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal" Version="9.0.0-preview.24502.7">
<Uri>https://github.com/dotnet/razor</Uri>
<Sha>41acbdeb665c11bf26fea16b017ebf54e6a74e22</Sha>
<Sha>8b1b103ae8587094180fd43303622205c83e2f71</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.Razor.SourceGenerators.Transport" Version="9.0.0-preview.24453.9">
<Dependency Name="Microsoft.NET.Sdk.Razor.SourceGenerators.Transport" Version="9.0.0-preview.24502.7">
<Uri>https://github.com/dotnet/razor</Uri>
<Sha>41acbdeb665c11bf26fea16b017ebf54e6a74e22</Sha>
<Sha>8b1b103ae8587094180fd43303622205c83e2f71</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.8">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore</Uri>
Expand Down
12 changes: 6 additions & 6 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>
<!-- Repo Version Information -->
<PropertyGroup>
<VersionPrefix>8.0.403</VersionPrefix>
<VersionPrefix>8.0.404</VersionPrefix>
<WorkloadsFeatureBand>8.0.400</WorkloadsFeatureBand>
<!-- Enable to remove prerelease label. -->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
Expand All @@ -36,7 +36,7 @@
<SystemCollectionsImmutablePackageVersion>8.0.0</SystemCollectionsImmutablePackageVersion>
<SystemDiagnosticsFileVersionInfoVersion>4.0.0</SystemDiagnosticsFileVersionInfoVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
<MicrosoftDotNetSignToolVersion>8.0.0-beta.24461.2</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetSignToolVersion>8.0.0-beta.24504.2</MicrosoftDotNetSignToolVersion>
<MicrosoftWebXdtPackageVersion>7.0.0-preview.22423.2</MicrosoftWebXdtPackageVersion>
<SystemSecurityCryptographyProtectedDataPackageVersion>8.0.0</SystemSecurityCryptographyProtectedDataPackageVersion>
<SystemCollectionsSpecializedPackageVersion>4.3.0</SystemCollectionsSpecializedPackageVersion>
Expand Down Expand Up @@ -153,7 +153,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/Microsoft/visualfsharp -->
<MicrosoftFSharpCompilerPackageVersion>12.8.401-beta.24421.7</MicrosoftFSharpCompilerPackageVersion>
<MicrosoftFSharpCompilerPackageVersion>12.8.402-beta.24477.4</MicrosoftFSharpCompilerPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
Expand All @@ -178,9 +178,9 @@
</PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/razor -->
<PropertyGroup>
<MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>7.0.0-preview.24502.3</MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>
<MicrosoftCodeAnalysisRazorToolingInternalVersion>7.0.0-preview.24502.3</MicrosoftCodeAnalysisRazorToolingInternalVersion>
<MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>7.0.0-preview.24502.3</MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>9.0.0-preview.24502.7</MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>
<MicrosoftCodeAnalysisRazorToolingInternalVersion>9.0.0-preview.24502.7</MicrosoftCodeAnalysisRazorToolingInternalVersion>
<MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>9.0.0-preview.24502.7</MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/wpf -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public static class ContainerHelpers
[Flags]
public enum ParsePortError
{
MissingPortNumber,
InvalidPortNumber,
InvalidPortType,
UnknownPortFormat
MissingPortNumber = 1,
InvalidPortNumber = 2,
InvalidPortType = 4,
UnknownPortFormat = 8
}

/// <summary>
Expand All @@ -68,9 +68,9 @@ public static bool TryParsePort(string? portNumber, string? portType, [NotNullWh
error = ParsePortError.InvalidPortNumber;
}

if (!Enum.TryParse<PortType>(portType, out PortType t))
if (!Enum.TryParse(portType, out PortType t))
{
if (portType is not null)
if (!string.IsNullOrEmpty(portType))
{
error = (error ?? ParsePortError.InvalidPortType) | ParsePortError.InvalidPortType;
}
Expand Down
6 changes: 6 additions & 0 deletions src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ public static class Items

public static class ErrorCodes
{
// current version doesn't support containerization
public static readonly string CONTAINER002 = nameof(CONTAINER002);
// containerimagename rename
public static readonly string CONTAINER003 = nameof(CONTAINER003);
// generic http error
public static readonly string CONTAINER004 = nameof(CONTAINER004);
// don't use the containers package
public static readonly string CONTAINER005 = nameof(CONTAINER005);
public static readonly string CONTAINER1011 = nameof(CONTAINER1011);
public static readonly string CONTAINER1012 = nameof(CONTAINER1012);
public static readonly string CONTAINER1013 = nameof(CONTAINER1013);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ public record struct ManifestListV2(int schemaVersion, string mediaType, Platfor
public record struct PlatformInformation(string architecture, string os, string? variant, string[] features, [property: JsonPropertyName("os.version")][field: JsonPropertyName("os.version")] string? version);

public record struct PlatformSpecificManifest(string mediaType, long size, string digest, PlatformInformation platform);

public record struct ImageIndexV1(int schemaVersion, string mediaType, PlatformSpecificManifest[] manifests);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Microsoft.NET.Build.Containers.ContainerHelpers
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortNumber = 1 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortType = 2 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.MissingPortNumber = 0 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.UnknownPortFormat = Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortNumber | Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortType -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortNumber = 2 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortType = 4 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.MissingPortNumber = 1 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.UnknownPortFormat = 8 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.Port
Microsoft.NET.Build.Containers.Port.Deconstruct(out int Number, out Microsoft.NET.Build.Containers.PortType Type) -> void
Microsoft.NET.Build.Containers.Port.Equals(Microsoft.NET.Build.Containers.Port other) -> bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Microsoft.NET.Build.Containers.Tasks.ComputeDotnetBaseImageAndTag.UsesInvariantG
static readonly Microsoft.NET.Build.Containers.Constants.Version -> string!
Microsoft.NET.Build.Containers.ContainerHelpers
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortNumber = 1 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortType = 2 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.MissingPortNumber = 0 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.UnknownPortFormat = Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortNumber | Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortType -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortNumber = 2 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.InvalidPortType = 4 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.MissingPortNumber = 1 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError.UnknownPortFormat = 8 -> Microsoft.NET.Build.Containers.ContainerHelpers.ParsePortError
Microsoft.NET.Build.Containers.Descriptor
Microsoft.NET.Build.Containers.Descriptor.Annotations.get -> System.Collections.Generic.Dictionary<string!, string?>?
Microsoft.NET.Build.Containers.Descriptor.Annotations.init -> void
Expand Down Expand Up @@ -72,6 +72,15 @@ Microsoft.NET.Build.Containers.ManifestListV2.mediaType.get -> string!
Microsoft.NET.Build.Containers.ManifestListV2.mediaType.set -> void
Microsoft.NET.Build.Containers.ManifestListV2.schemaVersion.get -> int
Microsoft.NET.Build.Containers.ManifestListV2.schemaVersion.set -> void
Microsoft.NET.Build.Containers.ImageIndexV1
Microsoft.NET.Build.Containers.ImageIndexV1.ImageIndexV1() -> void
Microsoft.NET.Build.Containers.ImageIndexV1.ImageIndexV1(int schemaVersion, string! mediaType, Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! manifests) -> void
Microsoft.NET.Build.Containers.ImageIndexV1.manifests.get -> Microsoft.NET.Build.Containers.PlatformSpecificManifest[]!
Microsoft.NET.Build.Containers.ImageIndexV1.manifests.set -> void
Microsoft.NET.Build.Containers.ImageIndexV1.mediaType.get -> string!
Microsoft.NET.Build.Containers.ImageIndexV1.mediaType.set -> void
Microsoft.NET.Build.Containers.ImageIndexV1.schemaVersion.get -> int
Microsoft.NET.Build.Containers.ImageIndexV1.schemaVersion.set -> void
Microsoft.NET.Build.Containers.ManifestV2
Microsoft.NET.Build.Containers.ManifestV2.Config.get -> Microsoft.NET.Build.Containers.ManifestConfig
Microsoft.NET.Build.Containers.ManifestV2.Config.init -> void
Expand Down Expand Up @@ -268,4 +277,11 @@ static Microsoft.NET.Build.Containers.ManifestListV2.operator ==(Microsoft.NET.B
override Microsoft.NET.Build.Containers.ManifestListV2.GetHashCode() -> int
~override Microsoft.NET.Build.Containers.ManifestListV2.Equals(object obj) -> bool
Microsoft.NET.Build.Containers.ManifestListV2.Equals(Microsoft.NET.Build.Containers.ManifestListV2 other) -> bool
Microsoft.NET.Build.Containers.ManifestListV2.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! manifests) -> void
Microsoft.NET.Build.Containers.ManifestListV2.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! manifests) -> void
~override Microsoft.NET.Build.Containers.ImageIndexV1.ToString() -> string
static Microsoft.NET.Build.Containers.ImageIndexV1.operator !=(Microsoft.NET.Build.Containers.ImageIndexV1 left, Microsoft.NET.Build.Containers.ImageIndexV1 right) -> bool
static Microsoft.NET.Build.Containers.ImageIndexV1.operator ==(Microsoft.NET.Build.Containers.ImageIndexV1 left, Microsoft.NET.Build.Containers.ImageIndexV1 right) -> bool
override Microsoft.NET.Build.Containers.ImageIndexV1.GetHashCode() -> int
~override Microsoft.NET.Build.Containers.ImageIndexV1.Equals(object obj) -> bool
Microsoft.NET.Build.Containers.ImageIndexV1.Equals(Microsoft.NET.Build.Containers.ImageIndexV1 other) -> bool
Microsoft.NET.Build.Containers.ImageIndexV1.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! manifests) -> void
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Net.Http.Headers;
using Microsoft.Extensions.Logging;
using NuGet.Packaging;

namespace Microsoft.NET.Build.Containers;

internal static class HttpExtensions
{
private static readonly MediaTypeWithQualityHeaderValue[] _knownManifestFormats = [
new("application/json"),
new(SchemaTypes.DockerManifestListV2),
new(SchemaTypes.OciImageIndexV1),
new(SchemaTypes.DockerManifestV2),
new(SchemaTypes.OciManifestV1),
new(SchemaTypes.DockerContainerV1),
];

internal static HttpRequestMessage AcceptManifestFormats(this HttpRequestMessage request)
{
request.Headers.Accept.Clear();
request.Headers.Accept.Add(new("application/json"));
request.Headers.Accept.Add(new(SchemaTypes.DockerManifestListV2));
request.Headers.Accept.Add(new(SchemaTypes.DockerManifestV2));
request.Headers.Accept.Add(new(SchemaTypes.OciManifestV1));
request.Headers.Accept.Add(new(SchemaTypes.DockerContainerV1));
request.Headers.Accept.AddRange(_knownManifestFormats);
return request;
}

Expand Down
Loading

0 comments on commit 36741a7

Please sign in to comment.