Relative Content

Tag Archive for airflow

Retrieve result status from AzureContainerInstancesOperator into XCOM in Airflow

I’d like to have an Airflow DAG get some status information back after running an AzureContainerInstancesOperator task in Airflow. With the equivalent docker operator, DockerOperator, it is possible to get the last line of output by default inserted into XCOM. With the AzureContainerInstancesOperator, this seems less likely to be possible since the container is run remotely, possibly without network access.

Airflow scheduled DAG randomly not triggering

I have a dag scheduled using EventsTimetable. It ran three time on schedule as expected, and then completely ignored two runs in a row- No failure/skipped in the UI, no alert email. Nothing in the logs either, as if the run was never scheduled at all. The “next run” showed up correctly in the UI before the runs that were skipped. Today, it magically started running on schedule again. We are running airflow on AKS, but I checked the pods and all seemed to be running normally when the outage occurred.

Airflow Random Failure

We have a Airflow job thats sends a lot of messages (>100k) to SQS. The job fails sometimes fails for no reason. When retriggered, it succeeds without any change in code.
Error message: airflow.exceptions.AirflowException: Bash command failed. The command returned a non-zero exit code 1.

How do i set start date for ExternalTaskSensor in Airflow?

Often times i need to use task catchup to fill some tables, and sometimes these dags are dependent on other ones. However, dependency dag might not have runs in all days on which the dependent one will catchup.
So far solution is to merge dag with commented sensor, run catchup, then uncomment sensor.
I wonder if there is a way to specify a date from which sensor will actually check for dagruns, and until that day to have it succeeding.

Pass Airflow Variables to Task

Is there an accepted best practice for passing or accessing encrypted Airflow variables/connections in modules executed during the DagRun? Is passing it as an argument to the PythonOperator with op_kwargs sufficient?

How to apply changes to Airflow job_heartbeat_sec scheduler variable

So I’ve updated the value of job_heartbeat_sec in the [scheduler] section of airflow.cfg. I stopped and restarted the scheduler after updating the value of the variable. I expected the /health endpoint of the Webserver UI to only update the heartbeat timestamp every 20 seconds, but it is still using the default 5.