Skip to content

chore: include excluded repositories (CM-1006)#3887

Merged
joanagmaia merged 5 commits intomainfrom
chore/include-excluded-repositories
Mar 9, 2026
Merged

chore: include excluded repositories (CM-1006)#3887
joanagmaia merged 5 commits intomainfrom
chore/include-excluded-repositories

Conversation

@joanagmaia
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia commented Mar 2, 2026

This pull request removes the excluded = false condition from several SQL queries and descriptions across multiple Tinybird pipes. The change makes the queries consider all enabled repositories, regardless of their excluded status. This simplifies repository filtering logic and ensures consistency in how repositories are selected throughout the analytics pipeline.

Repository filtering logic updates:

  • Removed the r.excluded = false condition from the WHERE clauses in all activityRelations_bucket_clean_enrich_copy_pipe_* files, so only enabled and not-deleted repositories are considered.

Documentation and default behavior updates:

  • Updated the documentation and default SQL in repos_to_channels.pipe to reflect that the default is now all enabled repositories, not just non-excluded ones.

Reason for changes

The only place where we should exclude "excluded repositories" is from the main health score metrics and security ones, which is already achieved in security_deduplicated_merged_copy_pipe.pipe, and with the latest changes on the health score pipes.

Everywhere else (search repositories modal, contributors, popularity and development metrics) we should display excluded repos.

Original purpose of "excluded" boolean was to not consider these repos in Health Score and Security - This is also what's included in the documentation.


Note

Medium Risk
Changes repository scoping across multiple analytics queries, which can materially alter metric outputs and downstream dashboards. Risk is primarily correctness (inclusion/exclusion rules) rather than system stability or security.

Overview
Most Tinybird pipes that join/filter repositories now stop applying excluded = false, so all enabled, non-deleted repos are included in activity enrichment, project/repo listing (activityRepositories_filtered), project population (insights_projects_populated_copy), and project scoping (segments_filtered).

Health score pipes are updated to explicitly exclude these repos by adding channel NOT IN (SELECT channel FROM repos_to_channels(excluded = True)), and repos_to_channels.pipe now defaults to expanding all enabled repos while adding an excluded parameter to generate the excluded-repo channel set. health_score_security.pipe also tightens repo selection to require r.excluded = false.

Written by Cursor Bugbot for commit a0544d2. This will update automatically on new commits. Configure here.

@joanagmaia joanagmaia requested review from gaspergrom and mbani01 March 2, 2026 17:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Copy Markdown
Contributor

@mbani01 mbani01 left a comment

Choose a reason for hiding this comment

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

@joanagmaia LGTM. To double-check, for health score pipes, we don't need the extended Gerrit channels, right? Otherwise, we should be using repos_to_channels instead of direct usage of repositories

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Comment thread services/libs/tinybird/pipes/health_score_forks.pipe Outdated
@joanagmaia joanagmaia requested a review from mbani01 March 2, 2026 18:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@joanagmaia
Copy link
Copy Markdown
Contributor Author

joanagmaia commented Mar 2, 2026

@joanagmaia LGTM. To double-check, for health score pipes, we don't need the extended Gerrit channels, right? Otherwise, we should be using repos_to_channels instead of direct usage of repositories

@mbani01 Nice catch, you are absolutely right. This should be considered since Gerrit repositories would never return a match here. Currently this excluded is mainly being used on Github but we should still support Gerrit. Applied the changes, had to update the repos_to_channels pipe to include the exclude filter

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@joanagmaia joanagmaia changed the title chore: include excluded repositories chore: include excluded repositories (CM-1006) Mar 2, 2026
@joanagmaia joanagmaia force-pushed the chore/include-excluded-repositories branch 2 times, most recently from 20a840c to 304086f Compare March 2, 2026 19:09
Comment thread services/libs/tinybird/pipes/repos_to_channels.pipe Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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.

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

Comment thread services/libs/tinybird/pipes/repos_to_channels.pipe
@joanagmaia joanagmaia merged commit 9d3e92e into main Mar 9, 2026
16 checks passed
@joanagmaia joanagmaia deleted the chore/include-excluded-repositories branch March 9, 2026 16:50
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