fix: gnore weird transient packages#4176
Merged
Merged
Conversation
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Contributor
|
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. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the deps.dev BigQuery ingest in packages_worker to ignore “weird transient” package rows by filtering out package/version records whose Name contains > (and, for incremental diffs, ensuring watermark comparisons don’t reintroduce excluded rows).
Changes:
- Added
AND Name NOT LIKE '%>%'across deps.dev package/version export queries (full + incremental) and in thepurl_mapCTEs used by repo/count/advisory-related exports. - Added
Purl IS NOT NULLto incremental watermark lookups for packages/versions to keep day-over-day diffs consistent with the new inclusion criteria.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| services/apps/packages_worker/src/deps-dev/queries/versionsSql.ts | Filters out Name values containing > in both full and incremental (today + watermark) version exports. |
| services/apps/packages_worker/src/deps-dev/queries/packagesSql.ts | Filters out Name values containing > in both full and incremental (today + watermark) package exports. |
| services/apps/packages_worker/src/deps-dev/queries/packageReposSql.ts | Applies the same name filter in the purl_map used for package→repo mapping. |
| services/apps/packages_worker/src/deps-dev/queries/dependentCountsSql.ts | Applies the same name filter in the purl_map used for dependents counting. |
| services/apps/packages_worker/src/deps-dev/queries/advisoriesSql.ts | Applies the name filter in the purl_map used to map advisory packages to PURLs (see comment about still exporting rows via LEFT JOIN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Uroš Marolt <uros@marolt.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Type of change
JIRA ticket
Note
Low Risk
Query-only data filtering for ingestion; no auth or runtime logic, with a small chance of omitting rare valid names that contain
>.Overview
Filters deps.dev BigQuery ingest queries so rows with package
Namecontaining>are excluded everywhere packages are resolved or exported (packages, versions, advisories, dependent counts, package repos). The same predicate is applied topurl_mapjoins and, for advisories, to unnestedpkg.Namerows.Incremental packages and versions watermark CTEs now also require
Purl IS NOT NULLand theName NOT LIKE '%>%'filter, matching the main snapshot queries.Risk: Legitimate packages whose deps.dev name includes
>would no longer be ingested; that pattern is treated as transient/noise data.Reviewed by Cursor Bugbot for commit 8b60a76. Bugbot is set up for automated code reviews on this repo. Configure here.