Bug Fix - DeckhandRetrieveRenderedDoc Operator

Testing performed after [0] was merged revealed 2 issues:

1) The name of the operator should be 'DeckhandRetrieveRenderedDocOperator'
   instead of 'DeckhandValidateSiteDesignOperator'.

2) We should be using task_id instead of subdag name to identify
   the task which requires retrieval of revision id

This patch set is meant to correct the behavior

[0] https://review.gerrithub.io/#/c/402347/

Change-Id: I4498cd37a1aa8f2b16e17b2a3e6d3e41b2ee47b1
This commit is contained in:
Anthony Lin 2018-03-05 05:08:19 +00:00
parent 479042c7d6
commit 7046ad34ed
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@
from airflow.models import DAG
from airflow.operators import DeckhandGetDesignOperator
from airflow.operators import DeckhandValidateSiteDesignOperator
from airflow.operators import DeckhandRetrieveRenderedDocOperator
# Location of shiyard.conf
@ -38,7 +38,7 @@ def get_design_deckhand(parent_dag_name, child_dag_name, args):
sub_dag_name=child_dag_name,
dag=dag)
shipyard_retrieve_rendered_doc = DeckhandValidateSiteDesignOperator(
shipyard_retrieve_rendered_doc = DeckhandRetrieveRenderedDocOperator(
task_id='shipyard_retrieve_rendered_doc',
shipyard_conf=config_path,
main_dag_name=parent_dag_name,

View File

@ -155,7 +155,7 @@ class DeckhandBaseOperator(BaseOperator):
# 'deckhand_get_design_version' task. We need to extract
# the xcom value from it in order to get the value of the
# last committed revision ID
if self.sub_dag_name != 'deckhand_get_design_version':
if self.task_id != 'deckhand_get_design_version':
# Retrieve 'revision_id' from xcom
self.revision_id = task_instance.xcom_pull(