Feat/track packages#4169
Conversation
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
…n ecosystems Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
PR titles must follow Conventional Commits. Love from, Your reviewers ❤️.
There was a problem hiding this comment.
Pull request overview
Aligns repo “host” identity across the deps.dev ingestion pipeline in packages_worker by switching stored host values from full domains (e.g. github.com) to short forge keys (e.g. github), while keeping canonical_url shapes unchanged.
Changes:
- Update BigQuery export SQL to emit
hostasgithub|gitlab|bitbucketwhile still constructingcanonical_urlwithgithub.com|gitlab.com|bitbucket.org. - Refactor
canonicalRepoUrlto use aDOMAIN_BY_TYPEmapping and base GitHub lowercasing ontype === 'GITHUB'. - Update
parseRepoUrlto map known domains to short forge keys viaHOST_BY_DOMAIN.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/apps/packages_worker/src/deps-dev/queries/reposSql.ts | Exports host as a short forge key, but keeps canonical_url on the public domain. |
| services/apps/packages_worker/src/deps-dev/queries/packageReposSql.ts | Same host canonicalization for package→repo exports; canonical_url remains domain-based. |
| services/apps/packages_worker/src/deps-dev/canonicalRepoUrl.ts | Renames host/domain mapping, adjusts GitHub lowercasing condition, and maps parsed URL hostnames to short keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Changes
Type of change
JIRA ticket
Note
Medium Risk
Changes the
hostvalue stored and used in BQ dedup keys and Postgres ingest; downstream code that assumed full domains inhostcould misbehave, though canonical URLs are unchanged.Overview
Aligns repo host identity across the packages worker so BigQuery, TypeScript helpers, and ingestion all use short forge keys (
github,gitlab,bitbucket) while canonical URLs still usehttps://{domain}/{path}.In
canonicalRepoUrl, domain lookup is renamed toDOMAIN_BY_TYPE, GitHub lowercasing keys offtype === 'GITHUB'instead of comparing the domain string, andparseRepoUrlnow maps known hostnames to those short keys viaHOST_BY_DOMAIN(unknown hosts still pass through as the URL hostname).packageReposSqlandreposSqlcomputehostas the short key in intermediate CTEs and only expand togithub.com/gitlab.com/bitbucket.orgwhen buildingcanonical_url, so dedup/partitioning onhostmatches what lands in staging/merge columns without changing URL shape.Reviewed by Cursor Bugbot for commit f68973c. Bugbot is set up for automated code reviews on this repo. Configure here.