Skip to content

feat: add rubygems dependent-counts closure variant (CM-1241)#4329

Merged
themarolt merged 9 commits into
mainfrom
fix/rubygems-dependent-counts-CM-1241
Jul 13, 2026
Merged

feat: add rubygems dependent-counts closure variant (CM-1241)#4329
themarolt merged 9 commits into
mainfrom
fix/rubygems-dependent-counts-CM-1241

Conversation

@themarolt

@themarolt themarolt commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

RubyGems packages never got dependent-count fields filled. Dependents reverse
index (source for the existing edge-based path) only covers NPM/MAVEN/PYPI/CARGO
— verified on BQ, no RUBYGEMS rows. Adds a 4th closure variant (mirrors GO/NUGET)
that computes the exact reverse transitive closure from RubyGemsRequirementsLatest.

Changes

  • New rubygems variant in ingestDependentCounts workflow (own job kind, staging table, guard baseline)
  • buildRubygemsDependentCountsSql in dependentCountsSql.ts, reusing the shared closure script
  • Wired into bootstrapOsspckgs, triggerBootstrap, monitorOsspckgs
  • dependent_counts_rubygems added to OsspckgsJobKind
  • README updated with new job kind's byte ceiling

Type of change

  • Bug fix

JIRA ticket

https://linuxfoundation.atlassian.net/browse/CM-1241


Note

Medium Risk
Touches weekly BQ script ingest and merges into packages popularity fields; behavior matches proven GO/NUGET patterns but adds new BigQuery spend and operational surface.

Overview
RubyGems packages can now get dependent_count, transitive_dependent_count, and dependent_repos_count via a fourth ingest path, mirroring GO/NUGET. deps.dev’s Dependents index still excludes RubyGems, so counts come from an exact reverse transitive closure BQ script over RubyGemsRequirementsLatest (RuntimeDependencies only), reusing the shared buildClosureScript / isScript export path.

Wiring adds job kind dependent_counts_rubygems (staging table, 200 GB maximumBytesBilled cap), loops it through bootstrapOsspckgs, triggerBootstrap, and monitorOsspckgs, and documents it in ADR-0004 and the packages_worker README.

The row-count guard now keys Slack guidance off job kind (RubyGemsRequirementsLatest vs Dependents, and no misleading “snapshot date” hint for *Latest manifest kinds).

Reviewed by Cursor Bugbot for commit 6b94574. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings July 13, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds RubyGems reverse dependent-count ingestion using the existing exact closure pipeline.

Changes:

  • Adds the RubyGems SQL closure and workflow variant.
  • Registers the job across bootstrap, CLI, monitoring, and DAL types.
  • Documents the 200 GB billing ceiling.

Reviewed changes

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

Show a summary per file
File Description
ingestJobs.ts Registers the RubyGems job kind.
triggerBootstrap.ts Adds CLI support.
monitorOsspckgs.ts Adds monitoring mapping.
ingestDependentCounts.ts Configures the RubyGems workflow variant.
bootstrapOsspckgs.ts Runs RubyGems during bootstrap.
README.md Documents the job and byte ceiling.
dependentCountsSql.ts Builds the RubyGems reverse closure query.

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

Comment thread services/apps/packages_worker/src/deps-dev/workflows/ingestDependentCounts.ts Outdated
Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings July 13, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread services/apps/packages_worker/src/deps-dev/workflows/ingestDependentCounts.ts Outdated
Copilot AI review requested due to automatic review settings July 13, 2026 10:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings July 13, 2026 10:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings July 13, 2026 11:53

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b9ada52. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings July 13, 2026 12:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

… (CM-1241)

Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings July 13, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread services/apps/packages_worker/src/deps-dev/README.md
@themarolt themarolt requested a review from mbani01 July 13, 2026 12:41
mbani01
mbani01 previously approved these changes Jul 13, 2026
…1241)

Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings July 13, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

@themarolt themarolt merged commit a934419 into main Jul 13, 2026
16 checks passed
@themarolt themarolt deleted the fix/rubygems-dependent-counts-CM-1241 branch July 13, 2026 20:46
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