diff --git a/shipyard_airflow/dags/deckhand_get_design.py b/shipyard_airflow/dags/deckhand_get_design.py index d673471e..abfd8816 100644 --- a/shipyard_airflow/dags/deckhand_get_design.py +++ b/shipyard_airflow/dags/deckhand_get_design.py @@ -38,15 +38,21 @@ def get_design_deckhand(parent_dag_name, child_dag_name, args): sub_dag_name=child_dag_name, dag=dag) - shipyard_retrieve_rendered_doc = DeckhandOperator( - task_id='shipyard_retrieve_rendered_doc', - shipyard_conf=config_path, - action='shipyard_retrieve_rendered_doc', - main_dag_name=parent_dag_name, - sub_dag_name=child_dag_name, - dag=dag) + # TODO: There is a bug in Deckhand client that is preventing + # 'shipyard_retrieve_rendered_doc' from working properly. We + # are commenting this part of the workflow while we resolve + # the issue with the Deckhand client. We will uncomment this + # block once the issue with Deckhand is resolved. + # + # shipyard_retrieve_rendered_doc = DeckhandOperator( + # task_id='shipyard_retrieve_rendered_doc', + # shipyard_conf=config_path, + # action='shipyard_retrieve_rendered_doc', + # main_dag_name=parent_dag_name, + # sub_dag_name=child_dag_name, + # dag=dag) # Define dependencies - shipyard_retrieve_rendered_doc.set_upstream(deckhand_design) + # shipyard_retrieve_rendered_doc.set_upstream(deckhand_design) return dag diff --git a/shipyard_airflow/plugins/deckhand_operator.py b/shipyard_airflow/plugins/deckhand_operator.py index 9f0d8b40..b698d793 100644 --- a/shipyard_airflow/plugins/deckhand_operator.py +++ b/shipyard_airflow/plugins/deckhand_operator.py @@ -121,7 +121,7 @@ class DeckhandOperator(BaseOperator): if self.action == 'shipyard_retrieve_rendered_doc': if revision_id: self.retrieve_rendered_doc(context, - revision_id=revision_id) + revision_id) else: raise AirflowException('Invalid revision ID!') @@ -129,7 +129,7 @@ class DeckhandOperator(BaseOperator): elif self.action == 'deckhand_validate_site_design': if revision_id: self.deckhand_validate_site(context, - revision_id=revision_id) + revision_id) else: raise AirflowException('Invalid revision ID!') @@ -216,7 +216,7 @@ class DeckhandOperator(BaseOperator): if validation_status: logging.info("Revision %d has been successfully validated", - context['revision_id']) + revision_id) else: raise AirflowException("DeckHand Site Design Validation Failed!") @@ -244,7 +244,12 @@ class DeckhandOperator(BaseOperator): logging.info("Setting up DeckHand Client...") # Set up DeckHand Client - deckhandclient = deckhand_client.Client(session=sess) + # NOTE: The communication between the Airflow workers and Deckhand + # happens via the 'internal' endpoint and not the 'public' endpoint. + # Hence we will need to override the 'endpoint_type' from the default + # 'public' endpoint to 'internal' endpoint. + deckhandclient = deckhand_client.Client(session=sess, + endpoint_type='internal') logging.info("Retrieving Rendered Document...")