From 43a8284ff61c5ea5a3aecd93281155acb4fe9cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Fri, 25 Sep 2026 10:40:32 +0200 Subject: [PATCH 1/3] fix: rename stars_cumulative_count's terminal node to avoid pipe/node name collision (CM-1785) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tb push rejects a node with the exact same name as its pipe - "Nodes can't have the same exact name as the Pipe they belong to." This pipe's last node was named stars_cumulative_count, identical to the pipe file, so it never actually deployed until now. Renamed to stars_cumulative_count_final, matching the convention every other multi-node pipe in this repo already follows (e.g. activities_count.pipe's activity_count_merged, activities_cumulative_count.pipe's cumulative_activity_count). No other file references the node by name - cross-pipe callers (stars_count.pipe's stars_count_bucketed) resolve by pipe name, not node name, so they're unaffected. Signed-off-by: Uroš Marolt --- services/libs/tinybird/pipes/stars_cumulative_count.pipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/libs/tinybird/pipes/stars_cumulative_count.pipe b/services/libs/tinybird/pipes/stars_cumulative_count.pipe index 82b28e32a1..5ca76b1aab 100644 --- a/services/libs/tinybird/pipes/stars_cumulative_count.pipe +++ b/services/libs/tinybird/pipes/stars_cumulative_count.pipe @@ -340,7 +340,7 @@ SQL > {% else %} SELECT toDate(now()) AS startDate, toDate(now()) AS endDate, 0 AS gitlabCumulativeStars {% end %} -NODE stars_cumulative_count +NODE stars_cumulative_count_final SQL > % {% if defined(granularity) %} From eac04723519cea905391a47476778cef14534a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Fri, 25 Sep 2026 10:54:02 +0200 Subject: [PATCH 2/3] fix: cast endDate non-nullable in stars_github_bucketed lambda (CM-1785) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Granularity mode for `stars_cumulative_count` failed in production with `Unexpected type of filter column: Nullable ... ILLEGAL_COLUMN`. `ds.endDate` comes from `generate_timeseries.pipe`'s CASE WHEN block, which has no ELSE branch - ClickHouse types the column as Nullable(Date) even though it's always populated for a valid granularity value. The `arrayFirst` lambda in `stars_github_bucketed` compares against it and requires a strict, non-nullable UInt8 boolean result, which a Nullable comparison can't produce. Wrapped just this comparison in assumeNotNull() instead of touching generate_timeseries.pipe itself, since that pipe is shared infrastructure for every activity/contributor/metric pipe in the repo and widening its blast radius isn't warranted for a one-node fix. Verified against production data (opentf, longhorn, keystone projects, monthly granularity) after pushing to lfx_insights - previously failing queries now return correct, monotonic per-bucket totals in under 2s. Signed-off-by: Uroš Marolt --- services/libs/tinybird/pipes/stars_cumulative_count.pipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/libs/tinybird/pipes/stars_cumulative_count.pipe b/services/libs/tinybird/pipes/stars_cumulative_count.pipe index 5ca76b1aab..744fa5b582 100644 --- a/services/libs/tinybird/pipes/stars_cumulative_count.pipe +++ b/services/libs/tinybird/pipes/stars_cumulative_count.pipe @@ -178,7 +178,7 @@ SQL > history -> coalesce( tupleElement( arrayFirst( - x -> tupleElement(x, 1) < ds.endDate + INTERVAL 1 DAY + x -> tupleElement(x, 1) < assumeNotNull(ds.endDate) + INTERVAL 1 DAY {% if defined(endDate) %} AND tupleElement(x, 1) <= {{ From 7b0c9819acd1233fc69489a7b5088684a4d580a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Fri, 25 Sep 2026 12:30:48 +0200 Subject: [PATCH 3/3] docs: drop JIRA ticket references from stars_cumulative_count pipe description (CM-1785) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per review feedback: pipe DESCRIPTION blocks shouldn't carry ticket numbers that go stale once the work ships. Reworded the same points without the CM-XXX references. Signed-off-by: Uroš Marolt --- .../libs/tinybird/pipes/stars_cumulative_count.pipe | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/libs/tinybird/pipes/stars_cumulative_count.pipe b/services/libs/tinybird/pipes/stars_cumulative_count.pipe index 744fa5b582..08d1ecdacd 100644 --- a/services/libs/tinybird/pipes/stars_cumulative_count.pipe +++ b/services/libs/tinybird/pipes/stars_cumulative_count.pipe @@ -1,11 +1,11 @@ DESCRIPTION > - Cumulative (running-total) star count time series for a project or curated collection, - replacing `activities_cumulative_count.pipe` for stars only (CM-1785). - - GitHub repos: no per-user star events exist any more (CM-1419/CM-1439) - the cumulative - total is read from `repositoryStarSnapshots` (aggregate-only snapshots, CM-1437/CM-1463) + replacing `activities_cumulative_count.pipe` for stars only. + - GitHub repos: no per-user star events exist any more - the cumulative + total is read from `repositoryStarSnapshots` (aggregate-only snapshots) instead. Same `argMax(starCount, (capturedAt, updatedAt))` snapshot pattern as `health_score_stars.pipe`, evaluated once per bucket instead of once for a single `endDate`. - - Non-GitHub (GitLab) repos: unaffected by CM-1419, still counted from per-event `star` + - Non-GitHub (GitLab) repos: unaffected by that change, still counted from per-event `star` activities the normal way - read directly off `activityRelations_bucket_routing` / `activityRelations_collection_bucket_routing` (the same tables `activities_filtered.pipe` itself routes to), filtered `platform != 'github'`, since `activities_filtered.pipe` has no @@ -31,7 +31,7 @@ DESCRIPTION > can swap the pipe name with no other code changes. - **Known limitation**: a bucket earlier than a repo's first backfilled snapshot has no snapshot to `argMax` over and reads as 0 stars for that repo, not "unknown" - undercounts - early buckets until CM-1463's backfill fully lands, never overcounts. + early buckets until the star-snapshot backfill fully lands, never overcounts. TOKEN "insights-app-token" READ