feat: add config-file migration endpoint #1784 - #1830
Open
KirylKurnosenka wants to merge 1 commit into
Open
Conversation
…igrate #1784 Admin-triggered, on-demand copy of file-defined config entities (models, interceptors, roles, keys, routes, applications, toolsets, schemas, catalog_schemas, settings) into the platform blob bucket, with dry-run support and idempotent re-runs. Reuses AdminApplyController's per-kind write pipeline (validateOnly/mutateScratch/applyEntries) instead of duplicating per-type encryption/validation/dup-checks.
KirylKurnosenka
requested review from
Oleksii-Klimov and
astsiapanay
as code owners
August 12, 2026 23:21
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.
Adds an admin-triggered, on-demand endpoint that copies file-defined config entities into the
platformblob bucket, so they become API-managed without changing what clients see or send. Supports dry-run and is idempotent on re-invocation.Applicable issues
Description of changes
POST /v1/admin/config/file/migrate(ConfigFileMigrateController), admin-only, migrating models/interceptors/roles/keys/routes/applications/toolsets/schemas/catalog_schemas/settings on request, with atypesfilter anddryRunflag.AdminApplyController's per-kind write pipeline (validateOnly,mutateScratch,newScratch, and a newly extractedapplyEntries) instead of duplicating per-type encryption/validation/dup-checks;applyEntriesand theDEPENDENCY_ORDER_COMPARATORit now shares withapplyBatchare also reused as-is by the migration endpoint.SchemaMigrationNaminghelper mints a deterministic canonical blob name for migrated schemas (sha256($id)+ sanitized display-name slug), since a schema's canonical id is intentionally decoupled from its$id.migrated/skipped/failedvs.would_migrate/would_skip/would_fail) so a result can't be mistaken for an actual write.ConfigFileMigrateApiTestintegration coverage: happy path, idempotent re-run, dry-run (writes nothing), toolset secret round-trip, same-display-name schema disambiguation, settings migration,typesfiltering, invalid type (400), non-admin (403).Notes for reviewers
feat/issue-1783(feat: short-name resolution via derivation + schema $id index #1783 #1813) rather thandevelopment, since this endpoint's presence/idempotency checks and theapplySingle/EntityResultreuse depend on that branch's short-name-derivation and schema$id-alias-index work. This lets both PRs be reviewed in parallel.developmentbefore switching the base:development. This keeps the diff correct regardless of whether feat: short-name resolution via derivation + schema $id index #1783 #1813 merges as a merge commit or a squash.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.