Skip to content

Feat/gerrit completeness validator#4053

Draft
mbani01 wants to merge 2 commits intomainfrom
feat/gerrit_completeness_validator
Draft

Feat/gerrit completeness validator#4053
mbani01 wants to merge 2 commits intomainfrom
feat/gerrit_completeness_validator

Conversation

@mbani01
Copy link
Copy Markdown
Contributor

@mbani01 mbani01 commented Apr 23, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 23, 2026 16:55
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

PR titles must follow Conventional Commits. Love from, Your reviewers ❤️.

}

function tinybirdWhereClause(channelUrl: string, segmentId: string, types: string[]): string {
const ch = channelUrl.replace(/'/g, "\\'")

function tinybirdWhereClause(channelUrl: string, segmentId: string, types: string[]): string {
const ch = channelUrl.replace(/'/g, "\\'")
const seg = segmentId.replace(/'/g, "\\'")
segmentId: string,
type: string,
): Promise<Set<string>> {
const ch = channelUrl.replace(/'/g, "\\'")
type: string,
): Promise<Set<string>> {
const ch = channelUrl.replace(/'/g, "\\'")
const seg = segmentId.replace(/'/g, "\\'")
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a one-off validation script to compare Gerrit activity counts between Gerrit’s REST API and Tinybird (with optional patchset validation) and emits a JSON report for debugging completeness issues.

Changes:

  • Introduces validate-gerrit-counts.ts to fetch Gerrit changes/patchsets, compare against Tinybird counts, and optionally compute set diffs.
  • Adds pg-promise to @crowd/nango-worker devDependencies to support the new script.
  • Updates lockfile accordingly.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.

File Description
services/apps/nango_worker/src/bin/validate-gerrit-counts.ts New validator CLI/script that queries Gerrit + Tinybird and writes a diff report.
services/apps/nango_worker/package.json Adds pg-promise (devDependency) to support the new script.
pnpm-lock.yaml Lockfile updates for pg-promise and dependency graph normalization.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 35 to +38
"devDependencies": {
"@types/node": "^20.8.2",
"nodemon": "^3.0.1"
"nodemon": "^3.0.1",
"pg-promise": "^11.4.3"
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

pg-promise is added as a devDependency only to support this script's direct connection usage. If you switch this script to use the existing shared DB helpers (via @crowd/data-access-layer/@crowd/database), this dependency can likely be removed; otherwise consider whether it should be a runtime dependency instead of devDependency.

Copilot uses AI. Check for mistakes.
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.

4 participants