Skip to content

feat(BA-8476): expose the session owner user id and deprecate access keys - #15762

Merged
HyeockJinKim merged 6 commits into
mainfrom
feat/BA-8476
Oct 19, 2026
Merged

HyeockJinKim merged 6 commits into
mainfrom
feat/BA-8476

Conversation

@seedspirit

@seedspirit seedspirit commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The session event stream sends only ownerAccessKey, so Control Panel resolves the owner through the legacy GraphQL keypair query. Session event payloads now carry ownerUserId
  • PRE_ENQUEUE_SESSION and POST_ENQUEUE_SESSION hooks receive the owner user id as a 4th argument after access_key
  • Mark access key fields deprecated and keep them:
    • v2 DTO: session and kernel access_key, login session access_key and its filter, session access_key filter, event stream owner_access_key
    • GraphQL: SessionV2MetadataInfo.accessKey, KernelV2UserInfo.accessKey, LoginSessionV2.accessKey, the accessKey filters of SessionV2Filter and LoginSessionFilter, and SessionV2OrderField.ACCESS_KEY
  • The v2 compute session filter keeps access_key without deprecation since it has no user filter to replace it

Hook compatibility

Hook handlers are called with *args. A plugin handler that takes exactly three positional arguments fails with TypeError; for PRE_ENQUEUE_SESSION this rejects every session enqueue. The in-house activator takes *args and is unaffected.

Test plan

  • Related unit tests (common DTO, client v2, scheduling controller, adapters, GQL) pass
  • Regenerated GraphQL schema shows the six deprecations
  • /events/session payload includes ownerUserId
  • Hook plugins outside this repo accept the extra argument

Resolves BA-8476

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://sorna--15762.org.readthedocs.build/en/15762/


📚 Documentation preview 📚: https://sorna-ko--15762.org.readthedocs.build/ko/15762/

…keys

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:L 100~500 LoC label Oct 16, 2026
@github-actions github-actions Bot added area:docs Documentations comp:manager Related to Manager component comp:common Related to Common component labels Oct 16, 2026
@seedspirit
seedspirit marked this pull request as ready for review October 16, 2026 10:22
@seedspirit
seedspirit requested a review from a team as a code owner October 16, 2026 10:22
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:22
)


class SessionEventNode(BaseResponseModel):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since SessionEventNode is not currently being used anywhere, it needs to be reviewed.

Copilot AI left a comment

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.

🔵 Needs a closer look

External hook compatibility remains unverified, and existing three-argument PRE_ENQUEUE_SESSION handlers can reject session creation.

2 open findings
What changed in this PR

Adds session owner IDs so clients can identify owners without legacy keypair lookups, while retaining deprecated access-key fields.

Changes:

  • Adds owner IDs to session events and enqueue hooks.
  • Deprecates access-key fields and filters in DTOs and GraphQL.
  • Updates generated schemas and release notes.
File Description
src/​ai/​backend/​manager/​sokovan/​scheduling_controller/​scheduling_controller.py Passes owner UUID to enqueue hooks.
src/​ai/​backend/​manager/​events/​hub/​propagators/​session.py Emits ownerUserId.
src/​ai/​backend/​manager/​api/​gql/​session/​types.py Deprecates access-key field, filter, and ordering.
src/​ai/​backend/​manager/​api/​gql/​login_session/​types/​node.py Deprecates login-session access key.
src/​ai/​backend/​manager/​api/​gql/​login_session/​types/​filter.py Deprecates access-key filtering.
src/​ai/​backend/​manager/​api/​gql/​kernel/​types.py Deprecates kernel access key.
src/​ai/​backend/​common/​dto/​manager/​v2/​session/​response.py Marks session access keys deprecated.
src/​ai/​backend/​common/​dto/​manager/​v2/​session/​request.py Deprecates session access-key filter.
src/​ai/​backend/​common/​dto/​manager/​v2/​login_session/​response.py Marks login-session access key deprecated.
src/​ai/​backend/​common/​dto/​manager/​v2/​login_session/​request.py Deprecates login-session access-key filter.
src/​ai/​backend/​common/​dto/​manager/​v2/​kernel/​response.py Marks kernel access keys deprecated.
src/​ai/​backend/​common/​dto/​manager/​v2/​event_stream/​response.py Adds owner ID and deprecates owner access key.
src/​ai/​backend/​common/​dto/​manager/​event_stream/​response.py Adds client payload owner-ID alias.
docs/​manager/​rest-reference/​openapi.json Records filter deprecations.
docs/​manager/​graphql-reference/​v2-schema.graphql Records GraphQL deprecations.
docs/​manager/​graphql-reference/​supergraph.graphql Mirrors deprecations in the supergraph.
changes/​15762.feature.md Documents the feature and deprecations.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/ai/backend/common/dto/manager/event_stream/response.py Outdated
spec.resource_spec.identity.session_id,
spec.resource_spec.identity.session_name,
spec.resource_spec.identity.access_key,
spec.resource_spec.identity.user_uuid,
seedspirit and others added 3 commits October 19, 2026 13:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop the empty-string default of owner_user_id in both event payload DTOs and allow null
- Read user_uuid from the event data directly and send null when it is missing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HyeockJinKim
HyeockJinKim merged commit 4810aee into main Oct 19, 2026
44 checks passed
@HyeockJinKim
HyeockJinKim deleted the feat/BA-8476 branch October 19, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants