Removed unused tinybird filters#12
Conversation
📝 WalkthroughWalkthroughThis pull request removes device, browser, and operating system filtering capabilities from multiple Tinybird data pipeline endpoints and their corresponding test suites. The TinybirdService also removes three pipe references and modifies JWT token handling logic. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ghost/core/core/server/services/tinybird/TinybirdService.js (1)
96-104: Critical bug:_serverTokenis assigned the entire tokenData object instead of the token string.This change breaks the token handling:
_generateToken()returns{token, exp}objectthis._serverToken = tokenDatastores the entire object- Line 102 returns
token: this._serverTokenwhich is now an object, not a string- Line 96 passes the object to
_isJWTExpired(), butjwt.decode()expects a string and will failThe return value becomes
{token: {token: "...", exp: ...}, exp: ...}instead of{token: "...", exp: ...}.🐛 Proposed fix
if (!this._serverToken || this._isJWTExpired(this._serverToken)) { const tokenData = this._generateToken({name, expiresInMinutes}); - this._serverToken = tokenData; + this._serverToken = tokenData.token; this._serverTokenExp = tokenData.exp; }
Benchmark PR from agentic-review-benchmarks#12
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.