Skip to content

chore(repositories): Switch over SeerProjectRepository attribute uses of Project and Repository to use ProjectRepository#115459

Merged
wedamija merged 2 commits into
danf/repository-project-seerprojectrepofrom
danf/repository-project-seer-attr-access
May 13, 2026
Merged

chore(repositories): Switch over SeerProjectRepository attribute uses of Project and Repository to use ProjectRepository#115459
wedamija merged 2 commits into
danf/repository-project-seerprojectrepofrom
danf/repository-project-seer-attr-access

Conversation

@wedamija
Copy link
Copy Markdown
Member

As per the title, follow up to #115456

wedamija added 2 commits May 12, 2026 16:39
…es of `Project` and `Repository` to use `ProjectRepository`

As per the title, follow up to #115456
@wedamija wedamija requested a review from a team May 12, 2026 23:50
@wedamija wedamija requested a review from a team as a code owner May 12, 2026 23:50
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 12, 2026
Copy link
Copy Markdown
Contributor

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

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit b65e1fa. Configure here.

project=project, repository__status=ObjectStatus.ACTIVE
)
.select_related("repository")
.select_related("repository", "project_repository", "project_repository__repository")
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.

Unnecessary JOINs added when feature flag is off

Low Severity

The else branches (feature flag off) now include select_related("project_repository", "project_repository__repository") in addition to "repository". When use_fk is False, neither build_repo_definition_from_project_repo nor the pid computation ever accesses project_repository. These extra select_related calls add two unnecessary LEFT OUTER JOINs to every query on the default (non-flag) path, increasing SQL complexity and data transfer for no benefit.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b65e1fa. Configure here.

@wedamija wedamija merged commit 11be069 into danf/repository-project-seerprojectrepo May 13, 2026
58 checks passed
@wedamija wedamija deleted the danf/repository-project-seer-attr-access branch May 13, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant