Skip to content

chore: remove the v1 repository health score pipes (IN-1222) - #4923

Closed
gaspergrom wants to merge 1 commit into
chore/IN-1222-remove-health-score-v1-tinybirdfrom
chore/IN-1222-remove-repo-health-score-v1
Closed

gaspergrom wants to merge 1 commit into
chore/IN-1222-remove-health-score-v1-tinybirdfrom
chore/IN-1222-remove-repo-health-score-v1

Conversation

@gaspergrom

@gaspergrom gaspergrom commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Do not merge until Joana Maia confirms consumer sign-off (LFX One, Org Lens, OD, Self Serve, CNCF) and a deprecation date — IN-1222 PRE2/PRE4.

Summary

  • Removes the repo-level v1 pipes: the repo_health_score_copy pipe and its datasource repo_health_score_copy_ds, and the ten signal pipes it joined: repo_health_score_active_contributors, _active_days, _contributions_outside_work_hours, _forks, _issues_resolution, _merge_lead_time, _pull_requests, _retention, _security and _stars.
  • Keeps repo_health_score_contributor_dependency and repo_health_score_organization_dependency. project_insights_copy reads them for repo dependency metrics (crowd.dev PR 1). Keeps repo_health_score_v2_breakdown, the live v2 pipe.
  • Once crowd.dev PR 3 removes the v1 repo columns from project_insights_copy, nothing reads these pipes. No code in crowd.dev, insights or lfx-self-serve references them.
  • Only deletions. No remaining file changes.

Deploy notes

Prerequisites

  • crowd.dev PR 3 is deployed to prod. Until then, project_insights_copy still joins repo_health_score_copy_ds, and removing it fails the copy.
  • The sign-off gate above is cleared.
  • This branch is stacked on crowd.dev PR 3's branch. Retarget to main when PR 3 merges, then rebase.

Steps

Run staging first, then prod. Readers go before writers, and writers before datasources.

Before you remove anything on prod, check who still reads these resources, through endpoints and through direct SQL. Query API calls show up in tinybird.pipe_stats_rt under pipe_name = 'query_api'. Run this with tb sql or in the Tinybird UI:

SELECT pipe_name, token_name, count() AS requests, max(start_datetime) AS last_seen
FROM tinybird.pipe_stats_rt
WHERE start_datetime > now() - INTERVAL 7 DAY
  AND (
    (pipe_name LIKE 'repo_health_score_%'
      AND pipe_name NOT IN ('repo_health_score_contributor_dependency', 'repo_health_score_organization_dependency', 'repo_health_score_v2_breakdown'))
    OR (pipe_name = 'query_api' AND parameters['q'] ILIKE '%repo_health_score_copy_ds%')
  )
GROUP BY pipe_name, token_name
ORDER BY requests DESC

Ignore rows from your own token. On 2026-10-12 the analyst token admin sboysel@linuxfoundation.org had run 130 Query API reads of repo_health_score_copy_ds in 7 days. Coordinate with that user first, and don't run tb datasource rm repo_health_score_copy_ds until they confirm they no longer need it. Any other caller: stop and ask.

tb pipe rm repo_health_score_copy --yes
tb datasource rm repo_health_score_copy_ds --yes
tb pipe rm repo_health_score_active_contributors --yes
tb pipe rm repo_health_score_active_days --yes
tb pipe rm repo_health_score_contributions_outside_work_hours --yes
tb pipe rm repo_health_score_forks --yes
tb pipe rm repo_health_score_issues_resolution --yes
tb pipe rm repo_health_score_merge_lead_time --yes
tb pipe rm repo_health_score_pull_requests --yes
tb pipe rm repo_health_score_retention --yes
tb pipe rm repo_health_score_security --yes
tb pipe rm repo_health_score_stars --yes

Deleting the files does not remove live pipes or datasources. The commands above do.

After the removals, check with tb pipe ls and tb datasource ls that none of the twelve remain. repo_health_score_contributor_dependency, repo_health_score_organization_dependency and repo_health_score_v2_breakdown must still exist. The next project_insights_copy run should finish, and the repo dependency sums should stay non-zero. The copy job's dependency guard enforces that.

Cross-repo order

