fix(openapi): fetch analyticsdata Discovery from the service host - #1955
Open
smrht wants to merge 1 commit into
Open
fix(openapi): fetch analyticsdata Discovery from the service host#1955smrht wants to merge 1 commit into
smrht wants to merge 1 commit into
Conversation
The central Discovery directory does not list the GA4 Data API, so https://www.googleapis.com/discovery/v1/apis/analyticsdata/v1beta/rest answers 404 and importing the source fails. Route analyticsdata to its own host the way forms, keep and photospicker already are.
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
analyticsdata(the GA4 Data API) is not listed in Google's central Discoverydirectory, so the canonical directory URL answers 404 and importing the source
fails. Route it to its own host, the same override
forms,keepandphotospickeralready use.One line in
GOOGLE_DISCOVERY_SERVICE_OVERRIDES, plus the matching assertions.Linked issue
Related to #1855. That issue asks for full Analytics Admin and Data presets and
notes both should "preserve their service-hosted Discovery URLs" — this PR is
only that Discovery part, which breaks today for anyone adding
analyticsdataas a custom Google OpenAPI source, preset or no preset.
Verification
Both URLs, checked live today:
The 404 body is
{"error":{"code":404,"message":"Requested entity was not found.","status":"NOT_FOUND"}}. The service-hosted document reportsname: analyticsdata,version: v1beta.With the override applied on a self-hosted instance, a GA4 connection resolves
and
analyticsdata.properties.runReportbecomes callable; without it the sourcenever imports.
The added assertions fail on the unpatched map:
and pass with the one-line change (
27 passedacrossdiscovery.test.tsandpresets.test.ts).bun run format:check— all matched files correctly formatted (2061 files)bun run lint— 0 warnings, 0 errorsbun run typecheck— 45/45 tasks successfulbun run test—plugin-openapiandplugin-provider-service-splitgreen (36/36 in the latter). A few
apps/localmigration-recovery andhost-mcpstdio/daemon tests fail in my sandbox, but they fail the sameway on an unmodified checkout of
mainand the failing set changesbetween runs, so they are environmental here rather than caused by this
change. Happy to have CI be the judge.
a pure URL-mapping change covered by the unit assertions above. Glad to
add a scenario if you would prefer one.
Checklist
patchon@executor-js/plugin-openapi).