Skip to content

fix: cast JSON for interpolate params#3492

Merged
chronark merged 1 commit intomainfrom
fix/nullable_json_issues
Jul 9, 2025
Merged

fix: cast JSON for interpolate params#3492
chronark merged 1 commit intomainfrom
fix/nullable_json_issues

Conversation

@Flo4604
Copy link
Member

@Flo4604 Flo4604 commented Jul 9, 2025

What does this PR do?

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

Run tests

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of identity metadata to ensure it is always stored as a valid empty JSON object when not provided, rather than as a null value.
  • Refactor

    • Updated internal data handling to explicitly treat certain fields as JSON, enhancing consistency and reliability when processing metadata.
  • Tests

    • Adjusted test cases to align with the new metadata handling, ensuring all test identities use an explicit empty JSON object for metadata.

@vercel vercel bot temporarily deployed to Preview – dashboard July 9, 2025 09:28 Inactive
@vercel
Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 9:28am
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 9:28am

@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2025

⚠️ No Changeset found

Latest commit: f226b10

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

📝 Walkthrough

Walkthrough

The changes update the handling of JSON fields in the database for identities and audit logs. SQL statements and Go struct fields are modified to explicitly cast relevant parameters as JSON and use json.RawMessage instead of []byte. Tests and handler logic are updated to use empty JSON objects instead of nil for metadata fields.

Changes

File(s) Change Summary
go/pkg/db/queries/identity_insert.sql, go/pkg/db/queries/identity_update.sql, ... (other SQL) SQL insert/update statements for meta and actor_meta fields now use CAST(... AS JSON) for explicit JSON typing
go/pkg/db/identity_insert.sql_generated.go, go/pkg/db/identity_update.sql_generated.go Struct fields for Meta changed from []byte to json.RawMessage and import of encoding/json added
go/pkg/db/audit_log_insert.sql_generated.go, go/pkg/db/audit_log_target_insert.sql_generated.go Struct fields for ActorMeta and Meta changed from []byte to json.RawMessage
go/pkg/db/querier_generated.go SQL query comments updated to show explicit JSON casting in relevant methods
go/apps/api/routes/v2_identities_create_identity/handler.go Default meta value changed from nil to []byte("{}") for empty metadata
go/apps/api/routes/v2_identities_create_identity/200_test.go, ... (other test files) Test setups updated to use []byte("{}") for Meta field instead of nil
go/pkg/testutil/containers/mysql.go MySQL config updated to enable parameter interpolation (InterpolateParams = true)

Sequence Diagram(s)

sequenceDiagram
    participant API Handler
    participant DB Layer
    participant MySQL

    API Handler->>DB Layer: Prepare Insert/Update with Meta as json.RawMessage
    DB Layer->>MySQL: Execute SQL with CAST(? AS JSON) for meta fields
    MySQL-->>DB Layer: Store/retrieve meta as JSON type
    DB Layer-->>API Handler: Return operation result
Loading

Suggested reviewers

  • perkinsjr
  • mcstepp

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0dd195e and f226b10.

