Skip to content

Added analytics-service tinybird token#27495

Merged
cmraible merged 1 commit into
mainfrom
add-analytics-service-token-tinybird
Apr 21, 2026
Merged

Added analytics-service tinybird token#27495
cmraible merged 1 commit into
mainfrom
add-analytics-service-token-tinybird

Conversation

@cmraible
Copy link
Copy Markdown
Collaborator

@cmraible cmraible commented Apr 21, 2026

This should have no user-facing impact.

Adding a new analytics-service Tinybird token with append scopes to our Tinybird workspace. This will allow the analytics service to send events to Tinybird.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Walkthrough

This pull request adds a new Tinybird token configuration across two datasource files. The TOKEN "analytics-service" APPEND token is introduced in both analytics_events.datasource and analytics_events_test.datasource, alongside the existing TOKEN "tracker" APPEND configuration. The schema definitions, query configurations, and engine settings remain unchanged. Each file receives one line addition with no removals, representing minimal modifications to extend the available write credentials for these datasources.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Added analytics-service tinybird token' accurately summarizes the main change: adding a new Tinybird token for the analytics-service to the datasources.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding the analytics-service token and clarifying there is no user-facing impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-analytics-service-token-tinybird

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cmraible cmraible force-pushed the add-analytics-service-token-tinybird branch from 83e5597 to 0322f38 Compare April 21, 2026 20:37
@sonarqubecloud
Copy link
Copy Markdown

@cmraible cmraible marked this pull request as ready for review April 21, 2026 20:44
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@ghost/core/core/server/data/tinybird/datasources/analytics_events.datasource`:
- Line 2: The datasource adds TOKEN "analytics-service" APPEND but there is no
provisioning or usage; add creation of an "analytics-service" token with APPEND
permissions in the Tinybird provisioning logic (extend the token creation
block/function in docker-analytics-manager.js — e.g., in the existing
create/provisionTinybirdTokens or TINYBIRD_ADMIN_TOKEN/TINYBIRD_TRACKER_TOKEN
flow, add creation of TINYBIRD_ANALYTICS_SERVICE_TOKEN), expose that token via
configuration (add TINYBIRD_ANALYTICS_SERVICE_TOKEN as an env var or Docker
volume provisioning alongside the existing tokens), and update ghost-stats.js to
read and use that token when contacting Tinybird or allow the analytics service
to set it (check or add code paths in ghost-stats.js to prefer
process.env.TINYBIRD_ANALYTICS_SERVICE_TOKEN or a runtime-exposed token setter
from the analytics service). Ensure the token name matches TOKEN
"analytics-service" and that created token has APPEND scope.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1339dd69-bf12-4a41-b9f3-1501552202bc

📥 Commits

Reviewing files that changed from the base of the PR and between 3a030fd and 0322f38.

📒 Files selected for processing (2)
  • ghost/core/core/server/data/tinybird/datasources/analytics_events.datasource
  • ghost/core/core/server/data/tinybird/datasources/analytics_events_test.datasource

@EvanHahn EvanHahn removed their request for review April 21, 2026 20:49
@cmraible cmraible enabled auto-merge (squash) April 21, 2026 20:52
@cmraible cmraible merged commit 182b934 into main Apr 21, 2026
41 checks passed
@cmraible cmraible deleted the add-analytics-service-token-tinybird branch April 21, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants