[ci] Enable testing building previous#33961
Conversation
There was a problem hiding this comment.
Pull request overview
Re-enables .NET MAUI template integration tests against DotNetPrevious and extends CI to run the iOS “previous” lane on both ARM64 and x64 macOS pools.
Changes:
- Re-enabled
DotNetPrevious[InlineData]cases inSimpleTemplateTestandWindowsTemplateTest. - Added an iOS test entrypoint (
RunOniOS_Previous) inAppleTemplateTestsfor CI to target. - Added two new CI jobs to run
RunOniOS_Previouson ARM64 and x64 macOS pools.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/TestUtils/src/Microsoft.Maui.IntegrationTests/WindowsTemplateTest.cs | Re-enables Windows publish tests for DotNetPrevious. |
| src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs | Re-enables template build/pack scenarios for DotNetPrevious. |
| src/TestUtils/src/Microsoft.Maui.IntegrationTests/AppleTemplateTests.cs | Adds RunOniOS_Previous test method for CI targeting. |
| eng/pipelines/ci.yml | Adds new macOS jobs to run iOS previous tests on ARM64 and x64. |
| @@ -62,11 +62,14 @@ public AppleTemplateTests(IntegrationTestFixture fixture, ITestOutputHelper outp | |||
| if (true) return; // Skip: "Running Apple templates is only supported on macOS." | |||
There was a problem hiding this comment.
if (true) return; disables the intended platform guard and does not actually skip tests (it just exits the constructor early). This can cause Apple tests to run on non-macOS environments (or proceed without proper setup) instead of being skipped. Replace this with the standard macOS guard used in the repo (e.g., if (!TestEnvironment.IsMacOS) Assert.Ignore("Running Apple templates is only supported on macOS.");) rather than returning unconditionally.
| // DotNetPrevious test methods | ||
| [Theory] | ||
| [InlineData("maui", "Debug", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| [InlineData("maui", "Release", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| [InlineData("maui-blazor", "Debug", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| [InlineData("maui-blazor", "Release", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| public void RunOniOS_Previous(string id, string config, string framework, RuntimeVariant runtimeVariant, string? trimMode) | ||
| => RunOniOS(id, config, framework, runtimeVariant, trimMode); | ||
|
|
There was a problem hiding this comment.
The new RunOniOS_Previous is a single [Theory] with multiple [InlineData] cases, but the comment immediately below states the CI model relies on “individual test methods” so each configuration can run in a separate job. With the current structure, the testName: RunOniOS_Previous job will execute all four cases serially in one job per arch. Consider splitting these into separate [Test] methods (or separate theory methods) per configuration (e.g., maui Debug, maui Release, maui-blazor Debug, maui-blazor Release) so the code matches the comment/CI strategy and keeps job runtimes predictable.
| // DotNetPrevious test methods | |
| [Theory] | |
| [InlineData("maui", "Debug", DotNetPrevious, RuntimeVariant.Mono, null)] | |
| [InlineData("maui", "Release", DotNetPrevious, RuntimeVariant.Mono, null)] | |
| [InlineData("maui-blazor", "Debug", DotNetPrevious, RuntimeVariant.Mono, null)] | |
| [InlineData("maui-blazor", "Release", DotNetPrevious, RuntimeVariant.Mono, null)] | |
| public void RunOniOS_Previous(string id, string config, string framework, RuntimeVariant runtimeVariant, string? trimMode) | |
| => RunOniOS(id, config, framework, runtimeVariant, trimMode); | |
| // DotNetPrevious test methods (individual methods per configuration for CI filtering) | |
| [Fact] | |
| public void RunOniOS_Previous_MauiDebug() => RunOniOS("maui", "Debug", DotNetPrevious, RuntimeVariant.Mono, null); | |
| [Fact] | |
| public void RunOniOS_Previous_MauiRelease() => RunOniOS("maui", "Release", DotNetPrevious, RuntimeVariant.Mono, null); | |
| [Fact] | |
| public void RunOniOS_Previous_BlazorDebug() => RunOniOS("maui-blazor", "Debug", DotNetPrevious, RuntimeVariant.Mono, null); | |
| [Fact] | |
| public void RunOniOS_Previous_BlazorRelease() => RunOniOS("maui-blazor", "Release", DotNetPrevious, RuntimeVariant.Mono, null); |
| - name: mac_runios_previous_arm64 | ||
| ${{ if eq(variables['Build.DefinitionName'], 'maui-pr') }}: | ||
| pool: ${{ parameters.MacOSPool.public }} | ||
| ${{ else }}: |
There was a problem hiding this comment.
There are trailing spaces after ${{ else }}:. This is minor, but it can trip YAML linting or style checks. Consider removing the extra whitespace.
| - name: mac_runios_previous | ||
| ${{ if eq(variables['Build.DefinitionName'], 'maui-pr') }}: | ||
| pool: ${{ parameters.MacOSPool.public }} | ||
| ${{ else }}: |
There was a problem hiding this comment.
There are trailing spaces after ${{ else }}:. This is minor, but it can trip YAML linting or style checks. Consider removing the extra whitespace.
|
/rebase |
16207aa to
e8e499b
Compare
🟡 .NET MAUI Code Review — Changes Suggested
🟡 Review Session — Changes Suggested —
|
AI code review for net11.0 targetVerdict: Needs changes (re-enabled tests are currently failing in CI) Independent review (diff-first, then reconciled with the PR narrative). This is not an approval — a human still needs to sign off. What the PR doesRe-enables Findings
CI
Confidence: high on the methodology; the gating question (real failures vs. infra) needs a maintainer to read the failing previous-template logs. |
kubaflo
left a comment
There was a problem hiding this comment.
Review summary — PR #33961: [ci] Enable testing building previous
Verdict: NEEDS_CHANGES (confidence: high)
All four models independently returned NEEDS_CHANGES. The PR correctly restores DotNetPrevious (net10.0) template coverage and wires up matching CI lanes, but the newly re-enabled lanes are red. claude-opus-4.8 pinpointed the likely root cause and it checks out against the code: the re-enabled Windows publish rows assert the legacy win10-x64 RID folder that net10.0 no longer produces.
Key findings:
- Windows publish asserts a stale RID folder (error).
PublishUnpackaged(lines 108/110) andPublishPackaged(lines 151/153) re-enableDotNetPreviouswithusesRidGraph: true, soAssetExistslooks underwin10-x64/.... Post-.NET 8 the RID graph is off by default and the MAUI templates declare onlywin-x64(nowin10-x64undersrc/Templates);BuildPropsdoesn't setUseRidGraph. So net10.0 publishes towin-x64— like the passingDotNetCurrentrows that usefalse— and the lookups fail. Likely cause of the redWindowsTemplateslane. - iOS "previous" tests aren't actually parallelized (warning).
RunOniOS_Previousis a single[Theory]with four configs; CI filters it as one job (FullyQualifiedName~RunOniOS_Previous), so all four build+run cycles run serially under onetimeout: 45. This contradicts the file's per-[Fact]pattern and the PR's "parallel execution" claim, loses per-config attribution, and is tight on time (~55 min equivalent). Suggest splitting into four[Fact]s + four lanes.
CI: Build 1350355 is red on the two lanes this PR re-enables — WindowsTemplates and RunOniOS_Previous ARM64 — so these failures are PR-introduced and must be fixed (or the broken configs kept disabled with a tracking issue) before merge. (macOS Build (Debug)/AOT lanes are also red; their link to this PR is unclear and should be confirmed.)
| [Theory] | ||
| [InlineData("maui", DotNetCurrent, "Release", false)] | ||
| //[InlineData("maui", DotNetPrevious, "Release", true)] | ||
| [InlineData("maui", DotNetPrevious, "Release", true)] |
There was a problem hiding this comment.
This re-enabled DotNetPrevious row passes usesRidGraph: true, so AssetExists looks under bin/Release/net10.0-windows10.0.19041.0/win10-x64/publish (line 132). But DotNetPrevious is now net10.0: post-.NET 8 the RID graph is off by default, and the MAUI Windows templates declare only the portable win-x64 RID (there is no win10-x64 anywhere under src/Templates). The publish output therefore lands in win-x64, exactly like the DotNetCurrent (net11.0) rows in this same [Theory] that pass false. As written, these checks look in a folder that won't exist — consistent with the red WindowsTemplates lane. BuildProps does not set UseRidGraph, so nothing re-enables the legacy RID here. The same stale true is on line 110 (maui-blazor).
| [InlineData("maui", DotNetPrevious, "Release", true)] | |
| [InlineData("maui", DotNetPrevious, "Release", false)] |
| [Theory] | ||
| [InlineData("maui", DotNetCurrent, "Release", false)] | ||
| //[InlineData("maui", DotNetPrevious, "Release", true)] | ||
| [InlineData("maui", DotNetPrevious, "Release", true)] |
There was a problem hiding this comment.
Same stale-RID problem as PublishUnpackaged: this re-enabled net10.0 row passes usesRidGraph: true, so the expected path becomes bin/Release/net10.0-windows10.0.19041.0/win10-x64/AppPackages/... (line 177). Since net10.0 publishes with the portable win-x64 RID and produces no win10-x64 folder, this lookup fails. Note the packaged path is built differently here than in PublishUnpackaged (it concatenates prefix with the rid segment), so simply flipping to false yields bin/Release/net10.0-windows10.0.19041.0/AppPackages/... — please verify that matches where the MSIX actually lands for a non-RID-graph net10.0 packaged publish before settling on the value. Line 153 (maui-blazor) needs the same correction.
| [InlineData("maui", "Release", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| [InlineData("maui-blazor", "Debug", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| [InlineData("maui-blazor", "Release", DotNetPrevious, RuntimeVariant.Mono, null)] | ||
| public void RunOniOS_Previous(string id, string config, string framework, RuntimeVariant runtimeVariant, string? trimMode) |
There was a problem hiding this comment.
RunOniOS_Previous bundles all four net10.0 configurations into a single [Theory], but the surrounding DotNetCurrent cases are deliberately split into individual [Fact] methods (see the comment on line 74: "Individual test methods ... to enable parallel CI runs"). The CI lanes added to ci.yml map testName to --filter "FullyQualifiedName~RunOniOS_Previous" (see eng/pipelines/arcade/stage-integration-tests.yml), so one job runs all four build+run cycles serially under a single timeout: 45. That doesn't deliver the "parallel execution" the PR description claims, loses per-config failure attribution, and is tight on time — the equivalent DotNetCurrent ARM64 lanes took ~12/18/10/15 min individually (≈55 min combined). The RunOniOS_Previous ARM64 lane is currently red (failed in ~8 min). Consider splitting into four [Fact] wrappers plus four CI job pairs to match the existing pattern.
kubaflo
left a comment
There was a problem hiding this comment.
Could you please resolve conflicts?
Description of Change
This pull request re-enables and adds several integration tests for .NET MAUI templates targeting the "DotNetPrevious" framework across iOS, macOS, and Windows, and updates the CI pipeline to run these tests in parallel for both ARM64 and x64 architectures. These changes help ensure better test coverage for previous .NET versions and improve CI reliability.
Test Coverage Improvements:
[InlineData]test cases for "DotNetPrevious" inSimpleTemplateTest.cs, coveringmaui,maui-blazor, andmauilibtemplates for build, special character, and bad image file scenarios. [1] [2] [3][InlineData]test cases for "DotNetPrevious" inWindowsTemplateTest.cs, covering both packaged and unpackaged publish scenarios formauiandmaui-blazortemplates. [1] [2]AppleTemplateTests.csfor running iOS tests on the "DotNetPrevious" framework, enabling parallel execution in CI.CI Pipeline Enhancements:
ci.ymlpipeline to run iOS template tests for "DotNetPrevious" on both ARM64 (mac_runios_previous_arm64) and x64 (mac_runios_previous) architectures, supporting both public and internal MacOS pools and improving CI coverage for previous .NET versions. [1] [2]