Skip to content

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

Open
joanagmaia wants to merge 3 commits intomainfrom
chore/include-excluded-repositories
Open

chore: include excluded repositories (CM-1006)#3887
joanagmaia wants to merge 3 commits intomainfrom
chore/include-excluded-repositories

Conversation

@joanagmaia
Copy link
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 SQL across multiple Tinybird pipes, which will alter which repos feed analytics and can shift health score/security results. Risk is moderate due to potential metric deltas and increased data volume, but the change is mostly filter adjustments.

Overview
Most Tinybird pipes that join against repositories now stop filtering on excluded = false, so any enabled, non-deleted repo (including excluded ones) can appear in activity enrichment, project population, segment scoping, and repository search.

Health score queries are updated to explicitly exclude excluded repos by adding channel NOT IN (SELECT channel FROM repos_to_channels(excluded=True)), and repos_to_channels.pipe now supports an excluded parameter to expand excluded repos for that filter; health_score_security.pipe also enforces r.excluded = false when selecting repos to score.

Written by Cursor Bugbot for commit 304086f. 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
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
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
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
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
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
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

@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.

@joanagmaia joanagmaia requested a review from mbani01 March 2, 2026 18:57
@github-actions
Copy link
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
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
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
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