-
Notifications
You must be signed in to change notification settings - Fork 1
User agent sent to mgmt api #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a new .coderabbit.yaml configuration file. Updates create-db client to send a new userAgent field and fixes utm_source to always use CLI_NAME. Updates the create-db worker to read userAgent from the request body, log it, and forward it as a User-Agent header to Prisma. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
Deploying with
|
Status | Name | Latest Commit | Preview URL | Updated (UTC) |
---|---|---|---|---|
✅ Deployment successful! View logs |
claim-db-worker | 188bba4 | Commit Preview URL Branch Preview URL |
Oct 09 2025, 03:38 PM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
create-db-worker/src/index.ts (2)
112-112
: Consider structured logging instead of console.log.The
console.log
statement is functional for debugging, but consider whether this should use a structured logging approach for production environments, especially if you need to correlate or filter these logs.
118-118
: Consider omitting the User-Agent header when userAgent is falsy.Setting the
User-Agent
header to an empty string whenuserAgent
is undefined or null may not be ideal. Consider conditionally including the header only when a valid value exists.Apply this diff to conditionally include the User-Agent header:
- headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${env.INTEGRATION_TOKEN}`, - 'User-Agent': userAgent || '', - }, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${env.INTEGRATION_TOKEN}`, + ...(userAgent && { 'User-Agent': userAgent }), + },
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.coderabbit.yaml
(1 hunks)create-db-worker/src/index.ts
(2 hunks)create-db/index.js
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
create-db-worker/src/index.ts (1)
create-db/index.js (7)
region
(246-246)region
(264-264)region
(283-283)region
(399-404)region
(657-657)name
(656-656)userAgent
(629-629)
🔇 Additional comments (2)
create-db/index.js (1)
434-435
: LGTM! Coordinated change for user agent tracking.The addition of the
userAgent
field and the standardization ofutm_source
to always useCLI_NAME
aligns with the worker implementation increate-db-worker/src/index.ts
. This ensures consistent tracking and identification data in the create-service requests..coderabbit.yaml (1)
1-23
: LGTM! Valid CodeRabbit configuration.The configuration file is well-formed and all settings are valid according to the CodeRabbit schema. The choices reflect a focused review workflow with minimal distractions (poem, fortune, and art disabled) while maintaining essential features like auto-review and request changes workflow.
✅ Preview CLIs & Workers are live! Test the CLIs locally under tag npx create-db@pr60
npx create-pg@pr60
npx create-postgres@$pr60 Worker URLs
|
Summary by CodeRabbit
New Features
Chores