Skip to content

Conversation

@lbussell
Copy link
Member

Ubuntu 26.04 Resolute is in extremely early development. Its package tests are flaky as a result. We should only lock down the package baselines for it once it is closer to release.

This PR builds on #6893 by adding a new property to OSInfo that indicates when a given OS is considered "unstable". Unstable OSes skip package baseline tests.

This PR is in draft until #6893 is merged.

Introduces OSInfo record with:
- OSType enum (Linux/Windows)
- OSFamily enum (Alpine, AzureLinux, Debian, Mariner, Ubuntu, NanoServer, WindowsServerCore)
- Version, TagName, DisplayName, IsDistroless properties
- Implicit string conversion for backward compatibility
- Static instances for all existing OS constants
- Update ImageData.OS property from string to OSInfo
- Update ProductImageData.SdkOS property from string to OSInfo
- Add Contains() and StartsWith() methods to OSInfo for backward compatibility
- Make OSType, OSFamily, and OSInfo public for use in test APIs
- Update all test data arrays to use OSInfo static instances
- Update pattern matching in ProductImageTests.cs to work with OSInfo
- Refactor GetZLibPackage to use OSFamily enum
- Make Version property required (non-nullable string)
- Remove un-versioned OSInfo instances (except AlpineFloating for samples)
- Use C# record 'with' expressions to derive related records:
  - Alpine versions from AlpineFloating
  - Distroless variants from base OS (AzureLinux, Mariner, Ubuntu)
  - Slim variant from Bookworm
  - Windows version variants from base versions
- Remove DisplayName from record constructor parameters
- Compute DisplayName from Family and Version using switch expression
- Remove DisplayName from all with expressions and constructor calls
- Add Codename parameter for OS base tag (e.g., 'jammy', 'bookworm', 'alpine')
- Add IsChiseled and IsSlim as constructor parameters (with defaults)
- Compute TagName from Family, Version, Codename, and variant flags
- Remove all TagName assignments from with expressions
- Simplify derived OS definitions to only specify changed properties
- IsChiseled is synonymous with IsDistroless for Ubuntu (chiseled suffix)
- All Debian images are slim (always append -slim suffix)
- Simplify TagName computation based on Family and IsDistroless
- Remove Bookworm (keep only BookwormSlim since all Debian is slim)
- Remove Codename from constructor parameters
- Add GetDebianCodename and GetUbuntuCodename helper methods
- Compute codename from version for Debian/Ubuntu in TagName property
- Simplify static OSInfo instance definitions
- Merge GetDebianCodename and GetUbuntuCodename into GetCodename
- Use tuple pattern matching on (OSFamily, version)
@lbussell lbussell requested a review from a team as a code owner December 22, 2025 22:14
@lbussell lbussell changed the title Pkg tests unstable Skip package tests for unstable OSes Dec 22, 2025
@lbussell lbussell marked this pull request as draft December 22, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant