astronomer.providers.core.triggers.astro

Classes

AstroDeploymentTrigger

Custom Apache Airflow trigger for monitoring the completion status of an external deployment using Astro Cloud.

Module Contents

class astronomer.providers.core.triggers.astro.AstroDeploymentTrigger(external_dag_id, dag_run_id, external_task_id=None, astro_cloud_conn_id='astro_cloud_default', poke_interval=5.0, **kwargs)[source]

Bases: airflow.triggers.base.BaseTrigger

Custom Apache Airflow trigger for monitoring the completion status of an external deployment using Astro Cloud.

Parameters:
  • external_dag_id (str) – External ID of the DAG being monitored.

  • dag_run_id (str) – ID of the DAG run being monitored.

  • external_task_id (str | None) – External ID of the task being monitored. If None, monitors the entire DAG.

  • astro_cloud_conn_id (str) – The connection ID to retrieve Astro Cloud credentials. Defaults to “astro_cloud_default”.

  • poke_interval (float) – Time in seconds to wait between consecutive checks for completion status.

  • kwargs (Any) – Additional keyword arguments passed to the BaseTrigger constructor.

external_dag_id
dag_run_id
external_task_id
astro_cloud_conn_id
poke_interval
serialize()[source]

Serialize the trigger for storage in the database.

async run()[source]

Asynchronously runs the trigger and yields completion status events.

Checks the status of the external deployment using Astro Cloud at regular intervals. Yields TriggerEvent with the status “done” if successful, “failed” if failed.