From b032556e7d2284ba018eace81012142a2e726365 Mon Sep 17 00:00:00 2001 From: Paul Farault Date: Wed, 23 Oct 2024 12:21:22 +0200 Subject: [PATCH] fix: remove noop playbook check --- tdp/core/dag.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tdp/core/dag.py b/tdp/core/dag.py index 0d287b78..c57fc3fd 100644 --- a/tdp/core/dag.py +++ b/tdp/core/dag.py @@ -25,7 +25,6 @@ DagOperation, ForgedDagOperation, OperationName, - OperationNoop, PlaybookOperation, ) @@ -277,7 +276,6 @@ def validate_dag_nodes( - \*_start operations can only be required from within its own service - \*_install operations should only depend on other \*_install operations - Each service (HDFS, HBase, Hive, etc) should have \*_install, \*_config, \*_init and \*_start operations even if they are "empty" (tagged with noop) - - Operations tagged with the noop flag should not have a playbook defined in the collection - Each service action (config, start, init) except the first (install) must have an explicit dependency with the previous service operation within the same service """ # key: service_name @@ -351,18 +349,6 @@ def warning(operation: DagOperation, message: str) -> None: f"'{operation.name.service}_{previous_action}'" ) - # Operations tagged with the noop flag should not have a playbook defined in the collection - - #! This case can't happen because no operation inherits both PlaybookOperation and NoOp - if str(operation_name) in collections.playbooks: - if isinstance(operation, OperationNoop): - c_warning( - f"Operation '{operation_name}' is noop and the playbook should not exist" - ) - else: - if not isinstance(operation, OperationNoop): - c_warning(f"Operation '{operation_name}' should have a playbook") - # Each service (HDFS, HBase, Hive, etc) should have *_install, *_config, *_init and *_start actions # even if they are "empty" (tagged with noop) # Part 2