Handle missing GraphQL aliases as non-blocking repository skips - #68
Merged
Conversation
Agent-Logs-Url: https://github.com/rpothin/PowerPlatform-OpenSource-Hub/sessions/2104b38a-97ba-4bfc-aa87-bc5bc7cc5b07 Co-authored-by: rpothin <23240245+rpothin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rpothin/PowerPlatform-OpenSource-Hub/sessions/2104b38a-97ba-4bfc-aa87-bc5bc7cc5b07 Co-authored-by: rpothin <23240245+rpothin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rpothin/PowerPlatform-OpenSource-Hub/sessions/2104b38a-97ba-4bfc-aa87-bc5bc7cc5b07 Co-authored-by: rpothin <23240245+rpothin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix GraphQL response missing alias errors in TypeScript pipeline
Handle missing GraphQL aliases as non-blocking repository skips
May 18, 2026
rpothin
marked this pull request as ready for review
May 18, 2026 19:23
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.
The TypeScript repository-details workflow was treating GraphQL batch responses that silently omit a repo alias as hard hydration failures. That blocked production runs when repositories disappeared between search indexing and detail hydration (for example, deleted or newly private repos).
Reclassify absent GraphQL aliases
providers.tserror emitted forrepoNaliases missing from the GraphQL response withisMissingAlias: true.Track skipped repos separately in pipeline metrics
PipelineMetricswith:missingRepoSkipsmissingRepoSkipNamesRoute missing aliases away from
detailFailuresisMissingAliasbefore PAT-policy classification.missingRepoSkipsdetailFailures.Keep the production guard strict on real failures only
::warning::formissingRepoSkipsinstead of adding them toblockingFailures.detailFailuresremains the production-blocking signal for true structural hydration problems.Add focused regression coverage
isMissingAlias: true.detailFailuresat zero, and excludes the vanished repo from output.Example of the new provider tagging:
Original prompt
Background
During the
1-update-github-repositories-detailsworkflow, the TypeScript pipeline makes batched GraphQL calls (20 repos per batch). Each repo gets an alias (repo0…repo19). When a repo has been deleted or made private after the search API indexed it, GitHub's GraphQL API silently omits the alias from the response — with no accompanying error. This causes the code inPipeline/src/providers.ts(~L306) to record a"GraphQL response missing alias 'repoN' for owner/repo"error.These errors are counted as
detailFailuresinPipelineMetrics. The production guard in the workflow (Guard TypeScript repository-count deltastep) blocks the entire run wheneverdetailFailures > 0:This causes valid runs to fail when repos simply disappear from GitHub between the search and the detail-hydration phase.
Goal
Implement Option A: classify "missing alias" errors as a separate non-blocking metric (
missingRepoSkips) so the production guard does not block on repos that have simply vanished.Required Changes
1.
Pipeline/src/providers.tsWhen recording the "missing alias" error (the
else if (node === undefined)branch, ~L306), tag the error so callers can distinguish it from a true hydration failure:2.
Pipeline/src/types.tsAdd a new counter to
PipelineMetrics:Also add a helper type / type-guard if appropriate.
3.
Pipeline/src/generator.tsIn the batch hydration path (where
result instanceof Erroris checked), add a branch before theisPatPolicyErrorcheck to handleisMissingAlias:Make sure
missingRepoSkipsandmissingRepoSkipNamesare initialised to0/[]increateMetrics().4.
.github/workflows/update-github-repositories-details.ymlIn the "Guard TypeScript repository-count delta" step, add a non-blocking informational log for
missingRepoSkips, and ensure the hard-block only fires ondetailFailures(true structural failures), notmissingRepoSkips. Something like:The existing
detailFailuresblock should remain unchanged — it still blocks if there are genuine hydration errors.5.
Pipeline/tests/providers.test.tsThe existing test
"records a missing-alias error for an absent alias in the GraphQL response with no errors"should still pass — the error value it checks just now carries the extraisMissingAliasproperty, so no test changes are needed there. However, add a test that verifies the tagged property is present:6.
Pipeline/tests/generator.test.tsAdd a test for the new branch:
isMissingAlias: truefor one repometrics.missingRepoSkips === 1metrics.detailFailures === 0Acceptance Criteria
isMissingAlias: trueis set on the error recorded inproviders.tsfor the absent-alias casePipelineMetricshasmissingRepoSkips: numberandmissingRepoSkipNames: string[]isMissingAliaserrors tomissingRepoSkips, notdetailFailures::warning::(not::error::) formissingRepoSkips > 0and does not add it toblockingFailuresisMissingAliaspath in both provider and generatorThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: Investigate, explain and propose a plan to fix the error in the following github workflow run: https://github.com/rpothin/PowerPlatform-OpenSource-Hub/actions/runs/26032659964/job/76522433000
Assistant: Here's a full breakdown of what happened, why it failed, and how to fix it.
🔍 What Failed
The wor...
This pull request was created from Copilot chat.