risingwavelabs / dbt-risingwave

Apache License 2.0
21 stars 6 forks source link

cancel jobs/ddl-progress on ctrl-c/abort #47

Closed MattiasMTS closed 1 month ago

MattiasMTS commented 3 months ago

Opening this issue since I didn't have time to fix it myself.

Essentially, when running a dbt run command and you abort it halfway through - the dbt-postgres adapter cancel its connection but I don't think it is enough since you can still see the model being creating in rw_catalog.rw_ddl_progress system table.

So, I think one would have to implement a check on SHOW PROCESSLIST; and then KILL [process-id]; or something similar, as a post-hoc run when cancelling/aborting a run.