fal-ai / dbt-fal

do more with dbt. dbt-fal helps you run Python alongside dbt, so you can send Slack alerts, detect anomalies and build machine learning models.
https://fal.ai/dbt-fal
Apache License 2.0
853 stars 72 forks source link

fix: make dbt-fal work with koldstart #757

Closed mederka closed 1 year ago

mederka commented 1 year ago
    # HACK ALERT: This is a temporary solution for running Python models on Koldstart.
    # Environments in dbt-fal work with `isolate` abstractions and so far these
    # have been re-used to get us here. But `koldstart` API uses different
    # abstractions. So this where we tranform `isolate` objects into `koldstart`
    # objects and run the resulting isolated function.

    # One big change in `koldstart` is that it supports only one target environment
    # whereas isolate lets you stack environments on top of each other. We resolve this
    # in two ways, for `virtualenv` environments we just merge base requirements (dbt-*)
    # with user requirements, whereas for `conda` environments we create an `env_dict`,
    # where we add base requirements as `pip` requirements.
linear[bot] commented 1 year ago
FEA-889 Fix koldstart integration to dbt-fal

1. remove `isolate` completely 2. use `function.on(local)` when running locally