diff --git a/runtime/catalog_cache.go b/runtime/catalog_cache.go index 7335494d9f4..b772faf0dc1 100644 --- a/runtime/catalog_cache.go +++ b/runtime/catalog_cache.go @@ -539,6 +539,12 @@ func resourceFromDriver(r drivers.Resource) *runtimev1.Resource { panic(err) } + // Reset resource name to the appropriate DB column values (enables migrations to change the kind and name.) + res.Meta.Name = &runtimev1.ResourceName{ + Kind: r.Kind, + Name: r.Name, + } + // Reset ephemeral fields. res.Meta.ReconcileStatus = runtimev1.ReconcileStatus_RECONCILE_STATUS_IDLE res.Meta.ReconcileError = "" diff --git a/runtime/drivers/sqlite/migrations/0022.sql b/runtime/drivers/sqlite/migrations/0022.sql new file mode 100644 index 00000000000..9b0402ceeda --- /dev/null +++ b/runtime/drivers/sqlite/migrations/0022.sql @@ -0,0 +1 @@ +UPDATE catalogv2 SET kind = 'rill.runtime.v1.Component' WHERE kind = 'rill.runtime.v1.Chart';