astronomer / astronomer-providers

Airflow Providers containing Deferrable Operators & Sensors from Astronomer
https://astronomer-providers.rtfd.io/
Apache License 2.0
128 stars 25 forks source link

Add ExternalDeploymentSensor #1472

Closed pankajastro closed 5 months ago

pankajastro commented 5 months ago

Sensor expects external_dag_id as a required param and external_task_id as an optional param if external_task_id is provided then it monitors a task instance of task external_task_id otherwise monitors the overall status of external_dag_id.
Once the sensor execution starts it fetches the dag run for external_dag_id with status running or queued if found then waits for it to succeed or fail in the trigger component. if not found then return immediately and mark it a success.

~TODO;~

Assumption

When this sensor starts running it assumes that the dag it is monitoring is either in a running or queued state

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e088bdd) 98.28% compared to head (ac900b1) 98.33%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1472 +/- ## ========================================== + Coverage 98.28% 98.33% +0.05% ========================================== Files 91 94 +3 Lines 4485 4637 +152 ========================================== + Hits 4408 4560 +152 Misses 77 77 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pankajastro commented 5 months ago

PR to fix CI: https://github.com/astronomer/astronomer-providers/pull/1473