Skip to content

Fix incorrect SDK provisioning commands in integration-tests instructions#34992

Merged
kubaflo merged 4 commits into
dotnet:inflight/currentfrom
davidnguyen-tech:fix/build-instructions
May 29, 2026
Merged

Fix incorrect SDK provisioning commands in integration-tests instructions#34992
kubaflo merged 4 commits into
dotnet:inflight/currentfrom
davidnguyen-tech:fix/build-instructions

Conversation

@davidnguyen-tech
Copy link
Copy Markdown
Member

@davidnguyen-tech davidnguyen-tech commented Apr 16, 2026

Description

The .github/instructions/integration-tests.instructions.md file contained incorrect build commands:

./build.sh --target=dotnet
./build.sh --target=dotnet-local-workloads

These mix up Arcade build script syntax (./build.sh) with Cake target syntax (--target=X). Unrecognized arguments are silently passed through to MSBuild as properties via eng/common/build.sh (line 200-201) and do nothing useful.

Fix

Replace with dotnet cake

dotnet cake --target=dotnet
dotnet cake --target=dotnet-local-workloads

Impact

Documentation-only change. No functional code changes.

AI now uses the right commands.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34992

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34992"

@davidnguyen-tech davidnguyen-tech marked this pull request as ready for review April 16, 2026 13:14
Copilot AI review requested due to automatic review settings April 16, 2026 13:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the integration-test setup instructions to use the correct Arcade build script syntax for provisioning the repo-local SDK/workloads, avoiding ineffective --target=... arguments.

Changes:

  • Replace the incorrect ./build.sh --target=dotnet and ./build.sh --target=dotnet-local-workloads commands with the supported ./build.sh -restore command.
  • Clarify (in the comment) that this is the recommended Arcade-based provisioning path.

Comment thread .github/instructions/integration-tests.instructions.md
rmarinho
rmarinho previously approved these changes Apr 17, 2026
@rmarinho
Copy link
Copy Markdown
Member

Should this go to main, then it gets merged to net10.0 and net11.0 branches?

@davidnguyen-tech davidnguyen-tech changed the base branch from net11.0 to main April 17, 2026 12:54
@davidnguyen-tech davidnguyen-tech dismissed rmarinho’s stale review April 17, 2026 12:54

The base branch was changed.

@davidnguyen-tech
Copy link
Copy Markdown
Member Author

/rebase

davidnguyen-tech and others added 2 commits April 17, 2026 15:00
…ions

The instructions used `./build.sh --target=dotnet` which is invalid —
unrecognized args are silently passed through to MSBuild as properties
and do nothing useful. The Cake targets `dotnet` and
`dotnet-local-workloads` exist but must be invoked via
`dotnet cake --target=X`, not `./build.sh --target=X`.

Replace with the recommended Arcade command `./build.sh -restore`
which provisions the SDK and installs workloads via the
`InitInternalTooling` target in eng/Tools.props.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The integration test skill (Run-IntegrationTests.ps1) uses
`./build.sh -restore -pack` because integration tests need
locally-packed MAUI NuGet packages installed into the SDK,
not just the SDK with published workloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@davidnguyen-tech
Copy link
Copy Markdown
Member Author

@rmarinho Yes sounds reasonable, thank you :)

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 24, 2026

/review -b feature/refactor-copilot-yml

Copy link
Copy Markdown
Collaborator

@MauiBot MauiBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 1 findings

See inline comments for details.

Comment thread .github/instructions/integration-tests.instructions.md Outdated
@MauiBot MauiBot added s/agent-review-incomplete s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels May 24, 2026
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check the ai's suggestions?

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 26, 2026

/review -b feature/refactor-copilot-yml

Copy link
Copy Markdown
Collaborator

@MauiBot MauiBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 2 findings

See inline comments for details.

Comment thread .github/instructions/integration-tests.instructions.md
Comment thread .github/instructions/integration-tests.instructions.md
@MauiBot MauiBot added the s/agent-fix-win AI found a better alternative fix than the PR label May 26, 2026
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you review the 2 suggestions?

- Add 'dotnet tool restore' as Step 0 so 'dotnet cake' works on a
  fresh checkout (the Cake tool comes from .config/dotnet-tools.json).
