Skip to content

fix: batch fetch repositories for integrations#3889

Merged
themarolt merged 2 commits into
mainfrom
bugfix-batch-repos-fetch
Mar 3, 2026
Merged

fix: batch fetch repositories for integrations#3889
themarolt merged 2 commits into
mainfrom
bugfix-batch-repos-fetch

Conversation

@themarolt
Copy link
Copy Markdown
Contributor

@themarolt themarolt commented Mar 3, 2026

Note

Medium Risk
Changes how integration settings are hydrated (batch DB queries and shared QueryExecutor), which could affect returned settings for GitHub/GitHub-Nango integrations if grouping/mapping logic has edge cases. Functional scope is limited and primarily performance-oriented.

Overview
Batches integration hydration to avoid N+1 queries. IntegrationRepository._populateRelationsForRows now pre-fetches Nango mappings and GitHub repos for all relevant integrations in one pass, then injects settings.nangoMapping and settings.orgs[].repos from those results.

Updates DAL APIs and call sites to support multi-ID lookups. Replaces single-integration helpers with getNangoMappingsForIntegrations and getReposGroupedByOrgForIntegrations, and threads a shared QueryExecutor through integration population and Nango cron/worker scripts to use the new batched interfaces.

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

Signed-off-by: Uroš Marolt <uros@marolt.me>
@themarolt themarolt requested a review from mbani01 March 3, 2026 13:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 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 3, 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.

Signed-off-by: Uroš Marolt <uros@marolt.me>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 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.

@themarolt themarolt merged commit 3e15c35 into main Mar 3, 2026
15 checks passed
@themarolt themarolt deleted the bugfix-batch-repos-fetch branch March 3, 2026 14:06
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