Skip to content

fix: use v3 verification aggregation tables in keys overview#5228

Merged
Flo4604 merged 1 commit intomainfrom
fix/keys-use-v3-verification-tables
Mar 9, 2026
Merged

fix: use v3 verification aggregation tables in keys overview#5228
Flo4604 merged 1 commit intomainfrom
fix/keys-use-v3-verification-tables

Conversation

@Flo4604
Copy link
Member

@Flo4604 Flo4604 commented Mar 6, 2026

What does this PR do?

Updates ClickHouse queries to use the key_verifications_per_hour_v3 table instead of key_verifications_per_hour_v2 in the keys overview functionality. This change affects two queries that retrieve key verification logs and aggregate verification counts by outcome.

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps us understand why this PR exists

Type of change

  • 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?

  • Verify that key verification logs are still displayed correctly in the keys overview
  • Confirm that key verification counts and outcomes are properly aggregated
  • Test that the queries execute successfully against the v3 table schema

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
  • Ran make fmt on /go directory
  • 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

@vercel
Copy link

vercel bot commented Mar 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Mar 6, 2026 6:27pm

Request Review

Copy link
Member Author

Flo4604 commented Mar 6, 2026

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1c479bc4-fefe-42e5-a94f-b9323efbf878

📥 Commits

Reviewing files that changed from the base of the PR and between ca7cdca and 02655e5.

📒 Files selected for processing (1)
  • web/internal/clickhouse/src/keys/keys.ts

📝 Walkthrough

Walkthrough

Updates table references in SQL queries from hourly verification table v2 to v3 within the getKeysOverviewLogs function. The change affects aggregated/hourly data queries without modifying control flow or result shaping.

Changes

Cohort / File(s) Summary
Table Version Updates
web/internal/clickhouse/src/keys/keys.ts
Updated two SQL query blocks in getKeysOverviewLogs to reference hourly verification table v3 instead of v2.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating ClickHouse queries to use v3 verification aggregation tables in the keys overview functionality.
Description check ✅ Passed The description covers the main change, includes testing instructions, and provides a Type of change selection, but the issue reference and several required checklist items are not marked complete.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/keys-use-v3-verification-tables

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

@Flo4604 Flo4604 marked this pull request as ready for review March 6, 2026 20:55
@Flo4604 Flo4604 added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit 6e65d33 Mar 9, 2026
23 of 24 checks passed
@Flo4604 Flo4604 deleted the fix/keys-use-v3-verification-tables branch March 9, 2026 10:58
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.

3 participants