📒 Files selected for processing (22)
  • go/apps/api/routes/v2_identities_create_identity/200_test.go (2 hunks)
  • go/apps/api/routes/v2_identities_create_identity/handler.go (1 hunks)
  • go/apps/api/routes/v2_identities_delete_identity/200_test.go (2 hunks)
  • go/apps/api/routes/v2_identities_delete_identity/403_test.go (1 hunks)
  • go/apps/api/routes/v2_identities_delete_identity/404_test.go (4 hunks)
  • go/apps/api/routes/v2_identities_get_identity/200_test.go (6 hunks)
  • go/apps/api/routes/v2_identities_get_identity/403_test.go (2 hunks)
  • go/apps/api/routes/v2_identities_get_identity/404_test.go (1 hunks)
  • go/apps/api/routes/v2_identities_list_identities/403_test.go (3 hunks)
  • go/apps/api/routes/v2_identities_list_identities/cross_workspace_test.go (1 hunks)
  • go/apps/api/routes/v2_identities_update_identity/200_test.go (1 hunks)
  • go/apps/api/routes/v2_identities_update_identity/403_test.go (1 hunks)
  • go/pkg/db/audit_log_insert.sql_generated.go (3 hunks)
  • go/pkg/db/audit_log_target_insert.sql_generated.go (3 hunks)
  • go/pkg/db/identity_insert.sql_generated.go (3 hunks)
  • go/pkg/db/identity_update.sql_generated.go (1 hunks)
  • go/pkg/db/querier_generated.go (4 hunks)
  • go/pkg/db/queries/audit_log_insert.sql (1 hunks)
  • go/pkg/db/queries/audit_log_target_insert.sql (1 hunks)
  • go/pkg/db/queries/identity_insert.sql (1 hunks)
  • go/pkg/db/queries/identity_update.sql (1 hunks)
  • go/pkg/testutil/containers/mysql.go (1 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/pkg/db/queries/audit_log_insert.sql (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/pkg/db/queries/identity_insert.sql (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/apps/api/routes/v2_identities_list_identities/cross_workspace_test.go (2)
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#2872
File: apps/dashboard/lib/trpc/routers/ratelimit/createNamespace.ts:36-39
Timestamp: 2025-04-08T09:34:24.576Z
Learning: In the Unkey dashboard, when making database queries involving workspaces, use `ctx.workspace.id` directly instead of fetching the workspace separately for better performance and security.
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#2872
File: apps/dashboard/lib/trpc/routers/ratelimit/createNamespace.ts:36-39
Timestamp: 2025-04-08T09:34:24.576Z
Learning: When querying or updating namespaces in the Unkey dashboard, always scope the operations to the current workspace using `eq(table.workspaceId, ctx.workspace.id)` to prevent cross-workspace access.
go/apps/api/routes/v2_identities_delete_identity/200_test.go (1)
Learnt from: Flo4604
PR: unkeyed/unkey#3151
File: go/apps/api/openapi/gen.go:221-233
Timestamp: 2025-04-18T20:01:33.812Z
Learning: For identity deletion operations in the Unkey API, identityId takes precedence over externalId when both are provided in the request body.
go/apps/api/routes/v2_identities_create_identity/200_test.go (1)
Learnt from: chronark
PR: unkeyed/unkey#2832
File: go/cmd/api/main.go:88-88
Timestamp: 2025-01-24T08:55:18.790Z
Learning: The metrics middleware in the API v2 implementation is intentionally initialized with nil configuration during development, with the understanding that proper configuration will be added before production deployment.
go/pkg/db/queries/audit_log_target_insert.sql (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/pkg/db/queries/identity_update.sql (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/apps/api/routes/v2_identities_create_identity/handler.go (1)
Learnt from: chronark
PR: unkeyed/unkey#2832
File: go/cmd/api/main.go:88-88
Timestamp: 2025-01-24T08:55:18.790Z
Learning: The metrics middleware in the API v2 implementation is intentionally initialized with nil configuration during development, with the understanding that proper configuration will be added before production deployment.
go/apps/api/routes/v2_identities_get_identity/200_test.go (1)
Learnt from: chronark
PR: unkeyed/unkey#2832
File: go/cmd/api/main.go:88-88
Timestamp: 2025-01-24T08:55:18.790Z
Learning: The metrics middleware in the API v2 implementation is intentionally initialized with nil configuration during development, with the understanding that proper configuration will be added before production deployment.
go/pkg/db/querier_generated.go (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/pkg/db/identity_insert.sql_generated.go (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
go/pkg/db/audit_log_target_insert.sql_generated.go (2)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-09T08:42:29.305Z
Learning: Applies to go/deploy/{assetmanagerd,billaged,builderd,metald}/**/*.go : When a service's `*.go` code changes significantly, increase the patch-level version number.
go/pkg/db/identity_update.sql_generated.go (1)
Learnt from: chronark
PR: unkeyed/unkey#3420
File: go/pkg/hydra/store/gorm/gorm.go:486-498
Timestamp: 2025-07-02T11:51:58.572Z
Learning: The Hydra package (go/pkg/hydra) is planned to be migrated from GORM to sqlc for database operations, which explains why raw SQL queries are acceptable in the current implementation.
🧬 Code Graph Analysis (3)
go/apps/api/routes/v2_identities_update_identity/403_test.go (1)
go/apps/api/openapi/gen.go (1)
  • Meta (371-374)
go/apps/api/routes/v2_identities_get_identity/404_test.go (1)
go/apps/api/openapi/gen.go (1)
  • Meta (371-374)
go/pkg/db/audit_log_target_insert.sql_generated.go (1)
go/apps/api/openapi/gen.go (1)
  • Meta (371-374)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: Test Go API Local / Test (Shard 7/8)
  • GitHub Check: Test Go API Local / Test (Shard 4/8)
  • GitHub Check: Test Go API Local / Test (Shard 5/8)
  • GitHub Check: Test Go API Local / Test (Shard 8/8)
  • GitHub Check: Test Go API Local / Test (Shard 3/8)
  • GitHub Check: Test Go API Local / Test (Shard 1/8)
  • GitHub Check: Test Go API Local / Test (Shard 6/8)
  • GitHub Check: Test Go API Local / Test (Shard 2/8)
  • GitHub Check: Test Agent Local / test_agent_local
  • GitHub Check: Test API / API Test Local
  • GitHub Check: Build / Build
  • GitHub Check: Test Packages / Test ./internal/clickhouse
  • GitHub Check: Test Packages / Test ./packages/cache
  • GitHub Check: Test Packages / Test ./internal/keys
  • GitHub Check: autofix
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: goreleaser
🔇 Additional comments (35)
go/pkg/testutil/containers/mysql.go (1)

108-108: Enable parameter interpolation for JSON casting support.

Good addition! This setting enables parameter interpolation in the MySQL driver, which is essential for the JSON casting functionality introduced in this PR. The InterpolateParams = true configuration allows the driver to properly handle the CAST(? AS JSON) statements in the SQL queries.

go/apps/api/routes/v2_identities_update_identity/200_test.go (1)

78-78: Consistent JSON metadata initialization for testing.

Good change! Using []byte("{}") instead of nil ensures that the Meta field always contains valid JSON, which is required for the new CAST(? AS JSON) statements in the SQL queries. This maintains consistency with the JSON casting fixes across the codebase.

go/pkg/db/queries/identity_insert.sql (1)

15-15: Explicit JSON casting for proper parameter interpolation.

Excellent fix! The explicit CAST(sqlc.arg('meta') AS JSON) ensures that the meta parameter is properly treated as JSON data during insertion. This is essential for the parameter interpolation to work correctly with JSON columns and addresses the core issue described in the PR title.

go/pkg/db/queries/audit_log_insert.sql (1)

30-30: Consistent JSON casting for audit log metadata.

Perfect! The explicit CAST(sqlc.arg(actor_meta) AS JSON) maintains consistency with the JSON casting pattern applied throughout the codebase. This ensures that the actor_meta field is properly handled as JSON data during audit log insertion, supporting the parameter interpolation fixes.

go/apps/api/routes/v2_identities_list_identities/cross_workspace_test.go (1)

63-63: Ensure valid JSON for cross-workspace testing.

Good change! Using []byte("{}") instead of nil ensures the Meta field contains valid JSON, which is required for the new CAST(? AS JSON) statements in the database queries. This maintains consistency with the JSON casting fixes across all test files.

go/apps/api/routes/v2_identities_get_identity/403_test.go (1)

55-55: Consistent JSON initialization in test data.

The change from nil to []byte("{}") for the Meta field aligns with the broader JSON typing improvements. This ensures test data consistently uses valid JSON objects, supporting the database-level JSON casting changes.

Also applies to: 67-67

go/apps/api/routes/v2_identities_update_identity/403_test.go (1)

92-92: Consistent JSON initialization in test data.

The change from nil to []byte("{}") for the Meta field maintains consistency with the broader JSON typing improvements across the codebase.

go/apps/api/routes/v2_identities_delete_identity/200_test.go (1)

34-34: Consistent JSON initialization in helper function and test case.

The changes from nil to []byte("{}") for the Meta field in both the createTestIdentity helper function and the duplicate key error handling test case ensure consistent JSON object initialization across all test scenarios.

Also applies to: 273-273

go/apps/api/routes/v2_identities_list_identities/403_test.go (1)

50-50: Consistent JSON initialization across all environments.

The changes from nil to []byte("{}") for the Meta field across all three environment-specific identity insertions (default, production, staging) ensure consistent JSON object initialization regardless of environment context.

Also applies to: 62-62, 74-74

go/pkg/db/queries/audit_log_target_insert.sql (1)

22-22: Explicit JSON casting ensures proper database handling.

The change from sqlc.arg(meta) to CAST(sqlc.arg(meta) AS JSON) directly addresses the PR objective by explicitly casting the meta parameter to JSON type. This ensures the database properly handles the meta field as JSON data, supporting the broader JSON typing improvements across the application.

go/apps/api/routes/v2_identities_create_identity/handler.go (1)

85-85: Good improvement for JSON field consistency!

Initializing meta with an empty JSON object []byte("{}") instead of a nil slice ensures that the database always receives valid JSON data, even when req.Meta is nil. This aligns well with the SQL changes that explicitly cast the parameter as JSON.

go/apps/api/routes/v2_identities_delete_identity/403_test.go (1)

97-97: Consistent test data initialization.

Updating the test to use []byte("{}") instead of nil for the Meta field ensures consistency with the new JSON handling approach throughout the codebase.

go/apps/api/routes/v2_identities_get_identity/404_test.go (1)

80-80: Consistent test data initialization.

Using []byte("{}") instead of nil for the Meta field maintains consistency with the updated JSON handling approach across the codebase.

go/apps/api/routes/v2_identities_create_identity/200_test.go (2)

47-47: Consistent test data initialization.

Using []byte("{}") instead of nil for the Meta field aligns with the updated JSON handling approach where JSON fields are consistently initialized with valid JSON objects.


69-69: Consistent test data initialization.

Using []byte("{}") instead of nil for the Meta field maintains consistency with the updated JSON handling approach across the codebase.

go/pkg/db/queries/identity_update.sql (1)

4-4: Excellent addition of explicit JSON casting.

Adding CAST(sqlc.arg('meta') AS JSON) ensures that the database validates and properly stores JSON data, preventing potential issues with invalid JSON being stored. This change, combined with the handler improvements that ensure valid JSON objects are always passed, creates a robust JSON handling system.

go/apps/api/routes/v2_identities_delete_identity/404_test.go (1)

74-74: LGTM: Consistent JSON metadata initialization.

The changes properly initialize the Meta field with an empty JSON object ([]byte("{}")) instead of nil. This aligns with the database layer changes that now enforce JSON typing and ensures test data consistency.

Also applies to: 118-118, 153-153, 201-201

go/apps/api/routes/v2_identities_get_identity/200_test.go (1)

174-174: LGTM: Consistent JSON metadata initialization across test cases.

The changes properly initialize the Meta field with empty JSON objects ([]byte("{}")) instead of nil across all test scenarios. This ensures compatibility with the updated database layer that now enforces JSON typing.

Also applies to: 209-209, 243-243, 377-377, 457-457, 494-494

go/pkg/db/audit_log_insert.sql_generated.go (3)

11-11: LGTM: Added JSON import for RawMessage type support.

The addition of the encoding/json import is necessary to support the json.RawMessage type used in the struct fields.


43-43: LGTM: Explicit JSON casting in SQL query.

The change from ? to CAST(? AS JSON) ensures proper JSON type handling in the database, preventing potential interpolation issues with JSON parameters.

Also applies to: 95-95


61-61: LGTM: Improved type safety with json.RawMessage.

Changing ActorMeta from []byte to json.RawMessage provides better type safety and semantic clarity for JSON data handling.

go/pkg/db/audit_log_target_insert.sql_generated.go (3)

11-11: LGTM: Added JSON import for RawMessage type support.

The addition of the encoding/json import is necessary to support the json.RawMessage type used in the struct fields.


35-35: LGTM: Explicit JSON casting in SQL query.

The change from ? to CAST(? AS JSON) ensures proper JSON type handling in the database, preventing potential interpolation issues with JSON parameters.

Also applies to: 75-75


49-49: LGTM: Improved type safety with json.RawMessage.

Changing Meta from []byte to json.RawMessage provides better type safety and semantic clarity for JSON data handling.

go/pkg/db/identity_update.sql_generated.go (3)

10-10: LGTM: Added JSON import for RawMessage type support.

The addition of the encoding/json import is necessary to support the json.RawMessage type used in the struct fields.


16-16: LGTM: Explicit JSON casting in SQL query.

The change from meta = ? to meta = CAST(? AS JSON) ensures proper JSON type handling in the database, preventing potential interpolation issues with JSON parameters.

Also applies to: 31-31


23-23: LGTM: Improved type safety with json.RawMessage.

Changing Meta from []byte to json.RawMessage provides better type safety and semantic clarity for JSON data handling.

go/pkg/db/identity_insert.sql_generated.go (4)

10-10: Appropriate import addition for JSON handling.

The addition of the encoding/json import is correct and necessary for the json.RawMessage type used in the struct definition.


27-27: Excellent improvement with explicit JSON casting.

The change from a simple parameter placeholder to CAST(? AS JSON) ensures that the database validates the JSON format at insertion time, which helps catch malformed JSON early and prevents potential data corruption.


37-37: Proper type change to json.RawMessage.

The change from []byte to json.RawMessage is the idiomatic Go approach for handling JSON data that doesn't require immediate unmarshaling. This type provides better type safety and makes the intent clearer.


55-55: Documentation updated to reflect SQL changes.

The comment correctly reflects the updated SQL query with the JSON casting, maintaining consistency between the documentation and the actual implementation.

go/pkg/db/querier_generated.go (4)

399-399: SQL documentation updated for InsertAuditLog.

The comment correctly reflects the explicit JSON casting for the actor_meta parameter, ensuring the documentation matches the actual SQL implementation.


425-425: SQL documentation updated for InsertAuditLogTarget.

The comment correctly reflects the explicit JSON casting for the meta parameter, maintaining consistency with the actual SQL implementation.


478-478: SQL documentation updated for InsertIdentity.

The comment correctly reflects the explicit JSON casting for the meta parameter, which aligns with the changes made in the corresponding generated SQL file.


1020-1020: SQL documentation updated for UpdateIdentity.

The comment correctly reflects the explicit JSON casting for the meta parameter during updates, ensuring consistency across all identity-related operations.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2025

Thank you for following the naming conventions for pull request titles! 🙏

@graphite-app
Copy link

graphite-app bot commented Jul 9, 2025

Movie gif. Actor Chow Yun-fat leans out of a doorway casually chewing while giving a cool, confident thumbs-up of approval. (Added via Giphy)

@Flo4604 Flo4604 added this pull request to the merge queue Jul 9, 2025
@graphite-app
Copy link

graphite-app bot commented Jul 9, 2025

Graphite Automations

"Post a GIF when PR approved" took an action on this PR • (07/09/25)

1 gif was posted to this PR based on Andreas Thomas's automation.

@chronark chronark removed this pull request from the merge queue due to a manual request Jul 9, 2025
@chronark chronark merged commit 6a28e31 into main Jul 9, 2025
36 of 41 checks passed
@chronark chronark deleted the fix/nullable_json_issues branch July 9, 2025 09:53
chronark added a commit that referenced this pull request Jul 9, 2025
* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

* feat: onboarding key creation (#3459)

* feat: add new expandable configs

* feat: add form submit with conditionals

* feat: add description for each section and disable form

---------

Co-authored-by: James P <james@unkey.dev>

* refactor: add minimized load more (#3399)

* refactor: add minimized load more

* chore: fmt

* refactor: get rid of useEffect animation

* chore: fmt

* chore: llm search moved to ui (#3409)

* llm search moved with docs and replaced in dashboard

* eng docs change

* [autofix.ci] apply automated fixes

* minor refactor from c-rabbit

* rabbit

* [autofix.ci] apply automated fixes

* rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>

* fix: calendar bug (#3478)

* fix: first time selection

* fix: resetting to initial date of the month

* fix: date validation issue

* fix: day selection by bypassing react-day-picker

* feat: return permission slugs (#3481)

* chore(release): version packages (#3482)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add listPermissions and listRoles (#3483)

* chore(release): version packages (#3484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: Initial implementation of Unkey Deploy (#3488)

* feat: Initial implementation of Unkey Deploy

- Introduce four core services: assetmanagerd, billaged, builderd, metald
- Implement VM lifecycle management with Firecracker/Cloud Hypervisor support
- Add SPIFFE/SPIRE integration for mTLS inter-service communication
- Include systemd service files and CLI tools for each service
- Set up observability with OpenTelemetry and Grafana LGTM stack
- Implement tenant isolation, resource management, and usage billing

Signed-off-by: Ian Meyer <k@imeyer.io>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: cast JSON for interpolate params (#3492)

* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: Oğuzhan Olguncu <21091016+ogzhanolguncu@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>
Co-authored-by: CodeReaper <148160799+MichaelUnkey@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ian Meyer <imeyer@users.noreply.github.com>
Co-authored-by: Flo <53355483+Flo4604@users.noreply.github.com>
chronark added a commit that referenced this pull request Jul 9, 2025
* feat: get rid of testcontainers and just rawdog docker-compose

* feat: onboarding key creation (#3459)

* feat: add new expandable configs

* feat: add form submit with conditionals

* feat: add description for each section and disable form

---------

Co-authored-by: James P <james@unkey.dev>

* refactor: add minimized load more (#3399)

* refactor: add minimized load more

* chore: fmt

* refactor: get rid of useEffect animation

* chore: fmt

* chore: llm search moved to ui (#3409)

* llm search moved with docs and replaced in dashboard

* eng docs change

* [autofix.ci] apply automated fixes

* minor refactor from c-rabbit

* rabbit

* [autofix.ci] apply automated fixes

* rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>

* fix: calendar bug (#3478)

* fix: first time selection

* fix: resetting to initial date of the month

* fix: date validation issue

* fix: day selection by bypassing react-day-picker

* feat: return permission slugs (#3481)

* chore(release): version packages (#3482)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add listPermissions and listRoles (#3483)

* chore(release): version packages (#3484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: Initial implementation of Unkey Deploy (#3488)

* feat: Initial implementation of Unkey Deploy

- Introduce four core services: assetmanagerd, billaged, builderd, metald
- Implement VM lifecycle management with Firecracker/Cloud Hypervisor support
- Add SPIFFE/SPIRE integration for mTLS inter-service communication
- Include systemd service files and CLI tools for each service
- Set up observability with OpenTelemetry and Grafana LGTM stack
- Implement tenant isolation, resource management, and usage billing

Signed-off-by: Ian Meyer <k@imeyer.io>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: cast JSON for interpolate params (#3492)

* refactor: use docker-compose with testcontainers (#3476)

* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

* feat: onboarding key creation (#3459)

* feat: add new expandable configs

* feat: add form submit with conditionals

* feat: add description for each section and disable form

---------

Co-authored-by: James P <james@unkey.dev>

* refactor: add minimized load more (#3399)

* refactor: add minimized load more

* chore: fmt

* refactor: get rid of useEffect animation

* chore: fmt

* chore: llm search moved to ui (#3409)

* llm search moved with docs and replaced in dashboard

* eng docs change

* [autofix.ci] apply automated fixes

* minor refactor from c-rabbit

* rabbit

* [autofix.ci] apply automated fixes

* rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>

* fix: calendar bug (#3478)

* fix: first time selection

* fix: resetting to initial date of the month

* fix: date validation issue

* fix: day selection by bypassing react-day-picker

* feat: return permission slugs (#3481)

* chore(release): version packages (#3482)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add listPermissions and listRoles (#3483)

* chore(release): version packages (#3484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: Initial implementation of Unkey Deploy (#3488)

* feat: Initial implementation of Unkey Deploy

- Introduce four core services: assetmanagerd, billaged, builderd, metald
- Implement VM lifecycle management with Firecracker/Cloud Hypervisor support
- Add SPIFFE/SPIRE integration for mTLS inter-service communication
- Include systemd service files and CLI tools for each service
- Set up observability with OpenTelemetry and Grafana LGTM stack
- Implement tenant isolation, resource management, and usage billing

Signed-off-by: Ian Meyer <k@imeyer.io>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: cast JSON for interpolate params (#3492)

* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: Oğuzhan Olguncu <21091016+ogzhanolguncu@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>
Co-authored-by: CodeReaper <148160799+MichaelUnkey@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ian Meyer <imeyer@users.noreply.github.com>
Co-authored-by: Flo <53355483+Flo4604@users.noreply.github.com>

* fix: clean up

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: Oğuzhan Olguncu <21091016+ogzhanolguncu@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>
Co-authored-by: CodeReaper <148160799+MichaelUnkey@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ian Meyer <imeyer@users.noreply.github.com>
Co-authored-by: Flo <53355483+Flo4604@users.noreply.github.com>
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