rilldata / rill

Rill is a tool for effortlessly transforming data sets into powerful, opinionated dashboards using SQL. BI-as-code.
https://www.rilldata.com
Apache License 2.0
1.73k stars 117 forks source link

Fix: file renames #6076

Closed ericpgreen2 closed 1 week ago

ericpgreen2 commented 1 week ago

Currently, when a user tries to rename a file to new_name, we check to see if any like resources (a Model, Metrics View, etc.) named new_name already exist. If so, we reject the file name change. One problem with this logic is that it prevents a file rename from model.sql to model.yaml.

This PR changes the logic so that we reject name changes only if the file name already exists in the given directory. This behavior matches that of a typical code editor.

Closes https://github.com/rilldata/rill/issues/5961