Skip to content

feat(BA-5589): add integration_name to user entity across all API layers#10786

Merged
HyeockJinKim merged 5 commits intomainfrom
feat/BA-5589/user-integration-name
Apr 5, 2026
Merged

feat(BA-5589): add integration_name to user entity across all API layers#10786
HyeockJinKim merged 5 commits intomainfrom
feat/BA-5589/user-integration-name

Conversation

@hhoikoo
Copy link
Copy Markdown
Member

@hhoikoo hhoikoo commented Apr 4, 2026

resolves #10784 (BA-5589)

Add integration_name field to the user entity across all layers: data type, row, v2 DTOs (create/update/response/filter), v1 DTO (filter), user conditions (search filter), v1 REST adapter, v2 adapter (create/update/filter/conversion), GQL filter + nested type, GraphQL schema docs, user creators, and user updaters.

Checklist: (if applicable)

  • Mention to the original issue
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory

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


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

@hhoikoo hhoikoo self-assigned this Apr 4, 2026
Copilot AI review requested due to automatic review settings April 4, 2026 09:36
@github-actions github-actions bot added size:L 100~500 LoC area:docs Documentations comp:manager Related to Manager component comp:common Related to Common component labels Apr 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds integration_name support for the user entity end-to-end (DB mapping → data model → DTOs → adapters → filter conditions → GraphQL types/docs), enabling create/update/filter/query behaviors for external identity/integration identifiers.

Changes:

  • Added integration_name to user data/DTO models and mapped it to the existing DB column integration_id.
  • Implemented filtering support via UserConditions + REST/v2 adapter filter conversion.
  • Updated GraphQL nested/basic types and schema reference docs; added/extended unit tests.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tests/unit/manager/repositories/user/test_user_updaters.py Adds unit tests ensuring updater spec maps integration_name TriState to integration_id.
tests/unit/manager/models/user/test_conditions.py Adds unit tests for integration-name filter SQL generation.
tests/unit/manager/api/user/test_adapter.py Adds adapter filter tests for integration_name.
tests/unit/manager/api/adapters/test_user_adapter.py Adds tests for v2 adapter _user_data_to_node conversion behavior.
tests/unit/common/dto/manager/v2/user/test_response.py Extends v2 response DTO tests to include integration_name.
tests/unit/common/dto/manager/v2/user/test_request.py Extends v2 request/filter DTO tests to include integration_name.
src/ai/backend/manager/repositories/user/updaters.py Adds integration_name to updater spec and maps it to DB integration_id.
src/ai/backend/manager/repositories/user/creators.py Adds integration_name to creator spec and maps it to DB integration_id.
src/ai/backend/manager/models/user/row.py Maps integration_idintegration_name in UserRow.to_data().
src/ai/backend/manager/models/user/conditions.py Adds integration-name string match conditions over UserRow.integration_id.
src/ai/backend/manager/data/user/types.py Adds integration_name to UserData + row conversion mapping.
src/ai/backend/manager/api/rest/user/adapter.py Adds REST filter conversion for integration_name.
src/ai/backend/manager/api/gql/user/types/nested.py Adds integration_name to GraphQL nested basic info type with version metadata.
src/ai/backend/manager/api/gql/user/types/filters.py Adds integration_name to GraphQL filter input with version metadata.
src/ai/backend/manager/api/adapters/user.py Plumbs integration_name through create/update/filter and node conversion.
src/ai/backend/common/dto/manager/v2/user/response.py Adds integration_name field to v2 response DTO.
src/ai/backend/common/dto/manager/v2/user/request.py Adds integration_name to v2 create/update inputs and filters.
src/ai/backend/common/dto/manager/user/request.py Adds integration_name to v1 filter DTO.
docs/manager/graphql-reference/v2-schema.graphql Updates GraphQL reference schema to include/rename integration-related fields.
docs/manager/graphql-reference/supergraph.graphql Updates supergraph schema reference similarly.
changes/10786.feature.md Adds changelog entry for the new user integration_name field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hhoikoo hhoikoo force-pushed the feat/BA-5589/user-integration-name branch from 217c7d4 to 31a7a98 Compare April 4, 2026 10:03
Cover max-length rejection, boundary, sentinel default, none-clear, and value acceptance paths.
@HyeockJinKim HyeockJinKim merged commit b1a62ea into main Apr 5, 2026
33 checks passed
@HyeockJinKim HyeockJinKim deleted the feat/BA-5589/user-integration-name branch April 5, 2026 10:52
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.

Add integration_name to user entity across all API layers

3 participants