From 67c5482773493c292583320efb376ba3aa898af4 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Mon, 4 Mar 2024 16:25:26 +0000 Subject: [PATCH 1/3] Fix incorrect node names + switch e2e tests to spaceflights-pandas Signed-off-by: Ankita Katiyar --- kedro-airflow/features/airflow.feature | 8 ++++---- kedro-airflow/features/steps/cli_steps.py | 2 +- kedro-airflow/kedro_airflow/airflow_dag_template.j2 | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kedro-airflow/features/airflow.feature b/kedro-airflow/features/airflow.feature index b6e61b7b5..18d6fc237 100644 --- a/kedro-airflow/features/airflow.feature +++ b/kedro-airflow/features/airflow.feature @@ -10,9 +10,9 @@ Feature: Airflow And I have executed the kedro command "airflow create -t ../airflow/dags/" When I execute the airflow command "tasks list project-dummy" Then I should get a successful exit code - And I should get a message including "split" - And I should get a message including "train" - And I should get a message including "predict" + And I should get a message including "create-model-input-table-node" + And I should get a message including "preprocess-companies-node" + And I should get a message including "preprocess-shuttles-node" Scenario: Run Airflow task locally with latest Kedro Given I have installed kedro version "latest" @@ -20,6 +20,6 @@ Feature: Airflow And I have run a non-interactive kedro new And I have executed the kedro command "airflow create -t ../airflow/dags/" And I have installed the kedro project package - When I execute the airflow command "tasks test project-dummy split" + When I execute the airflow command "tasks test project-dummy preprocess-companies-node" Then I should get a successful exit code And I should get a message including "Loading data" diff --git a/kedro-airflow/features/steps/cli_steps.py b/kedro-airflow/features/steps/cli_steps.py index 759e70f2d..c4470f277 100644 --- a/kedro-airflow/features/steps/cli_steps.py +++ b/kedro-airflow/features/steps/cli_steps.py @@ -93,7 +93,7 @@ def create_project_from_config_file(context): "-c", str(context.config_file), "--starter", - "astro-airflow-iris", + "spaceflights-pandas", ], env=context.env, cwd=str(context.temp_dir), diff --git a/kedro-airflow/kedro_airflow/airflow_dag_template.j2 b/kedro-airflow/kedro_airflow/airflow_dag_template.j2 index d1d8b8237..796fbd2d5 100644 --- a/kedro-airflow/kedro_airflow/airflow_dag_template.j2 +++ b/kedro-airflow/kedro_airflow/airflow_dag_template.j2 @@ -65,7 +65,7 @@ with DAG( task_id="{{ node_name | safe | slugify }}", package_name=package_name, pipeline_name=pipeline_name, - node_name={% if node_list | length > 1 %}[{% endif %}{% for node in node_list %}"{{ node.name | safe | slugify }}"{% if not loop.last %}, {% endif %}{% endfor %}{% if node_list | length > 1 %}]{% endif %}, + node_name={% if node_list | length > 1 %}[{% endif %}{% for node in node_list %}"{{ node.name | safe }}"{% if not loop.last %}, {% endif %}{% endfor %}{% if node_list | length > 1 %}]{% endif %}, project_path=project_path, env=env, ), From 4d99985aaecc28e23f83564eef677fa402283105 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Mon, 4 Mar 2024 16:42:39 +0000 Subject: [PATCH 2/3] Not switch e2e tests starters for now Signed-off-by: Ankita Katiyar --- kedro-airflow/kedro_airflow/airflow_dag_template.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kedro-airflow/kedro_airflow/airflow_dag_template.j2 b/kedro-airflow/kedro_airflow/airflow_dag_template.j2 index 796fbd2d5..d1d8b8237 100644 --- a/kedro-airflow/kedro_airflow/airflow_dag_template.j2 +++ b/kedro-airflow/kedro_airflow/airflow_dag_template.j2 @@ -65,7 +65,7 @@ with DAG( task_id="{{ node_name | safe | slugify }}", package_name=package_name, pipeline_name=pipeline_name, - node_name={% if node_list | length > 1 %}[{% endif %}{% for node in node_list %}"{{ node.name | safe }}"{% if not loop.last %}, {% endif %}{% endfor %}{% if node_list | length > 1 %}]{% endif %}, + node_name={% if node_list | length > 1 %}[{% endif %}{% for node in node_list %}"{{ node.name | safe | slugify }}"{% if not loop.last %}, {% endif %}{% endfor %}{% if node_list | length > 1 %}]{% endif %}, project_path=project_path, env=env, ), From 3eff661d8e155ecb584c31ca86987645365e1e68 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Mon, 4 Mar 2024 16:45:31 +0000 Subject: [PATCH 3/3] Revert changes to e2e tests Signed-off-by: Ankita Katiyar --- kedro-airflow/features/airflow.feature | 8 ++++---- kedro-airflow/features/steps/cli_steps.py | 2 +- kedro-airflow/kedro_airflow/airflow_dag_template.j2 | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kedro-airflow/features/airflow.feature b/kedro-airflow/features/airflow.feature index 18d6fc237..b6e61b7b5 100644 --- a/kedro-airflow/features/airflow.feature +++ b/kedro-airflow/features/airflow.feature @@ -10,9 +10,9 @@ Feature: Airflow And I have executed the kedro command "airflow create -t ../airflow/dags/" When I execute the airflow command "tasks list project-dummy" Then I should get a successful exit code - And I should get a message including "create-model-input-table-node" - And I should get a message including "preprocess-companies-node" - And I should get a message including "preprocess-shuttles-node" + And I should get a message including "split" + And I should get a message including "train" + And I should get a message including "predict" Scenario: Run Airflow task locally with latest Kedro Given I have installed kedro version "latest" @@ -20,6 +20,6 @@ Feature: Airflow And I have run a non-interactive kedro new And I have executed the kedro command "airflow create -t ../airflow/dags/" And I have installed the kedro project package - When I execute the airflow command "tasks test project-dummy preprocess-companies-node" + When I execute the airflow command "tasks test project-dummy split" Then I should get a successful exit code And I should get a message including "Loading data" diff --git a/kedro-airflow/features/steps/cli_steps.py b/kedro-airflow/features/steps/cli_steps.py index c4470f277..759e70f2d 100644 --- a/kedro-airflow/features/steps/cli_steps.py +++ b/kedro-airflow/features/steps/cli_steps.py @@ -93,7 +93,7 @@ def create_project_from_config_file(context): "-c", str(context.config_file), "--starter", - "spaceflights-pandas", + "astro-airflow-iris", ], env=context.env, cwd=str(context.temp_dir), diff --git a/kedro-airflow/kedro_airflow/airflow_dag_template.j2 b/kedro-airflow/kedro_airflow/airflow_dag_template.j2 index d1d8b8237..796fbd2d5 100644 --- a/kedro-airflow/kedro_airflow/airflow_dag_template.j2 +++ b/kedro-airflow/kedro_airflow/airflow_dag_template.j2 @@ -65,7 +65,7 @@ with DAG( task_id="{{ node_name | safe | slugify }}", package_name=package_name, pipeline_name=pipeline_name, - node_name={% if node_list | length > 1 %}[{% endif %}{% for node in node_list %}"{{ node.name | safe | slugify }}"{% if not loop.last %}, {% endif %}{% endfor %}{% if node_list | length > 1 %}]{% endif %}, + node_name={% if node_list | length > 1 %}[{% endif %}{% for node in node_list %}"{{ node.name | safe }}"{% if not loop.last %}, {% endif %}{% endfor %}{% if node_list | length > 1 %}]{% endif %}, project_path=project_path, env=env, ),