spraakbanken / karp-backend

Karp backend
MIT License
3 stars 2 forks source link

A failed `karp-cli resource create` leaves a half-created resource #247

Closed nick8325 closed 6 months ago

nick8325 commented 6 months ago

When calling karp-cli resource create using an invalid config (e.g. a field that has a missing type), it creates the MySQL table but then fails to create the Elasticsearch index. The resource then has to be manually deleted.

Maybe it should delete the resource if the create fails? Alternatively, we could validate the resource config first.