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

Add Ubuntu 24.10 image #111504

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

# Linux arm64
- ${{ if eq(parameters.platform, 'linux_arm64') }}:
- (Ubuntu.2204.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
- (Ubuntu.2410.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-24.10-helix-arm64v8
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (Debian.12.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:debian-12-helix-arm64v8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2434,12 +2434,31 @@ public static IEnumerable<object[]> SystemTimeZonesTestData()
}
}

// In recent Linux distros like Ubuntu 24.04, removed the legacy Time Zone names and not mapping it any more. User can still have a way to install it if they need to.
// UCT is one of the legacy aliases for UTC which we use here to detect if the legacy names is support at the runtime.
// https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#p-99950-tzdata-package-split
private static bool SupportLegacyTimeZoneNames { get; } = IsSupportedLegacyTimeZones();
private static bool IsSupportedLegacyTimeZones()
{
try
{
TimeZoneInfo.FindSystemTimeZoneById("UCT");
}
catch (TimeZoneNotFoundException)
{
return false;
}

return true;
}

[GeneratedRegex(@"^(?:[A-Z][A-Za-z]+|[+-]\d{2}|[+-]\d{4})$")]
private static partial Regex IanaAbbreviationRegex { get; }

// UTC aliases per https://github.com/unicode-org/cldr/blob/master/common/bcp47/timezone.xml
// (This list is not likely to change.)
private static readonly string[] s_UtcAliases = new[] {
private static readonly string[] s_UtcAliases = SupportLegacyTimeZoneNames ?
[
"Etc/UTC",
"Etc/UCT",
"Etc/Universal",
Expand All @@ -2448,7 +2467,13 @@ public static IEnumerable<object[]> SystemTimeZonesTestData()
"UTC",
"Universal",
"Zulu"
};
] : [
"Etc/UTC",
"Etc/UCT",
"Etc/Universal",
"Etc/Zulu",
"UTC"
];

// On Android GMT, GMT+0, and GMT-0 are values
private static readonly string[] s_GMTAliases = new[] {
Expand Down Expand Up @@ -2849,22 +2874,31 @@ public static void EnsureUtcObjectSingleton()
Assert.True(ReferenceEquals(tz, TimeZoneInfo.Utc));
}

public static IEnumerable<object[]> AlternativeName_TestData()
{
yield return new object[] { "Pacific Standard Time", "America/Los_Angeles" };
yield return new object[] { "AUS Eastern Standard Time", "Australia/Sydney" };
yield return new object[] { "GMT Standard Time", "Europe/London" };
yield return new object[] { "Tonga Standard Time", "Pacific/Tongatapu" };
yield return new object[] { "W. Australia Standard Time", "Australia/Perth" };
yield return new object[] { "E. South America Standard Time", "America/Sao_Paulo" };
yield return new object[] { "E. Africa Standard Time", "Africa/Nairobi" };
yield return new object[] { "W. Europe Standard Time", "Europe/Berlin" };
yield return new object[] { "Russian Standard Time", "Europe/Moscow" };
yield return new object[] { "Libya Standard Time", "Africa/Tripoli" };
yield return new object[] { "South Africa Standard Time", "Africa/Johannesburg" };
yield return new object[] { "Morocco Standard Time", "Africa/Casablanca" };
yield return new object[] { "Newfoundland Standard Time", "America/St_Johns" };
yield return new object[] { "Iran Standard Time", "Asia/Tehran" };

if (SupportLegacyTimeZoneNames)
{
yield return new object[] { "Argentina Standard Time", "America/Argentina/Catamarca" };
}
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[InlineData("Pacific Standard Time", "America/Los_Angeles")]
[InlineData("AUS Eastern Standard Time", "Australia/Sydney")]
[InlineData("GMT Standard Time", "Europe/London")]
[InlineData("Tonga Standard Time", "Pacific/Tongatapu")]
[InlineData("W. Australia Standard Time", "Australia/Perth")]
[InlineData("E. South America Standard Time", "America/Sao_Paulo")]
[InlineData("E. Africa Standard Time", "Africa/Nairobi")]
[InlineData("W. Europe Standard Time", "Europe/Berlin")]
[InlineData("Russian Standard Time", "Europe/Moscow")]
[InlineData("Libya Standard Time", "Africa/Tripoli")]
[InlineData("South Africa Standard Time", "Africa/Johannesburg")]
[InlineData("Morocco Standard Time", "Africa/Casablanca")]
[InlineData("Argentina Standard Time", "America/Argentina/Catamarca")]
[InlineData("Newfoundland Standard Time", "America/St_Johns")]
[InlineData("Iran Standard Time", "Asia/Tehran")]
[MemberData(nameof(AlternativeName_TestData))]
public static void UsingAlternativeTimeZoneIdsTest(string windowsId, string ianaId)
{
if (PlatformDetection.ICUVersion.Major >= 52 && !PlatformDetection.IsiOS && !PlatformDetection.IstvOS)
Expand Down
Loading