z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
422 stars 45 forks source link

[bugfix] Trigger register project thread after flask server was started. #20

Closed ssassi closed 1 year ago

ssassi commented 1 year ago

Problem

Sometimes when running server serve --register-project the project didn't get registered and server gets stuck.

Solution

The register project thread is sending the post request to the server probably while the server is still doing some initialization, and can't process the request properly. Changing the order fixes the issue, but not the most robust solution.

Recommendation

Server's register endpoint should be improved to avoid this issue.