Repository navigation
Add scheduled PowerShell Gallery health check that opens status-page PRs on outages - #2086
Open
alerickson wants to merge 7 commits into
Open
alerickson wants to merge 7 commits into
alerickson wants to merge 7 commits into
Conversation
…Resource search queries and, when they keep returning 5xx errors or timing out, triggers an agentic workflow to open or update a service-status issue in PowerShell/PowerShellGallery
…ry_status.md in PowerShell/PowerShellGallery instead of filing an issue
alerickson
requested review from
Sydney Smith (SydneyhSmith),
Aditya Patwardhan (adityapatwardhan),
Anam Navied (anamnavi) and
shammu1
as code owners
November 14, 2026 00:46
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues can misclassify timed-out requests as healthy, duplicate ongoing outage reports, allow broader-than-stated network access, and prevent diagnostic issues from being created.
4 open issues
What changed in this PR
Adds automated PowerShell Gallery monitoring to help surface failures affecting PSResourceGet users and prepare status-page updates for the Gallery team to review.
Changes:
- Runs scheduled probes every 30 minutes using representative
Find-PSResourcequeries and pooled failure thresholds. - Adds an agentic reporter that rechecks failures and proposes a status-page PR or comments on an existing report.
- Includes the compiled workflow, pinned setup action, and generated-file metadata.
| File | Description |
|---|---|
.github/workflows/psgallery-outage-reporter.md |
Defines re-verification, incident matching, reporting, and write restrictions. |
.github/workflows/psgallery-outage-reporter.lock.yml |
Compiles the reporter into executable GitHub Actions jobs. |
.github/workflows/psgallery-health-check.yml |
Schedules Gallery probes and dispatches the reporter when thresholds are met. |
.github/aw/actions-lock.json |
Pins the gh-aw setup action to a commit. |
.gitattributes |
Marks compiled workflow files as generated. |
Review effort: Balanced
…lthy in both the health check and the outage reporter's re-check, even when the server already sent a 200 status
….com, dropping the defaults group that pulled in unrelated sources
…ts so gh-aw's diagnostic issues in this repository use GITHUB_TOKEN instead of a token that only has access to PowerShellGallery
Updated instructions for checking existing outage reports to include all open pull requests and clarify status checks. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This branch has not been deployed
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.

PR Summary
Adds automated PowerShell Gallery outage reporting.
psgallery-health-check.yml: scheduled workflow that runs every 30 minutes. It sends the same search queries PSResourceGet uses forFind-PSResource(find by name, wildcard name with-Type, and tag searches for modules, scripts and prerelease), 17 requests in total. Only hard failures count: HTTP 404, 5xx, or no response within 60 seconds. If 2 or more of the search requests fail, or find-by-name fails 3 times in a row, it triggers the outage reporter.The requests come from the
Find-PSResourceCI tests that most often fail with 500s:Find-PSResource -Name test_moduleFindPackagesById()with anId eqfilterFind-PSResource -Name 'test*' -Type ModuleSearch()withstartswith(Id)and asubstringoffilter on TagsFind-PSResource -Tag CommandsAndResourceSearch()withsubstringoffilters on Tags,$top=6000,$orderbyFind-PSResource -Tag 'Tag-Required-Script1-2.5'items/psscript/Search()routeFind-PSResource -Tag MyPSTag -PrereleaseIsAbsoluteLatestVersionwithincludePrerelease=trueThere are 5 kinds of request, but some are sent more than once per run:
Search probes, 4 each: one bad instance only fails some requests, about 1 in 5 in my sampling, so a single request per query would usually land on a healthy instance and miss it. Sending each one 4 times gives 16 search requests. A run is flagged when 2 or more of those 16 fail, which catches a bad instance about 86% of the time per run, or about 98% within an hour.
Find by name, 1: it's only there to catch a full outage, so one request is enough. It's retried only if it fails, up to 3 tries. A healthy run sends 17 requests, and a run where find by name fails sends up to 19.
You can change the 4 with
$searchSamplesinpsgallery-health-check.yml. Lowering it to 2 would mean 9 requests per run, but a partial outage would be caught less often per run.psgallery-outage-reporter.md(+ compiled.lock.yml): an agentic workflow (gh-aw, Copilot engine) that re-checks the failing requests and, if they're still failing, opens a PR inPowerShell/PowerShellGallery. The PR adds an "Ongoing" entry to the top ofpsgallery_status.mdfor the Gallery team to review and merge. If a matching PR is already open, it comments on that PR instead. If the status page already has a matching ongoing entry, it does nothing..github/aw/actions-lock.jsonand.gitattributes: broilerplate files that (for actions-lock.json) pin the gh-aw setup action and (for .gitattributes) mark generated*.lock.ymlfiles as generated.Guardrails:
PowerShell/PowerShellGallery, and the PR may only changepsgallery_status.md.curl,jq,sleep,date,catandhead, and network access is limited to GitHub and PowerShell Gallery domains.Security review: this adds the repository secret
PSGALLERY_STATUS_PR_TOKEN. Only gh-aw's safe-outputs job uses it, to open the PR or comment inPowerShell/PowerShellGallery; the agent itself has read-only permissions. It needs Contents, Pull requests and Issues write onPowerShell/PowerShellGallery. It also requires the existing gh-awCOPILOT_GITHUB_TOKENsecret.PR Context
This workflow is meant to catch Gallery failures and update the status page as quickly as possible with a ready-to-merge PR.
Tested end to end on a fork (
alerickson/PSResourceGet, targetingalerickson/PowerShellGallery):psgallery_status.md. (see: https://github.com/alerickson/PowerShellGallery/pull/1/changes)PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.