Add a background DB migration to populate the workspace_agentk_states table
MRs:
- Add files from RemoteDevelopment module for mig... (!199244 - merged)
- Validate only kubernetes objects using JSON schema (!200985 - merged)
- Update the duplicated logic to create desired c... (!202190 - merged)
- Remove bm_desired_config_array_validator_spec (!202551 - merged)
- Backfill workspace_agentk_states for all worksp... (!199102 - merged)
Description
Once that shadow deployment of the new logic for desired_config generator is successful. We can start preparing for the logic to be triggered at workspace creation step. This will require us to create a background migration that backfills all the workspaces in workspace_agentk_states
so that when a workspace undergoes reconciliation it gets its desired_config
from the database.
Acceptance criteria
-
Backfill workspace_agentk_states
for all the workspaces whereworkspace_agentk_states.desired_config
is empty. -
Before merging the migration, run it on staging/production data through Teleport. -
Add description in the changelog that all the workspaces which failed the migration will be orphaned and will be required to be cleaned up by the cluster admins.
Implementation plan
- Create a background migration that creates
desired_config
for each workspace. - Run validation on each created
desired_config
before persisting. Validations are to be done viaDesiredConfig
value object created in this MR. - Write spec for this migration.
Edited by Ashvin Sharma