Skip to content

feat(BA-5830): AppConfigFragment + AppConfig REST v2#11286

Draft
jopemachine wants to merge 8 commits intoBA-5829from
BA-5830
Draft

feat(BA-5830): AppConfigFragment + AppConfig REST v2#11286
jopemachine wants to merge 8 commits intoBA-5829from
BA-5830

Conversation

@jopemachine
Copy link
Copy Markdown
Member

@jopemachine jopemachine commented Apr 24, 2026

📚 Stacked PRs

This PR is part of a 10-PR stack delivering BEP-1052. Merge in order:

  1. ⬇️ chore(BA-5822): drop legacy AppConfig layer (preparation for BEP-1052) #11265chore(BA-5822): drop legacy AppConfig layer
  2. ⬇️ feat(BA-5814): AppConfigPolicy foundation (data / repository / service / adapter, bulk-aware) #11266feat(BA-5814): AppConfigPolicy foundation
  3. ⬇️ feat(BA-5815): AppConfigPolicy GraphQL #11269feat(BA-5815): AppConfigPolicy GraphQL
  4. ⬇️ feat(BA-5844): AppConfigPolicy REST v2 surface #11312feat(BA-5844): AppConfigPolicy REST v2
  5. ⬇️ feat(BA-5827): AppConfigFragment foundation (DB + repository + errors) #11282feat(BA-5827): AppConfigFragment foundation
  6. ⬇️ feat(BA-5836): AppConfigFragment service vertical (service / DTO / adapter) #11296feat(BA-5836): AppConfigFragment service vertical
  7. ⬇️ feat(BA-5829): AppConfigFragment + AppConfig GraphQL #11285feat(BA-5829): AppConfigFragment + AppConfig GraphQL
  8. 👉 feat(BA-5830): AppConfigFragment + AppConfig REST v2 #11286feat(BA-5830): AppConfigFragment + AppConfig REST v2 ← you are here
  9. ⬇️ feat(BA-5832): AppConfig v2 SDK + CLI (BEP-1052) #11295feat(BA-5832): AppConfig v2 SDK + CLI
  10. ⬇️ feat(BA-5837): ValkeyCache for AppConfigFragment merged-view reads #11298feat(BA-5837): ValkeyCache for AppConfigFragment merged-view reads

CI on intermediate PRs may show test churn since each one only lands a slice of the new layer. The full picture is guaranteed to build at the tip (#11298).

Summary

REST v2 endpoints for the Fragment domain and the merged AppConfig view (BEP-1052 §2 / §5). Service / adapter / DTO foundation lives in #11282 (Fragment bulk) and #11285 (merged-view actions); this PR is REST-only.

REST v2 (/v2/app-config-fragments):

  • GET /{scope_type}/{scope_id}/{name} — auth_required
  • POST /{scope_type}/{scope_id}/search — scope-bound search
  • POST /search — superadmin cross-scope search
  • POST /bulk-create / bulk-update / bulk-purge — superadmin only
  • POST /my/bulk-create / my/bulk-update — self-service USER scope

REST v2 (/v2/app-configs, merged view):

  • GET /my/{name} / POST /my/search — auth_required
  • GET /{user_id}/{name} / POST /search — superadmin only

Adds the path-param classes for the new URL segments and wires the handlers into rest/v2/tree.py.

Resolves BA-5830.


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


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

@github-actions github-actions Bot added the size:L 100~500 LoC label Apr 24, 2026
@github-actions github-actions Bot added the comp:manager Related to Manager component label Apr 24, 2026
jopemachine added a commit that referenced this pull request Apr 24, 2026
jopemachine added a commit that referenced this pull request Apr 24, 2026
jopemachine added a commit that referenced this pull request Apr 24, 2026
…onfigs, publicAppConfigFragments)

Exposes the merged-view operations that BEP-1052 §5 / §3 require and
which were only reachable from the repository layer until now:

- `myAppConfigs(filter, orderBy, ...)` — caller's own merged AppConfig
  list (auth required). Adapter pins `(USER, current_user)` internally.
- `adminAppConfigs(filter, orderBy, ...)` — cross-user admin search.
  Optional `filter.userId` pins to a single user; otherwise paginates
  across every user.
- `publicAppConfigFragments(filter, orderBy, ...)` — raw `PUBLIC`-scope
  fragments, no-auth.

Service / Processor / Adapter wiring:
- `services/app_config_fragment/actions/{get_user_app_config,
  search_user_app_configs, admin_search_app_configs}.py` — 3 new
  actions + matching results.
- `AppConfigFragmentService.get_user_app_config` /
  `search_user_app_configs` / `admin_search_app_configs` delegate to
  the existing repository merged-view methods.
- `AppConfigFragmentProcessors` wraps each in an `ActionProcessor`.
- `AppConfigFragmentAdapter.my_app_config` /
  `admin_get_user_app_config` / `my_search_app_configs` /
  `admin_search_app_configs` expose the v2 Pydantic DTOs.

v2 DTO (`common/dto/manager/v2/app_config/`): replaces the stray
legacy Upsert/Delete DTOs (unreferenced after the BA-5822 cleanup)
with `AppConfigNode` + `GetUserAppConfigPayload` /
`SearchAppConfigsPayload` + `SearchMyAppConfigsInput` /
`SearchAppConfigsInput` / `GetUserAppConfigInput` +
`AppConfigFilter` / `AppConfigOrder` / `AppConfigOrderField`.

GQL types (`api/gql/app_config/`): `AppConfigGQL` (Pydantic-backed
Node containing a `fragments: [AppConfigFragmentGQL!]!` list plus
the deep-merged `config`), `AppConfigFilterGQL` / `AppConfigOrderByGQL`
/ `AppConfigOrderFieldGQL`. Three root resolvers registered in
`schema.py`.

