This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-7-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 8351ae5fac46b3c864e0947720f292eb3b8e3a8a Author: Maciej Obuchowski <[email protected]> AuthorDate: Thu Aug 3 23:49:15 2023 +0200 openlineage: remove eager test for auth headers, fix example dag (#33087) Signed-off-by: Maciej Obuchowski <[email protected]> (cherry picked from commit 1c7472df70e12f89ee18ef62b84da74386d50f90) --- airflow/example_dags/plugins/event_listener.py | 6 +++--- tests/providers/openlineage/plugins/test_openlineage_adapter.py | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/airflow/example_dags/plugins/event_listener.py b/airflow/example_dags/plugins/event_listener.py index 2e2d01800b..16848c9ebc 100644 --- a/airflow/example_dags/plugins/event_listener.py +++ b/airflow/example_dags/plugins/event_listener.py @@ -111,7 +111,7 @@ def on_task_instance_failed(previous_state: TaskInstanceState, task_instance: Ta # [START howto_listen_dagrun_success_task] @hookimpl -def on_dag_run_success(dag_run: DagRun, message: str): +def on_dag_run_success(dag_run: DagRun, msg: str): """ This method is called when dag run state changes to SUCCESS. """ @@ -126,7 +126,7 @@ def on_dag_run_success(dag_run: DagRun, message: str): # [START howto_listen_dagrun_failure_task] @hookimpl -def on_dag_run_failed(dag_run: DagRun, message: str): +def on_dag_run_failed(dag_run: DagRun, msg: str): """ This method is called when dag run state changes to FAILED. """ @@ -142,7 +142,7 @@ def on_dag_run_failed(dag_run: DagRun, message: str): # [START howto_listen_dagrun_running_task] @hookimpl -def on_dag_run_running(dag_run: DagRun, message: str): +def on_dag_run_running(dag_run: DagRun, msg: str): """ This method is called when dag run state changes to RUNNING. """ diff --git a/tests/providers/openlineage/plugins/test_openlineage_adapter.py b/tests/providers/openlineage/plugins/test_openlineage_adapter.py index f81974a93e..b762d82800 100644 --- a/tests/providers/openlineage/plugins/test_openlineage_adapter.py +++ b/tests/providers/openlineage/plugins/test_openlineage_adapter.py @@ -43,7 +43,6 @@ def test_create_client_from_ol_env(): assert client.transport.url == "http://ol-api:5000" assert "Authorization" in client.transport.session.headers - assert client.transport.session.headers["Authorization"] == "Bearer api-key" @conf_vars( @@ -57,8 +56,6 @@ def test_create_client_from_config_with_options(): assert client.transport.kind == "http" assert client.transport.url == "http://ol-api:5000" - assert "Authorization" in client.transport.session.headers - assert client.transport.session.headers["Authorization"] == "Bearer api-key" @conf_vars(
