hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.09k stars 2.77k forks source link

Untrack table not removing metadata files #8542

Open namoscato opened 2 years ago

namoscato commented 2 years ago

Version Information

Server Version: v2.6.2 (config v3)

Environment

OSS

What is the expected behaviour?

Clicking the "Untrack Table" button on "Data > Table > Modify" should additionally remove the referenced metadata/databases/*/tables/*.yaml files

Keywords

untrack table, yaml, metadata, console

What is the current behaviour?

While the !include array entries are removed from metadata/databases/*/tables/tables.yaml, the referenced files are not removed

How to reproduce the issue?

  1. navigate to "Modify" tab of a table
  2. click "Untrack Table" at the bottom
rikinsk commented 2 years ago

Hi. At the moment this behaviour is intentional as the CLI avoids deleting files to avoid any inadvertent data loss and instead leaves a few dangling files in case of deletes/untracking. The experience here can definitely be improved though and we'll use this issue to track that