Skip to content

Fix WinGet and Homebrew failures in manual internal pipeline runs#15860

Draft
radical wants to merge 6 commits intomainfrom
fix-azdo-pr-build
Draft

Fix WinGet and Homebrew failures in manual internal pipeline runs#15860
radical wants to merge 6 commits intomainfrom
fix-azdo-pr-build

Conversation

@radical
Copy link
Copy Markdown
Member

@radical radical commented Apr 3, 2026

Summary

Running the internal pipeline manually on a dev/feature branch (e.g. via /azp run or the AzDO UI) fails in the Prepare Installers stage because:

  1. WinGet Manifest — expects native_archives_win_x64/win_arm64 artifacts that were never published (Windows archives only went through Arcade's BlobArtifacts, not as named artifacts).
  2. Homebrew Caskbrew audit --new --cask implies download checks even without --online, and the tarball URLs return 404 for non-publishing branches.

This PR fixes both issues so devs can run the internal pipeline on any branch to validate changes end-to-end.

Changes

  1. Scripts (generate-manifests.ps1, generate-cask.sh): Rename --validate-urls--skip-url-validation. Add three-way hash resolution: local archives (--archive-root), placeholder hashes (--skip-url-validation), or download from URLs (default).

  2. Installer templates (prepare-winget-manifest.yml, prepare-homebrew-cask.yml): Add skipUrlValidation and archiveRoot parameters. Derive install-test gating from skipUrlValidation (no separate parameter needed). Fix brew audit --new to skip when URLs are invalid.

  3. Windows CLI archive publishing (BuildAndTest.yml): Publish native_archives_win_x64 and native_archives_win_arm64 as named pipeline artifacts, matching the native_archives_<rid> pattern used by build_sign_native for macOS/Linux.

  4. Internal pipeline (azure-pipelines.yml): Widen Prepare Installers stage to run on PR and feature branch builds with skipUrlValidation: true. Download specific native_archives_<rid> artifacts for each job.

  5. Unofficial + release pipelines: Align with renamed parameters; restore CFSClean to release pipeline network isolation.

  6. Template tests (BuildAndTest.yml): Mark as continueOnError so transient failures don't block the Prepare Installers stage.

Validation

  • ✅ Internal pipeline build 2946554 — both WinGet Manifest and Homebrew Cask jobs pass on a feature branch
  • Previous failure: 2945595

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15860

Or

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

@radical radical force-pushed the fix-azdo-pr-build branch 3 times, most recently from ddf02e7 to c839282 Compare April 4, 2026 05:13
@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 6, 2026

/azp run microsoft-aspire

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

🎬 CLI E2E Test Recordings — 56 recordings uploaded (commit 646731f)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AllPublishMethodsBuildDockerImages ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording

📹 Recordings uploaded automatically from CI run #24049373704

@radical radical force-pushed the fix-azdo-pr-build branch from 646731f to 6fc57c0 Compare April 8, 2026 00:01
@radical radical changed the title Add --skip-url-validation flag for WinGet and Homebrew manifest generation Enable WinGet and Homebrew installer validation on PR builds Apr 8, 2026
@radical radical force-pushed the fix-azdo-pr-build branch from 1a790e5 to b1dc943 Compare April 8, 2026 22:15
radical and others added 5 commits April 8, 2026 20:22
Rename the flag from opt-in validation (--validate-urls / -ValidateUrls) to
opt-out (--skip-url-validation / -SkipUrlValidation) so callers explicitly
request skipping instead of forgetting to validate.

When --skip-url-validation is set, both scripts now emit placeholder (all-zero)
SHA256 hashes instead of attempting to download or validate installer URLs.
This enables PR and feature-branch builds where URLs are not yet published.

The three-way if/elseif/else is now:
  1. --archive-root: hash from local files
  2. --skip-url-validation: placeholder hashes
  3. default: validate URLs then download and hash

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename validateUrls → skipUrlValidation (matching the script rename) and
plumb the archiveRoot parameter through both prepare-winget-manifest.yml
and prepare-homebrew-cask.yml.

Fix brew audit --new flag: `brew audit --new --cask` implies download
checks even without --online, causing 404 failures on PR builds where
URLs are not yet published. When skipUrlValidation is true, skip --new
to avoid download attempts and skip --online to avoid URL validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The build_sign_native stage publishes macOS/Linux CLI archives as
native_archives_<rid> artifacts, but Windows archives were only
published through Arcade's BlobArtifacts mechanism. The Prepare
Installers stage needs them as named artifacts to download by RID.

Add steps to stage and publish native_archives_win_x64 and
native_archives_win_arm64 artifacts from the Windows build job,
mirroring the pattern used by build_sign_native.

Also mark template tests as continueOnError to prevent transient
template test failures from blocking the Prepare Installers stage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously, the Prepare Installers stage was skipped for PRs and only
ran on main/release branches. This meant WinGet/Homebrew infrastructure
was never validated until code reached those branches — causing
undetected breakage.

Changes:
- Widen stage condition to include PR builds alongside main/release
- Add DownloadPipelineArtifact steps for win-x64, win-arm64, osx-x64,
  and osx-arm64 CLI archives
- Pass archiveRoot, skipUrlValidation, and runInstallTest parameters to
  both WinGet and Homebrew templates
- skipUrlValidation is true for PR/feature branches (URLs not published)
- runInstallTest is false for PR/feature branches (no real installers)
- Remove stable-only condition from Homebrew job so it runs on all
  channels during validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Unofficial pipeline: rename validateUrls → skipUrlValidation, remove
  stable-only condition from Homebrew job, drop obsolete validateUrls:
  false (now the default)
- Release pipeline: restore CFSClean to network isolation policy and
  simplify comments to match main build pipeline conventions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical radical force-pushed the fix-azdo-pr-build branch from b1dc943 to abf3b83 Compare April 9, 2026 00:23
runInstallTest was always the logical inverse of skipUrlValidation.
Remove the separate parameter from both installer templates and derive
the install-test condition internally using eq(skipUrlValidation, false).

This eliminates the duplicated De Morgan expressions from the pipeline
files — callers now only pass skipUrlValidation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical radical changed the title Enable WinGet and Homebrew installer validation on PR builds Fix WinGet and Homebrew failures in manual internal pipeline runs Apr 9, 2026
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