Skip to content

feat(seer): Add GitLab orgs to context engine indexing - #119257

Draft
billyvg wants to merge 2 commits into
masterfrom
billyvong/cw-1505-add-gitlab-orgs-to-context-engine-indexing
Draft

feat(seer): Add GitLab orgs to context engine indexing#119257
billyvg wants to merge 2 commits into
masterfrom
billyvong/cw-1505-add-gitlab-orgs-to-context-engine-indexing

Conversation

@billyvg

@billyvg billyvg commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

get_allowed_org_ids_context_engine_indexing (in src/sentry/tasks/seer/context_engine_index.py) hardcoded the SCM provider fetch to [GITHUB, GITHUB_ENTERPRISE], so GitLab orgs were never candidates for context-engine indexing.

This adds GitLab to the supported SCM providers so GitLab orgs are indexed on the same footing as GitHub orgs. GitLab support is now generally available, so no per-org feature gate is applied — a GitLab org becomes eligible through the usual Seer eligibility flags (seer-explorer-index, seat-based-seer-enabled, seer-added), exactly like GitHub.

Changes

  • Add IntegrationProviderSlug.GITLAB to the provider list in the bulk org-id fetch.
  • Update the docstring (GitHub → GitHub/GitHub Enterprise/GitLab).
  • Add tests: GitLab org with a Seer eligibility flag → included; GitLab org with no Seer flags → excluded.

Test Plan

  • pytest tests/sentry/tasks/seer/test_context_engine_index.py -k TestGetAllowedOrgIdsContextEngineIndexing
  • mypy src/sentry/tasks/seer/context_engine_index.pySuccess: no issues found.

Refs CW-1505

Companion fix for group_autofix_setup_check.py: #117678

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jul 8, 2026

Copy link
Copy Markdown

CW-1505

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 8, 2026
@billyvg

billyvg commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@shruthilayaj since you worked on contextengine, do you see any problems with allowing gitlab repos to be used?

billyvg and others added 2 commits July 23, 2026 15:59
`get_allowed_org_ids_context_engine_indexing` hardcoded the SCM provider
fetch to GitHub and GitHub Enterprise, so GitLab orgs were never candidates
for context-engine indexing even when organizations:seer-gitlab-support was
enabled.

Widen the candidate fetch to include GitLab orgs and gate them per-org on the
seer-gitlab-support flag inside the existing eligibility loop (the bulk org-id
fetch has no per-org context, unlike get_supported_scm_providers). Orgs also
reachable via GitHub are unaffected.

Refs CW-1505
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@billyvg
billyvg force-pushed the billyvong/cw-1505-add-gitlab-orgs-to-context-engine-indexing branch from b6a006a to 94f97e9 Compare July 23, 2026 19:59
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