Skip to content

Commit

Permalink
openlineage: remove eager test for auth headers, fix example dag (#33087
Browse files Browse the repository at this point in the history
)

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
  • Loading branch information
mobuchowski authored Aug 3, 2023
1 parent e9a2bb3 commit 1c7472d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions airflow/example_dags/plugins/event_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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.
"""
Expand All @@ -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.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 1c7472d

Please sign in to comment.