{{ message }}
[WIP, NO MERGE]: Added Tinybird-backed stats to the automations browse endpoint - #30504
Draft
troyciesco wants to merge 1 commit into
Draft
[WIP, NO MERGE]: Added Tinybird-backed stats to the automations browse endpoint#30504troyciesco wants to merge 1 commit into
troyciesco wants to merge 1 commit into
Conversation
…e endpoint ref https://linear.app/ghost/issue/NY-1560/ghost-backend-conditionally-based-on-feature-flag-populate-stats-from Stacked on NY-1559, which syncs automation runs and steps into Tinybird. This cannot be merged until that lands. - Gates the Tinybird path on the automationRunAnalytics private flag and on Tinybird being configured; otherwise browse behaves exactly as before - Keeps the Tinybird read in the API layer: browse asks the repository for automations without database stats and fetches the api_automation_browse_stats pipe in parallel, then merges by automation id - Reuses the stats service's Tinybird client and the shared service wrapper, so the JWT, site UUID, local mode, and request timeout match web analytics - Validates the pipe response and omits stats entirely when Tinybird is unavailable or returns an unexpected shape, which Admin already handles by hiding the columns - Adds an includeDatabaseStats option to the repository so the expensive MySQL aggregate is skipped when Tinybird supplies the numbers - Covers response parsing with unit tests and the end-to-end path with nock against the real config, wrapper, and request layer
Contributor
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.

ref https://linear.app/ghost/issue/NY-1560
Stacked on NY-1559, which syncs automation runs and steps into Tinybird. This cannot be merged until that lands.
Also note that we may want a different feature flag, so might need to break that out and do it first as well.