snowplow / sql-runner

Run templatable playbooks of SQL scripts in series and parallel on Redshift, PostgreSQL, BigQuery and Snowflake
http://snowplowanalytics.com
Apache License 2.0
80 stars 14 forks source link

Prevent exiting from goroutine #202

Closed adatzer closed 2 years ago

adatzer commented 2 years ago

In NewBigQueryTarget and NewSnowflakeTarget is possible to have a fatal log that makes the program exit from inside the goroutine that called them e.g. here. This also means that the program exits with a log that misses helpful context from TargetStatus, since the target channel never receives and the exit happens while Run is blocked here.