operator_extra_links = def _init_ ( self, *, trigger_dag_id : str, trigger_run_id : str | None = None, conf : dict | None = None, execution_date : str | datetime. :param deferrable: If waiting for completion, whether or not to defer the task until done, default is ``False``. :param failed_states: List of failed or dis-allowed states, default is ``None``. (default: 60) :param allowed_states: List of allowed states, default is ````. (default: False) :param poke_interval: Poke interval to check dag run status when wait_for_completion=True. :param wait_for_completion: Whether or not wait for dag run completion. When reset_dag_run=True and dag run exists, existing dag run will be cleared to rerun. When reset_dag_run=False and dag run exists, DagRunAlreadyExists will be raised. Dag run conf is immutable and will not be reset on rerun of an existing dag run. This only resets (not recreates) the dag run. This is useful when backfill or rerun an existing dag run. :param reset_dag_run: Whether clear existing dag run if already exists. :param execution_date: Execution date for the dag (templated). :param conf: Configuration for the DAG run (templated). If not provided, a run ID will be automatically generated. :param trigger_run_id: The run ID to use for the triggered DAG run (templated). :param trigger_dag_id: The dag_id to trigger (templated). class TriggerDagRunOperator ( BaseOperator ): """ Triggers a DAG run for a specified ``dag_id``. from _future_ import annotations import datetime import json import time from typing import TYPE_CHECKING, Any, Sequence, cast from import NoResultFound from _dag import trigger_dag from airflow.exceptions import AirflowException, DagNotFound, DagRunAlreadyExists from import BaseOperator, BaseOperatorLink from import DagModel from import DagBag from import DagRun from import XCom from _task import DagStateTrigger from airflow.utils import timezone from import Context from import build_airflow_url_with_query from import provide_session from import State from import DagRunType ![]() See the License for the # specific language governing permissions and limitations # under the License. You may obtain a copy of the License at # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License") you may not use this file except in compliance # with the License. ![]() See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The postgres deployment has been working as expected.# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. Using the Apache Airflow Helm Chart 1.6.0 but we have upgraded the airflow version to 2.4.2.Īlso using self deployed postgres with pgbouncer enabled. Official Apache Airflow Helm Chart Deployment details Operating Systemĭebian 11 bullseye Versions of Apache Airflow ProvidersĪpache-airflow-providers-cncf-kubernetes=4.4.0Īpache-airflow-providers-common-sql=1.2.0Īpache-airflow-providers-elasticsearch=4.2.1Īpache-airflow-providers-hashicorp=3.1.0Īpache-airflow-providers-microsoft-azure=4.3.0 You will also be able to see that the example DAG has correctly been rerun at the specified execution_date (the started timestamp should be different). Note the Started timestamp of the example DAG run with RUN_ID=scheduled_T00:00:00+00:00Īfter this is done you should be able to see that the trigger task in trigger_exampe fails with the list index out of bounds exception (see stacktrace above).Enable the example DAG and let it catchup.To reproduce I used the following two DAGs example-dag.pyįrom _dagrun import 10, 25, tz="UTC"), But I still expect this not to fail since it's actually working. The DAG run should be cleared since a run at the specified execution_date exists, or if something else actually is wrong this should probably be logged better so the user understands what's wrong their DAG.Īfter some further testing I noticed that the DAG run is actually cleared and rerun at the specified execution_date, so the exception that occurs only causes the TriggerDagRunOperator task to fail. INFO - 0 downstream tasks scheduled from follow-on schedule check
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |