Skip to content

ci: skip provision AVD creation in ci-copilot.yml (inline script owns it)#35714

Merged
PureWeen merged 1 commit into
mainfrom
PureWeen/fix-ci-copilot-duplicate-avd
Jun 2, 2026
Merged

ci: skip provision AVD creation in ci-copilot.yml (inline script owns it)#35714
PureWeen merged 1 commit into
mainfrom
PureWeen/fix-ci-copilot-duplicate-avd

Conversation

@PureWeen
Copy link
Copy Markdown
Member

@PureWeen PureWeen commented Jun 2, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Follow-up to @kubaflo's review on #35687.

What

In eng/pipelines/ci-copilot.yml, when parameters.Platform == 'android', the Android AVD was being created twice:

  1. First, via common/provision.yml running the ProvisionAndroidSdkAvdCreateAvds MSBuild target — because skipAndroidCreateAvds: ${{ ne(parameters.Platform, 'android') }} evaluated to false for Android. That target invokes dotnet android avd create --name "Emulator_30" … --force.
  2. Then, the inline Create AVD and boot Android Emulator script ran avdmanager create avd -n Emulator_30 -k "system-images;android-30;google_apis_playstore;x86_64" --device "Nexus 5X" --force.

Both create the same AVD name with --force, so the second silently overwrites the first — no error, just ~30–60s wasted on every Copilot review pipeline run for Android.

The inline script is the canonical source of truth: it pins the google_apis_playstore image variant, the Nexus 5X device profile, the disk.dataPartition.size=2048m shrink, and ADB key pre-auth. None of those are applied by ProvisionAndroidSdkAvdCreateAvds. So the right fix is to skip the provision step entirely and let the inline script own AVD creation.

Change

Pinned skipAndroidCreateAvds: true (with an explanatory comment) at both call sites of common/provision.yml in ci-copilot.yml (the ReviewPR stage and the Deep stage). The inline avdmanager blocks are untouched.

This is the AVD-creation portion of #35376 being reverted — the inline script that same PR added already handles AVD creation, so the provision-step AVD creation was redundant.

Scope

This change is scoped to ci-copilot.yml only — the Copilot review pipeline. It does not touch the required gating pipelines:

  • maui-pr
  • maui-pr-devicetests
  • maui-pr-uitests

Follow-up

Needs to be ported to net11.0 afterward via the automated merge/main-to-net11.0 flow.

… it)

When Platform=android, both `ProvisionAndroidSdkAvdCreateAvds` and the
inline `avdmanager create avd -n Emulator_30 …` script create the same
AVD. Both pass --force, so the second overwrites the first — wasted
~30–60s per run.

The inline script is the canonical source of truth: it pins the
`google_apis_playstore` image variant, the Nexus 5X profile, the
2048m dataPartition shrink, and ADB key pre-auth. None of those are
applied by ProvisionAndroidSdkAvdCreateAvds.

Re-pin skipAndroidCreateAvds to true so provisioning skips the
duplicate step. ci-copilot.yml only drives the Copilot review
pipeline, so this is scoped to that.

Reverts the AVD-creation portion of #35376 — the inline script the
same PR added already handles AVD creation.

Reported by @kubaflo on #35687.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 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 -- 35714

Or

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

@github-actions github-actions Bot added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Jun 2, 2026
@PureWeen PureWeen merged commit e904e90 into main Jun 2, 2026
33 of 36 checks passed
@PureWeen PureWeen deleted the PureWeen/fix-ci-copilot-duplicate-avd branch June 2, 2026 21:26
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants