Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix(dbt-fal): overwrite fal_scripts_path on every cloud run (#760)
Browse files Browse the repository at this point in the history
fix: overwrite fal_scripts_path on every cloud run
  • Loading branch information
mederka authored Feb 14, 2023
1 parent 31e3de3 commit d202cb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/adapter/src/dbt/adapters/fal_experimental/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def _isolated_runner(
adapter = reconstruct_adapter(config, manifest, macro_manifest)
fal_scripts_path = get_fal_scripts_path(config)
if local_packages is not None:
# Shoule we overwrite this?
assert not fal_scripts_path.exists(), f"Path: {fal_scripts_path} already exists in isolate cloud."
if fal_scripts_path.exists():
import shutil
shutil.rmtree(fal_scripts_path)
fal_scripts_path.parent.mkdir(parents=True, exist_ok=True)
zip_file = zipfile.ZipFile(io.BytesIO(local_packages))
zip_file.extractall(fal_scripts_path)
Expand Down

0 comments on commit d202cb1

Please sign in to comment.