Skip to content

Commit 43ad367

Browse files
committed
Warn in migration script if blueprint variables were found
1 parent 6b83d4e commit 43ad367

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sqlmesh/migrations/v0088_warn_about_variable_python_env_diffs.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ def migrate(state_sync, **kwargs): # type: ignore
6363

6464
python_env = node.get("python_env") or {}
6565

66-
if (SQLMESH_VARS in python_env or SQLMESH_BLUEPRINT_VARS in python_env) and (
67-
any(v.get("is_metadata") for v in python_env.values())
68-
or any(node.get(k) for k in METADATA_HASH_EXPRESSIONS)
66+
if SQLMESH_BLUEPRINT_VARS in python_env or (
67+
SQLMESH_VARS in python_env
68+
and (
69+
any(v.get("is_metadata") for v in python_env.values())
70+
or any(node.get(k) for k in METADATA_HASH_EXPRESSIONS)
71+
)
6972
):
7073
get_console().log_warning(warning)
7174
return

0 commit comments

Comments
 (0)