crowd.dev PR 1 is already live, and insights PR 1 deploys after it.

  1. lf-dbt PR 1
  2. lf-dbt PR 2
  3. Sign-off gate, then insights PR 2
  4. lf-dbt PR 3
  5. lf-dbt PR 4
  6. crowd.dev PR 2
  7. crowd-kube connector change (human)
  8. Snowflake DROPs (human)
  9. crowd.dev PR 3
  10. insights PR 3: remove transitional v1 compatibility (chore: remove transitional health score v1 compatibility insights#2376, gated)
  11. crowd.dev PR 4 (this PR)

What breaks if out of order

  • Before crowd.dev PR 3 is deployed: project_insights_copy still joins repo_health_score_copy_ds. Removing that datasource makes the copy job fail, and the project and repo snapshot stops refreshing.

Related PRs

  • crowd.dev PR 1: add health score v2 to project lists and re-source dependency metrics (live)
  • crowd.dev PR 2: remove the v1 health score Snowflake sink (gated)
  • crowd.dev PR 3: remove v1 health score computation and columns from Tinybird (gated)
  • insights PR 1: show health score v2 in the open source index
  • insights PR 2: remove health score v1 fields and routes (gated)
  • lf-dbt PR 1: expose the v2 sink leg marker on gold project health metrics
  • lf-dbt PR 2: source health score v2 columns from the v2 sink
  • lf-dbt PR 3: drop v1 health score columns from gold, platinum and silver dim (gated)
  • lf-dbt PR 4: remove the v1 health score sink source and silver leg (gated)
  • lfx-self-serve PR (This is a test issue #3465): remove the v1 health band shim
  • crowd-kube connector change: removing the sink topic from the Snowflake connector is a human step (crowd-kube connector runbook, gated). No PR exists yet; the human opens one during that runbook. crowd-kube Add links to dashboard sentiment widget #205 is docs only.

JIRA

IN-1222: Deprecate v1 health score sinks and tables
https://linuxfoundation.atlassian.net/browse/IN-1222

Copilot AI balanced review requested due to automatic review settings October 12, 2026 20:46

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.

🔵 Needs a closer look

Destructive production removal remains explicitly gated on consumer sign-off and deployment of the prerequisite PR.

0 open findings

What changed in this PR

Removes deprecated v1 repository health-score Tinybird resources after migration to v2.

Changes:

  • Deletes the v1 aggregate copy pipe and datasource.
  • Deletes ten obsolete signal pipes.
  • Preserves dependency metrics and the v2 breakdown pipe.
File Description
repo_health_score_stars.pipe Removes v1 stars scoring.
repo_health_score_security.pipe Removes v1 security scoring.
repo_health_score_retention.pipe Removes v1 retention scoring.
repo_health_score_pull_requests.pipe Removes v1 PR scoring.
repo_health_score_merge_lead_time.pipe Removes v1 merge-time scoring.
repo_health_score_issues_resolution.pipe Removes v1 issue-resolution scoring.
repo_health_score_forks.pipe Removes v1 forks scoring.
repo_health_score_copy.pipe Removes the v1 aggregation copy job.
repo_health_score_contributions_outside_work_hours.pipe Removes v1 work-hours scoring.
repo_health_score_active_days.pipe Removes v1 active-days scoring.
repo_health_score_active_contributors.pipe Removes v1 contributor scoring.
repo_health_score_copy_ds.datasource Removes the v1 materialized datasource definition.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Delete repo_health_score_copy, repo_health_score_copy_ds and the ten repo_health_score_<signal>
pipes behind them. repo_health_score_contributor_dependency and
repo_health_score_organization_dependency stay: project_insights_copy joins them for the
repository dependency metrics. repo_health_score_v2_breakdown is the live v2 pipe and is untouched.

Deleting the files does not remove the live resources: see the removal runbook in the PR.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
@gaspergrom
gaspergrom force-pushed the chore/IN-1222-remove-health-score-v1-tinybird branch from fc35762 to 4d043c4 Compare October 12, 2026 22:42
@gaspergrom
gaspergrom force-pushed the chore/IN-1222-remove-repo-health-score-v1 branch from 2ae42fa to 72205f6 Compare October 12, 2026 22:42
@gaspergrom

Copy link
Copy Markdown
Contributor Author

Closing for now: org-dashboard still reads the v1 health score (/api/project?healthScore=true) and will keep running until it is retired, expected early November 2026. Reopen and rebase this once org-dashboard is shut down. The branch is kept.

@gaspergrom gaspergrom closed this Oct 15, 2026
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.

2 participants