REST surface lands in BA-5830 (#11286) alongside the existing
fragment REST routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine added a commit that referenced this pull request Apr 24, 2026
jopemachine added a commit that referenced this pull request Apr 24, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
…onfigs, publicAppConfigFragments)

Exposes the merged-view operations that BEP-1052 §5 / §3 require and
which were only reachable from the repository layer until now:

- `myAppConfigs(filter, orderBy, ...)` — caller's own merged AppConfig
  list (auth required). Adapter pins `(USER, current_user)` internally.
- `adminAppConfigs(filter, orderBy, ...)` — cross-user admin search.
  Optional `filter.userId` pins to a single user; otherwise paginates
  across every user.
- `publicAppConfigFragments(filter, orderBy, ...)` — raw `PUBLIC`-scope
  fragments, no-auth.

Service / Processor / Adapter wiring:
- `services/app_config_fragment/actions/{get_user_app_config,
  search_user_app_configs, admin_search_app_configs}.py` — 3 new
  actions + matching results.
- `AppConfigFragmentService.get_user_app_config` /
  `search_user_app_configs` / `admin_search_app_configs` delegate to
  the existing repository merged-view methods.
- `AppConfigFragmentProcessors` wraps each in an `ActionProcessor`.
- `AppConfigFragmentAdapter.my_app_config` /
  `admin_get_user_app_config` / `my_search_app_configs` /
  `admin_search_app_configs` expose the v2 Pydantic DTOs.

v2 DTO (`common/dto/manager/v2/app_config/`): replaces the stray
legacy Upsert/Delete DTOs (unreferenced after the BA-5822 cleanup)
with `AppConfigNode` + `GetUserAppConfigPayload` /
`SearchAppConfigsPayload` + `SearchMyAppConfigsInput` /
`SearchAppConfigsInput` / `GetUserAppConfigInput` +
`AppConfigFilter` / `AppConfigOrder` / `AppConfigOrderField`.

GQL types (`api/gql/app_config/`): `AppConfigGQL` (Pydantic-backed
Node containing a `fragments: [AppConfigFragmentGQL!]!` list plus
the deep-merged `config`), `AppConfigFilterGQL` / `AppConfigOrderByGQL`
/ `AppConfigOrderFieldGQL`. Three root resolvers registered in
`schema.py`.

REST surface lands in BA-5830 (#11286) alongside the existing
fragment REST routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine added a commit that referenced this pull request Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
@jopemachine jopemachine changed the title feat(BA-5830): AppConfigFragment REST v2 (scoped + admin search, CRUD) feat(BA-5830): AppConfigFragment + AppConfig REST v2 Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
@github-actions github-actions Bot added size:L 100~500 LoC size:XL 500~ LoC and removed size:XL 500~ LoC size:L 100~500 LoC labels Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
@github-actions github-actions Bot added size:L 100~500 LoC size:XL 500~ LoC and removed size:XL 500~ LoC size:L 100~500 LoC labels Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
@github-actions github-actions Bot added size:L 100~500 LoC and removed size:XL 500~ LoC labels Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
jopemachine and others added 8 commits April 27, 2026 11:42
REST endpoints for the Fragment domain and the merged AppConfig view
(BEP-1052 §2 / §5). Service / adapter foundation lands in BA-5827
(Fragment bulk) and BA-5829 (merged-view actions); this PR only wires
the REST entry points on top.

REST v2 (`/v2/app-config-fragments`):
- `GET /{scope_type}/{scope_id}/{name}` — auth_required.
- `POST /{scope_type}/{scope_id}/search` — scope-bound search.
- `POST /search` — superadmin cross-scope search.
- `POST /bulk-create` / `bulk-update` / `bulk-purge` — superadmin only.
- `POST /my/bulk-create` / `my/bulk-update` — self-service USER scope.

REST v2 (`/v2/app-configs`, merged view):
- `GET /my/{name}` / `POST /my/search` — auth_required.
- `GET /{user_id}/{name}` / `POST /search` — superadmin only.

Adds the path-param classes for the new URL segments and wires the
handlers into `rest/v2/tree.py`.

Resolves BA-5830.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After BA-5829 split the merged-view methods (`my_bulk_create` /
`my_bulk_update`) into their own `AppConfigAdapter`, the Fragment REST
handler still referenced them on `AppConfigFragmentAdapter` (404 at
type-check time). The fragment routes own these URLs (the SDK already
posts to `/v2/app-config-fragments/my/bulk-*`), so inject the
`AppConfigAdapter` alongside the Fragment one and dispatch the my-bulk
calls there. Also flips `V2AppConfigHandler` to take `AppConfigAdapter`
instead of the now-stale Fragment adapter.
Carry the BA-5836 / BA-5829 rename (`bulk_create_my` → `my_bulk_create`,
`bulk_update_my` → `my_bulk_update`) through the REST v2 surface, the
GQL schema, and the dumped GraphQL schema artefacts.

Strip the remaining `BEP-1052 §X` references from the REST v2 handlers
/ registries, the legacy AppConfig drop migration, and the GraphQL
schema dump comments. Only the news fragments retain the BEP wording
(intentional).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The `-X theirs` rebase onto BA-5829 reset the schema dump back to the
older `BulkCreateMy*` / `bulkCreateMy*` field / type / mutation names.
Re-apply the rename to the dump artefacts so the api-updated check
sees a clean diff against the regenerated schema.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: octodog <mu001@lablup.com>
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 require:db-migration Automatically set when alembic migrations are added or updated size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant