Page MenuHomePhabricator

Allow field removals in conftool schema upgrades
Closed, ResolvedPublic

Description

Currently, conftool only supports adding fields to the schema in a schema change. For this FY work on requestctl, we need to be able to also remove fields. Ideally, we would also be able to change the type of objects in-place using a migration strategy file.

Let's say we have an object foo where we have a boolean field called pinkunicorn, and we want to move it to be part of a list field called features

foo:
   pinkunicorn:
   - from: true
     to:
        name: features
        value: 
            - pinkunicorn
   - from: false
     to:
        name: features
        value: []

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Add tests for schema upgrade field translationsrepos/sre/hiddenparma!77oblivianschema_upgrade_removemain
Customize query in GitLab

Event Timeline

Joe triaged this task as High priority.
Joe added a project: conftool.

Change #1171155 had a related patch set uploaded (by Giuseppe Lavagetto; author: Giuseppe Lavagetto):

[operations/software/hiddenparma/deploy@main] Deploy schema-upgrades and dropping of bw_limit_duration

https://gerrit.wikimedia.org/r/1171155

Change #1171155 merged by Giuseppe Lavagetto:

[operations/software/hiddenparma/deploy@main] Deploy schema-upgrades and dropping of bw_limit_duration

https://gerrit.wikimedia.org/r/1171155