Skip to content

Commit 977ead3

Browse files
authored
Fix: Warn into a console when the run is blocked by environment updates (#4769)
1 parent 08cd4eb commit 977ead3

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

sqlmesh/core/context.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,9 @@ def _block_until_finalized() -> str:
733733
raise SQLMeshError(f"Environment '{environment}' was not found.")
734734
if environment_state.finalized_ts:
735735
return environment_state.plan_id
736-
logger.warning(
737-
"Environment '%s' is being updated by plan '%s'. Retrying in %s seconds...",
738-
environment,
739-
environment_state.plan_id,
740-
self.config.run.environment_check_interval,
736+
self.console.log_warning(
737+
f"Environment '{environment}' is being updated by plan '{environment_state.plan_id}'. "
738+
f"Retrying in {self.config.run.environment_check_interval} seconds..."
741739
)
742740
time.sleep(self.config.run.environment_check_interval)
743741
raise SQLMeshError(
@@ -774,9 +772,8 @@ def _has_environment_changed() -> bool:
774772
)
775773
done = True
776774
except CircuitBreakerError:
777-
logger.warning(
778-
"Environment '%s' modified while running. Restarting the run...",
779-
environment,
775+
self.console.log_warning(
776+
f"Environment '{environment}' modified while running. Restarting the run..."
780777
)
781778
if exit_on_env_update:
782779
interrupted = True

0 commit comments

Comments
 (0)