Skip to content

Commit

Permalink
Fix: Migrate "chart" resources to "component" resources (#4835)
Browse files Browse the repository at this point in the history
  • Loading branch information
begelundmuller committed May 6, 2024
1 parent 8f3ff05 commit b507a03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/catalog_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
1 change: 1 addition & 0 deletions runtime/drivers/sqlite/migrations/0022.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE catalogv2 SET kind = 'rill.runtime.v1.Component' WHERE kind = 'rill.runtime.v1.Chart';

1 comment on commit b507a03

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://66390c67f6a8fe06d8a63ce5--rill-ui.netlify.app

Please sign in to comment.