Skip to content

Skipped state isn't propagated downstream, resulting in DAG runs stuck in running state #680

Closed

Description

@r39132

I'm running 1.6.0

Referring to #436, which was recently closed. I believe that should be reopened and linked to this issue.

I am seeing 2 sorts of broken behaviour around branching and joining. This bug captures the right side of the decision, and #685 captures the left side of the decision.

I am seeing the following behavior :

The DAG runs are complete in the picture below, except for the one that failed. I'm interested in the ones which should be skipped, but still show empty blank squares. There are 3 of them. These should all be skipped.

screenshot 2015-11-22 18 18 06

The last task in the DAG is send_email_notification_flow_successful, which completed. The branch operator took the branch that skips model building and immediately called aggregate_data_spark_job. When it did this, it skipped build_sender_models_spark_job and its direct downstream dependents.

Here's the DAG view :
screenshot 2015-11-22 18 08 13

Unfortunately, the state is not being recorded as skipped for those descendants (e.g. build_cdd_..., build_dom_rep..., etc...) and those are shown as permanently unrun, leaving the DAGRUN in a "running state" forever!

I am including the task definition of the aggregate_data_spark_job below, where I use the trigger_rule='one_success' :

aggregate_data_spark_job = BashOperator(
    task_id='aggregate_data_spark_job',
    execution_timeout=timedelta(hours=3),
    trigger_rule='one_success',
    priority_weight=5,
    pool='ep_data_pipeline_spark_tasks_only',
    bash_command=optional_aggregation_templated_command,
    params={'ENV': ENV,
            'import_spark_cluster_ip': import_spark_cluster_ip,
            'granularity_secs': import_airflow_granularity_secs,
            'compute_end_dt' : compute_end_dt},
    dag=dag)
aggregate_data_spark_job.set_upstream(check_for_successful_model_building_branch_condition)
aggregate_data_spark_job.set_upstream(check_for_time_to_build_model_branch_condition)

Activity

  1. mistercrunch commented on Nov 23, 2015

    @mistercrunch
    Member

    Can you test that it is still the case on 1.6.2? I reviewed the related 1.6.2 code and I can't think of any reason why these task instances wouldn't get skipped.

  2. r39132 commented on Nov 23, 2015

    @r39132
    ContributorAuthor

    I didn't see a tag for 1.6.2, but I pulled head from master. I confirmed the same broken behavior. There is additionally another problem as well, which I am tracking in a separate bug : #685

  3. changed the title [-]Join Operator not working - DAG runs in permanent "Running" state[/-] [+]Branch and Join Operators not working - DAG runs in permanent "Running" state[/+] on Nov 23, 2015
  4. changed the title [-]Branch and Join Operators not working - DAG runs in permanent "Running" state[/-] [+]Skipped state isn't propagated downstream, resulting in DAG runs stuck in running state[/+] on Nov 23, 2015
  5. r39132 commented on Nov 24, 2015

    @r39132
    ContributorAuthor

    After disabling depends_on_past (i.e. setting it to False), this worked for me.

    Some documentation has been added at a3dacf6

    screenshot 2015-11-23 17 16 02

  6. r39132 commented on Nov 24, 2015

    @r39132
    ContributorAuthor

    The issue is that "depends_on_past:True" does not currently work well with branch operators.

  7. reopened this on Mar 16, 2016
  8. r39132 commented on Mar 16, 2016

    @r39132
    ContributorAuthor

    This will be tracked in #1155 so closing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions