-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ingest/airflow): Add way to disable Airflow plugin without a restart #12098
base: master
Are you sure you want to change the base?
Conversation
docs/lineage/airflow.md
Outdated
@@ -80,6 +80,37 @@ enabled = True # default | |||
| log_level | _no change_ | [debug] Set the log level for the plugin. | | |||
| debug_emitter | false | [debug] If true, the plugin will log the emitted events. | | |||
|
|||
#### Disabling the DataHub Plugin v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move these docs down to the "Debugging" section
logger.info("DataHub listener disabled by kill switch") | ||
return True | ||
except Exception as e: | ||
raise e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the point of this try catch?
@@ -482,6 +496,10 @@ def on_task_instance_running( | |||
def on_task_instance_finish( | |||
self, task_instance: "TaskInstance", status: InstanceRunResult | |||
) -> None: | |||
if self.check_kill_switch(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method is called by the success and failure hooks - so it doesn't need this
@@ -556,6 +577,9 @@ def on_task_instance_success( | |||
def on_task_instance_failed( | |||
self, previous_state: None, task_instance: "TaskInstance", session: "Session" | |||
) -> None: | |||
if self.check_kill_switch(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need to add these to the on_dag_...
methods
Checklist