Fix WinGet and Homebrew failures in manual internal pipeline runs#15860
Fix WinGet and Homebrew failures in manual internal pipeline runs#15860
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15860Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15860" |
ddf02e7 to
c839282
Compare
|
/azp run microsoft-aspire |
|
🎬 CLI E2E Test Recordings — 56 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24049373704 |
646731f to
6fc57c0
Compare
b1dc943 to
abf3b83
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the installer-prep tooling and internal pipelines so manual/internal runs on non-publishing branches (PRs/feature branches) don’t fail due to missing named native-archive artifacts (WinGet) or invalid/404 installer URLs (Homebrew/WinGet hashing + audits).
Changes:
- Add “skip URL validation” modes and local-archive hash computation to WinGet/Homebrew manifest generation scripts.
- Update Prepare Installers templates/pipelines to pass
archiveRoot+skipUrlValidation, and download native archives by artifact name. - Publish Windows native CLI archives as named
native_archives_<rid>artifacts and relax/adjust installer stage gating.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/winget/generate-manifests.ps1 | Adds 3-way SHA256 resolution (local archive, placeholder, or download) and renames URL validation switch. |
| eng/pipelines/templates/prepare-winget-manifest.yml | Replaces validateUrls/runInstallTest with skipUrlValidation and wires through to script + install-test condition. |
| eng/pipelines/templates/prepare-homebrew-cask.yml | Replaces validateUrls/runInstallTest with skipUrlValidation and adjusts brew audit flags to avoid download checks. |
| eng/pipelines/templates/BuildAndTest.yml | Publishes Windows native archives as named artifacts; marks template tests continueOnError. |
| eng/pipelines/azure-pipelines.yml | Adds _PackagesPublished, broadens Prepare Installers stage execution, and downloads specific native archive artifacts per job. |
| eng/pipelines/azure-pipelines-unofficial.yml | Aligns callers with renamed parameters and updated URL-validation behavior. |
| eng/homebrew/generate-cask.sh | Adds local-archive hashing and placeholder-hash mode via --skip-url-validation. |
…esolution Rename the flag to --skip-url-validation (inverted semantics) in both generate-cask.sh and generate-manifests.ps1. Add three-way hash resolution: use local archives (--archive-root), placeholder hashes (--skip-url-validation), or download from URLs (default). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add skipUrlValidation and archiveRoot parameters to prepare-winget-manifest.yml and prepare-homebrew-cask.yml. Derive install-test gating from skipUrlValidation (no separate runInstallTest parameter needed). Skip the upstream GitHub API cask check entirely when skipUrlValidation is true to avoid rate-limit flakes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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. This allows the Prepare Installers stage to download them for WinGet manifest generation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Widen the Prepare Installers stage condition to run on PR and feature branch builds with skipUrlValidation derived from a new _PackagesPublished pipeline variable. This deduplicates the long compile-time expression that was previously repeated in both the WinGet and Homebrew jobs. Align the unofficial pipeline with the renamed parameters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
23506ef to
7cf5821
Compare
JamesNK
left a comment
There was a problem hiding this comment.
Reviewed all 7 changed files. The three-way hash resolution logic (local archives / placeholder / download) is clean and consistent across both the bash and PowerShell scripts. Stage conditions, artifact naming, and the _PackagesPublished compile-time expression are correct. No issues found.
Docs Check: No Documentation PR RequiredThis PR contains only internal CI/build infrastructure changes (pipeline YAML files and internal installer scripts). There are no user-facing API changes, new CLI commands, new configuration options, or behavioral changes that end users would experience. Reason: Build/CI infrastructure changes only —
|
Summary
Running the internal pipeline manually on a dev/feature branch (e.g. via
/azp runor the AzDO UI) fails in the Prepare Installers stage because:native_archives_win_x64/win_arm64artifacts that were never published (Windows archives only went through Arcade's BlobArtifacts, not as named artifacts).brew audit --new --caskimplies 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
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).Installer templates (
prepare-winget-manifest.yml,prepare-homebrew-cask.yml): AddskipUrlValidationandarchiveRootparameters. Derive install-test gating fromskipUrlValidation(no separate parameter needed). Fixbrew audit --newto skip when URLs are invalid. Skip the upstream GitHub API cask check entirely whenskipUrlValidationis true to avoid rate-limit flakes.Windows CLI archive publishing (
BuildAndTest.yml): Publishnative_archives_win_x64andnative_archives_win_arm64as named pipeline artifacts, matching thenative_archives_<rid>pattern used bybuild_sign_nativefor macOS/Linux.Internal pipeline (
azure-pipelines.yml): Widen Prepare Installers stage to run on PR and feature branch builds withskipUrlValidation: true. Download specificnative_archives_<rid>artifacts for each job. Extract_PackagesPublishedpipeline variable to deduplicate the longskipUrlValidationcompile-time expression.Unofficial pipeline (
azure-pipelines-unofficial.yml): Align with renamed parameters.Validation