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:
parent
479042c7d6
commit
7046ad34ed
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
from airflow.models import DAG
|
from airflow.models import DAG
|
||||||
from airflow.operators import DeckhandGetDesignOperator
|
from airflow.operators import DeckhandGetDesignOperator
|
||||||
from airflow.operators import DeckhandValidateSiteDesignOperator
|
from airflow.operators import DeckhandRetrieveRenderedDocOperator
|
||||||
|
|
||||||
|
|
||||||
# Location of shiyard.conf
|
# 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,
|
sub_dag_name=child_dag_name,
|
||||||
dag=dag)
|
dag=dag)
|
||||||
|
|
||||||
shipyard_retrieve_rendered_doc = DeckhandValidateSiteDesignOperator(
|
shipyard_retrieve_rendered_doc = DeckhandRetrieveRenderedDocOperator(
|
||||||
task_id='shipyard_retrieve_rendered_doc',
|
task_id='shipyard_retrieve_rendered_doc',
|
||||||
shipyard_conf=config_path,
|
shipyard_conf=config_path,
|
||||||
main_dag_name=parent_dag_name,
|
main_dag_name=parent_dag_name,
|
||||||
|
|
|
@ -155,7 +155,7 @@ class DeckhandBaseOperator(BaseOperator):
|
||||||
# 'deckhand_get_design_version' task. We need to extract
|
# 'deckhand_get_design_version' task. We need to extract
|
||||||
# the xcom value from it in order to get the value of the
|
# the xcom value from it in order to get the value of the
|
||||||
# last committed revision ID
|
# 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
|
# Retrieve 'revision_id' from xcom
|
||||||
self.revision_id = task_instance.xcom_pull(
|
self.revision_id = task_instance.xcom_pull(
|
||||||
|
|
Loading…
Reference in New Issue