Skip to content

ref(integrations): Build create-issue config for service accounts - #129639

Open
gricha wants to merge 1 commit into
ref/sa-no-member-managementfrom
ref/sa-integration-issue-config
Open

gricha wants to merge 1 commit into
ref/sa-no-member-managementfrom
ref/sa-integration-issue-config

Conversation

@gricha

@gricha gricha commented Nov 3, 2026

Copy link
Copy Markdown
Member

Service accounts can load the create-issue form for integrations, so a Seer agent can file a GitHub or Jira issue. Drops group_integration_details.py, the last file on the request.user allowlist (1 → 0).

get_create_issue_config() and its overrides (GitHub, GitLab, Bitbucket, VSTS, Jira, Jira Server) take the caller as a RequestPrincipal; the endpoint keeps passing request.user. Only two places need a user, and both skip their personal part when there isn't one:

  • Jira's saved per-user defaults (get_defaults): a service account gets the project defaults. Before, it failed with user-required because its ServiceAccountId went into the user-options lookup.
  • AI-generated title and description: sent with no user id (run_oneshot already accepts None).

Users see no change. getsentry doesn't override get_create_issue_config.

test_service_account_gets_project_defaults_only fails without this change:

E   sentry.api.exceptions.UserRequired: {'detail': {'code': 'user-required', 'message': 'This action requires a user.', 'extra': {}}}

With it, the integration issue, group-integration-details, GitHub and Jira suites pass: 224 passed.

@gricha
gricha requested a review from a team as a code owner November 3, 2026 01:49
@gricha
gricha added this pull request to stack #129572 November 3, 2026 01:49
@gricha
gricha requested review from a team as code owners November 3, 2026 01:49
@gricha
gricha requested review from cvxluo and skaasten November 3, 2026 01:49
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 3, 2026
@gricha
gricha force-pushed the ref/sa-integration-issue-config branch 3 times, most recently from a03a81f to df0b19f Compare November 3, 2026 04:03
@sentry

sentry Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 780 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

get_create_issue_config() takes the caller as a RequestPrincipal. The
two places that need a user skip their personal part when there isn't
one: Jira's saved per-user defaults (a service account gets the project
defaults) and the AI-generated title and description (no user id sent).
A service account calling Jira's create config used to fail with
user-required; users see no change.

group_integration_details.py was the last file on the request.user
allowlist.
@gricha
gricha force-pushed the ref/sa-integration-issue-config branch from df0b19f to 1a6d709 Compare November 3, 2026 04:41
@gricha
gricha removed this pull request from stack #129572 November 3, 2026 06:52
@gricha
gricha added this pull request to stack #129650 November 3, 2026 06:52

This branch has not been deployed

No deployments
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