Repository navigation
ref(integrations): Build create-issue config for service accounts - #129639
Merged
gricha merged 1 commit intoNov 4, 2026
Merged
Conversation
gricha
force-pushed
the
ref/sa-integration-issue-config
branch
3 times, most recently
from
November 3, 2026 04:03
a03a81f to
df0b19f
Compare
Contributor
Sentry Snapshot Testing
|
gricha
force-pushed
the
ref/sa-integration-issue-config
branch
from
November 3, 2026 04:41
df0b19f to
1a6d709
Compare
gricha
force-pushed
the
ref/sa-integration-issue-config
branch
from
November 3, 2026 19:53
1a6d709 to
709e3b5
Compare
gricha
force-pushed
the
ref/sa-integration-issue-config
branch
from
November 3, 2026 20:03
709e3b5 to
b07f15a
Compare
gricha
force-pushed
the
ref/sa-integration-issue-config
branch
from
November 3, 2026 20:09
b07f15a to
2792375
Compare
azulus
approved these changes
Nov 3, 2026
gricha
force-pushed
the
ref/sa-integration-issue-config
branch
4 times, most recently
from
November 4, 2026 00:44
748e833 to
cde5a84
Compare
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
force-pushed
the
ref/sa-integration-issue-config
branch
from
November 4, 2026 01:15
cde5a84 to
5ec3366
Compare
gricha
added a commit
that referenced
this pull request
Nov 4, 2026
… and client config (#129630) Four one-off `request.user` reads, which drops their files from the allowlist (10 → 6). What's left is member management (#129638), data export (#129637) and `group_integration_details.py` (#129639); #129640 then deletes the allowlist. - **Agent tokens:** `resolve_minting_principal()` rejects any caller with no user (`has_user`), not just `AnonymousUser`. A service account used to resolve to a *user* principal carrying its `ServiceAccountId` and fail later; it now gets the same "Minting requires a user principal" 403 as an anonymous caller. The new assertion fails without this change: ``` E AssertionError: assert AgentPrincipal(type=<AgentPrincipalType.USER: 'user'>, id=ServiceAccountId(service_account_id=1)) is <MintingPrincipalRejection.UNSUPPORTED: 'unsupported'> ``` - **Release serialization** takes a `RequestPrincipal`. It only forwards the caller to `serialize()` and `serialize_generic_user()`, which already take one, so this is type-only. - **Notebooks** read the caller through `acting_user_id()`; same value for users and token callers. - **Client config** is built only from Django views, so its request is typed as `HttpRequest`. Type-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 therequest.userallowlist (1 → 0).get_create_issue_config()and its overrides (GitHub, GitLab, Bitbucket, VSTS, Jira, Jira Server) take the caller as aRequestPrincipal; the endpoint keeps passingrequest.user. Only two places need a user, and both skip their personal part when there isn't one:get_defaults): a service account gets the project defaults. Before, it failed withuser-requiredbecause itsServiceAccountIdwent into the user-options lookup.run_oneshotalready accepts None).Users see no change. getsentry doesn't override
get_create_issue_config.test_service_account_gets_project_defaults_onlyfails without this change:With it, the integration issue, group-integration-details, GitHub and Jira suites pass:
224 passed.