refactor(BA-5490): rename integration_id to integration_name above model layer#10788
Open
refactor(BA-5490): rename integration_id to integration_name above model layer#10788
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Refactors the manager “above model layer” interfaces to use integration_name instead of integration_id (while keeping the DB/ORM column as integration_id) across domain/group/resource_group/auth DTOs, adapters, GQL types, and tests.
Changes:
- Renamed DTO/request/response fields (and corresponding tests) from
integration_id→integration_namein manager v2 and GQL v2 surfaces. - Updated creators/updaters/adapters to map
integration_name(API/data layer) tointegration_id(DB column). - Updated row→data and RBAC model accessors to expose
integration_namewhile reading/writingintegration_idin storage.
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/manager/services/test_group.py | Updates GroupData fixtures to use integration_name. |
| tests/unit/manager/services/test_domain.py | Updates DomainData fixtures and updater specs to use integration_name. |
| tests/unit/manager/services/group/test_group_service.py | Updates group test factory to set integration_name. |
| tests/unit/manager/services/domain/test_domain_service.py | Updates domain test factory to set integration_name. |
| tests/unit/manager/repositories/group/test_group_repository.py | Updates repository tests to use integration_name. |
| tests/unit/manager/repositories/domain/test_domain_repository.py | Updates creator specs/assertions to use integration_name. |
| tests/unit/manager/repositories/auth/test_auth_repository.py | Maps ORM integration_id into data-layer integration_name for tests. |
| tests/unit/manager/api/group/test_group_node.py | Updates API test fixture to use integration_name. |
| tests/unit/manager/api/gql/test_project_v2_types.py | Renames GQL v2 project basic info field and updates tests. |
| tests/unit/manager/api/gql/test_domain_v2_types.py | Renames GQL v2 domain basic info field and updates tests. |
| tests/unit/common/dto/manager/v2/resource_group/test_response.py | Updates resource group response DTO tests for integration_name. |
| tests/unit/common/dto/manager/v2/resource_group/test_request.py | Updates resource group request DTO tests for integration_name. |
| tests/unit/common/dto/manager/v2/group/test_response.py | Updates group response DTO tests for integration_name. |
| tests/unit/common/dto/manager/v2/group/test_request.py | Updates group request DTO tests for integration_name (incl. Sentinel behavior assertions). |
| tests/unit/common/dto/manager/v2/domain/test_response.py | Updates domain response DTO tests for integration_name. |
| tests/unit/common/dto/manager/v2/domain/test_request.py | Updates domain request DTO tests for integration_name (incl. Sentinel behavior assertions). |
| src/ai/backend/manager/repositories/group/updaters.py | Renames updater field to integration_name and maps to DB integration_id. |
| src/ai/backend/manager/repositories/group/creators.py | Renames creator field to integration_name and maps to DB integration_id. |
| src/ai/backend/manager/repositories/domain/updaters.py | Renames updater fields to integration_name and maps to DB integration_id. |
| src/ai/backend/manager/repositories/domain/creators.py | Renames creator field to integration_name and maps to DB integration_id. |
| src/ai/backend/manager/repositories/auth/db_source/db_source.py | Exposes integration_name in UserData while reading DB integration_id. |
| src/ai/backend/manager/models/group/row.py | Exposes integration_name in data/RBAC model while reading DB integration_id. |
| src/ai/backend/manager/models/domain/row.py | Exposes integration_name in data/RBAC model while reading DB integration_id. |
| src/ai/backend/manager/models/domain/conditions.py | Renames query condition helpers to integration_name while filtering on DB integration_id. |
| src/ai/backend/manager/data/group/types.py | Renames GroupData/GroupModifier field to integration_name and maps updates to DB integration_id. |
| src/ai/backend/manager/data/domain/types.py | Renames DomainData/DomainModifier fields to integration_name and maps updates to DB integration_id. |
| src/ai/backend/manager/data/auth/types.py | Renames UserData field to integration_name. |
| src/ai/backend/manager/api/rest/domain/handler.py | Maps v1 REST DTO integration_id into creator integration_name. |
| src/ai/backend/manager/api/rest/domain/adapter.py | Maps DomainData integration_name into v1 DTO integration_id; updates updater to use integration_name. |
| src/ai/backend/manager/api/gql_legacy/group.py | Maps legacy GQL integration_id into integration_name in internal actions/DTO conversions. |
| src/ai/backend/manager/api/gql_legacy/domain.py | Maps legacy GQL integration_id into integration_name in internal actions/DTO conversions. |
| src/ai/backend/manager/api/gql/project_v2/types/nested.py | Renames v2 GQL output field to integration_name. |
| src/ai/backend/manager/api/gql/project_v2/types/mutations.py | Renames v2 GQL input fields to integration_name. |
| src/ai/backend/manager/api/gql/domain_v2/types/nested.py | Renames v2 GQL output field to integration_name. |
| src/ai/backend/manager/api/gql/domain_v2/types/mutations.py | Renames v2 GQL input fields to integration_name. |
| src/ai/backend/manager/api/adapters/resource_group.py | Updates resource group node mapping to use integration_name. |
| src/ai/backend/manager/api/adapters/project.py | Updates project create/update mapping to use integration_name. |
| src/ai/backend/manager/api/adapters/domain.py | Updates domain create/update mapping to use integration_name. |
| src/ai/backend/common/dto/manager/v2/resource_group/response.py | Renames response field to integration_name. |
| src/ai/backend/common/dto/manager/v2/resource_group/request.py | Renames request fields to integration_name. |
| src/ai/backend/common/dto/manager/v2/group/response.py | Renames response field to integration_name. |
| src/ai/backend/common/dto/manager/v2/group/request.py | Renames request fields to integration_name. |
| src/ai/backend/common/dto/manager/v2/domain/response.py | Renames response field to integration_name. |
| src/ai/backend/common/dto/manager/v2/domain/request.py | Renames request fields to integration_name. |
| changes/10788.enhancement.md | Adds changelog entry describing the rename. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3e87d16 to
8e0167c
Compare
Co-authored-by: octodog <mu001@lablup.com>
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.
resolves #10644 (BA-5490)
Pure rename of integration_id to integration_name above the model layer (DTOs, adapters, data types, creators, updaters, GQL types, legacy GQL, and tests) for domain, group, resource_group, and auth entities. The DB column remains integration_id.
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--10788.org.readthedocs.build/en/10788/
📚 Documentation preview 📚: https://sorna-ko--10788.org.readthedocs.build/ko/10788/