- Close the bash code fence after the workload command so the
  Verification section and its own fenced block render correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@davidnguyen-tech
Copy link
Copy Markdown
Member Author

Addressed both findings in a65eece:

  • Added dotnet tool restore as Step 0 so dotnet cake works on a fresh checkout.
  • Closed the bash code fence after the workload command so the Verification section renders correctly.

Thanks @MauiBot and @kubaflo!

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 28, 2026

/review -b feature/refactor-copilot-yml

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented May 28, 2026

🤖 AI Summary

👋 @davidnguyen-tech — new AI review results are available. Please review the latest session below.

📊 Review Sessiona65eece · Address MauiBot feedback: close fence and restore tools · 2026-05-28 15:07 UTC
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


🧪 UI Tests

No UI test categories needed for this PR (no UI-relevant changes).


🔍 Regression Cross-Reference

🟢 No implementation files modified — skipping regression cross-reference.


🔍 Pre-Flight — Context & Validation

Issue: N/A - No linked issue found in PR metadata
PR: #34992 - Fix incorrect SDK provisioning commands in integration-tests instructions
Platforms Affected: documentation-only; Android integration-test setup guidance mentioned, no platform implementation changed
Files Changed: 0 implementation, 0 test

Key Findings

  • PR changes one documentation file: .github/instructions/integration-tests.instructions.md.
  • The PR replaces invalid ./build.sh --target=... Cake-target syntax with dotnet cake --target=dotnet and dotnet cake --target=dotnet-local-workloads.
  • The latest PR revision also adds dotnet tool restore, addressing prior feedback that dotnet cake depends on repo-local tools from .config/dotnet-tools.json.
  • Prior review comments about the missing tool restore step and an unclosed code fence are resolved in the current diff.
  • Gate was skipped before this run because no tests were detected; no gate verification was re-run.
  • UI impact: NONE.

Code Review Summary

Verdict: LGTM
Confidence: high
Errors: 0 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • No findings.
  • Code review noted Build Analysis was still in progress, with no failing check runs reported.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34992 Replace invalid ./build.sh --target=... instructions with repo-local tool restore plus dotnet cake --target=dotnet and dotnet cake --target=dotnet-local-workloads. ⏳ PENDING (Gate skipped: no tests detected) .github/instructions/integration-tests.instructions.md Original PR

🔬 Code Review — Deep Analysis

Code Review — PR #34992

Independent Assessment

What this changes: Updates the manual integration-test prerequisite instructions to restore repo-local tools, then provision the local SDK and MAUI workloads with dotnet cake --target=dotnet and dotnet cake --target=dotnet-local-workloads instead of ./build.sh --target=....
Inferred motivation: The old commands mixed the Arcade shell wrapper with Cake target syntax, so a fresh local setup could fail or silently not provision what the instructions claim.

Reconciliation with PR Narrative

Author claims: The PR says the integration-test instructions used incorrect SDK provisioning commands and replaces them with dotnet cake; it also notes the change is documentation-only.
Agreement/disagreement: This matches the code. The added dotnet tool restore also addresses prior reviewer feedback and aligns with .github/skills/run-integration-tests/SKILL.md and Run-IntegrationTests.ps1, which restore local tools before invoking Cake.

Findings

No findings.

Devil's Advocate

I checked the full changed file, nearby run-integration-test skill docs/scripts, repo-local tool manifest, and recent file history. The main possible concern is that dotnet cake requires a global .NET SDK before the local .dotnet/ SDK exists, but the surrounding skill prerequisites already require a .NET SDK from global.json, and existing repo guidance uses this same sequence. CI is not fully complete: the GitHub check list shows Build Analysis still in progress, with no failing check runs reported.

Verdict: LGTM

Confidence: high
Summary: The documentation now matches the integration-test runner's actual auto-provisioning sequence and fixes the previously incorrect command form. No code or documentation correctness issues found; wait for CI completion before merge.


🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix-1 Use pwsh ./build.ps1 --target=... wrapper commands after dotnet tool restore. ✅ PASS 1 file Valid command shape, but not better than the PR because it adds wrapper indirection while still routing to Cake.
2 try-fix-2 Use a higher-level ./dotnet-local.sh bootstrap flow. ❌ FAIL 0 files Rejected before applying: dotnet-local.sh is not present in this checkout.
3 try-fix-3 Prefer Run-IntegrationTests.ps1 -Category "Build" -AutoProvision as the primary setup path and retain Cake commands as fallback. ✅ PASS 1 file Best alternative: aligns docs with the integration-test runner and reduces setup drift.
4 try-fix-4 Document the lower-level .dotnet/dotnet build src/DotNet/DotNet.csproj workload-install commands instead of dotnet-local-workloads. ✅ PASS 1 file Valid but too verbose and brittle for normal setup docs; useful only as troubleshooting detail.
PR PR #34992 Restore repo-local tools, then run dotnet cake --target=dotnet and dotnet cake --target=dotnet-local-workloads. ⚠️ Gate skipped 1 file Original PR. Code review found no issues; no tests were detected by the gate.

Cross-Pollination

Model/Reviewer Round New Ideas? Details
maui-expert-reviewer 1 Yes Candidate 1: repo PowerShell build wrapper.
maui-expert-reviewer 2 Yes Candidate 2: repo-local bootstrap script; failed because script is absent.
maui-expert-reviewer 3 Yes Candidate 3: integration-test runner -AutoProvision; passed and is the strongest alternative.
maui-expert-reviewer 4 Yes Candidate 4: lower-level workload install commands; passed but is less maintainable.

Exhausted: Yes
Selected Fix: Candidate #3 — It passed docs-only validation and is the only alternative that is both repository-valid and arguably better than the PR for maintainability, because it points users to the same integration-test runner workflow they are already instructed to use and keeps the direct Cake commands as fallback. The PR's current fix remains correct and simpler.


📋 Report — Final Recommendation

Comparative Report — PR #34992

Candidates Compared

Rank Candidate Test Result Outcome Rationale
1 pr-plus-reviewer Gate skipped; expert review found no issues Winner Same fix as the PR after expert review. It is the shortest correct documentation update and matches the integration-test runner's actual auto-provisioning sequence without adding extra workflow indirection.
2 pr Gate skipped; prior review found no issues Equivalent to winner The raw PR fix is correct. It ranks just below pr-plus-reviewer only because the required expert-review pass explicitly revalidated it and found no further changes.
3 try-fix-3 PASS Strong alternative Documents Run-IntegrationTests.ps1 -Category "Build" -AutoProvision as the primary setup path and retains Cake commands as fallback. This is valid and maintainable, but it expands a manual-prerequisites section and is not necessary to fix the incorrect commands.
4 try-fix-1 PASS Valid but less direct Uses pwsh ./build.ps1 --target=.... This remains repository-valid but adds wrapper indirection while still relying on restored repo tools and Cake.
5 try-fix-4 PASS Valid but too low-level Documents internal .dotnet/dotnet build src/DotNet/DotNet.csproj workload-install mechanics. It is more brittle and more likely to drift than the Cake target that owns this behavior.
6 try-fix-2 FAIL Rejected Documents dotnet-local.sh, which is not present in this checkout. Because it failed validation, it ranks below all candidates that passed or were review-clean.

Analysis

The submitted PR fix addresses the root documentation bug: ./build.sh --target=... is not the correct first-time SDK/workload provisioning command shape for these instructions. Adding dotnet tool restore is also necessary because direct dotnet cake depends on repo-local tools from .config/dotnet-tools.json.

try-fix-3 is the strongest alternative because Run-IntegrationTests.ps1 -AutoProvision directly wraps the same setup sequence and is already the preferred integration-test runner. However, the changed section is specifically a manual prerequisite fallback for missing local SDK/workloads; the PR's direct Cake commands are concise, accurate, and aligned with the run-integration-tests skill documentation and script error message.

No expert-review feedback required code or documentation changes, so pr-plus-reviewer is identical to pr. It wins because it preserves the PR's minimal, correct fix after independent expert validation.

Winner

pr-plus-reviewer — the PR fix plus expert reviewer feedback applied. Since the reviewer found no actionable issues, this is the submitted PR fix unchanged.


@kubaflo kubaflo changed the base branch from main to inflight/current May 29, 2026 14:05
@kubaflo kubaflo merged commit a6f127c into dotnet:inflight/current May 29, 2026
4 of 5 checks passed
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants