Fix WinGet and Homebrew failures in manual internal pipeline runs#15860
Draft
Fix WinGet and Homebrew failures in manual internal pipeline runs#15860
Conversation
Contributor
|
🚀 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
Member
Author
|
/azp run microsoft-aspire |
Contributor
|
🎬 CLI E2E Test Recordings — 56 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24049373704 |
646731f to
6fc57c0
Compare
1a790e5 to
b1dc943
Compare
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>
b1dc943 to
abf3b83
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.Unofficial + release pipelines: Align with renamed parameters; restore
CFSCleanto release pipeline network isolation.Template tests (
BuildAndTest.yml): Mark ascontinueOnErrorso transient failures don't block the Prepare Installers stage.Validation