From aa33d83a298bf571c0ef66459fa6954b65648b98 Mon Sep 17 00:00:00 2001 From: Themis Valtinos <73662635+themisvaltinos@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:43:11 +0200 Subject: [PATCH 1/2] Fix: Failing Airflow test for get_environment_statements method --- .circleci/continue_config.yml | 8 ++++---- sqlmesh/schedulers/airflow/state_sync.py | 11 ++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 8a1000c6b5..cab377b18d 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -281,10 +281,10 @@ workflows: - airflow_docker_tests: requires: - style_and_slow_tests - filters: - branches: - only: - - main + # filters: + # branches: + # only: + # - main - engine_tests_docker: name: engine_<< matrix.engine >> matrix: diff --git a/sqlmesh/schedulers/airflow/state_sync.py b/sqlmesh/schedulers/airflow/state_sync.py index 1eb39356bc..345584f6b3 100644 --- a/sqlmesh/schedulers/airflow/state_sync.py +++ b/sqlmesh/schedulers/airflow/state_sync.py @@ -325,9 +325,18 @@ def update_auto_restatements( ) def get_environment_statements(self, environment: str) -> t.List[EnvironmentStatements]: - raise NotImplementedError( + """Fetches the environment's statements from the environment_statements table. + Args: + environment: The environment name + + Returns: + A list of the environment statements. + + """ + logger.warning( "Fetching environment statements is not supported by the Airflow state sync." ) + return [] def migrate( self, From f140cb82df97300d90e4c88dc8347899d0ff90f6 Mon Sep 17 00:00:00 2001 From: Themis Valtinos <73662635+themisvaltinos@users.noreply.github.com> Date: Fri, 28 Feb 2025 11:18:40 +0200 Subject: [PATCH 2/2] Reinstate airflow circleci test --- .circleci/continue_config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index cab377b18d..8a1000c6b5 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -281,10 +281,10 @@ workflows: - airflow_docker_tests: requires: - style_and_slow_tests - # filters: - # branches: - # only: - # - main + filters: + branches: + only: + - main - engine_tests_docker: name: engine_<< matrix.engine >> matrix: