Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove noop playbook check #629

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions tdp/core/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
DagOperation,
ForgedDagOperation,
OperationName,
OperationNoop,
PlaybookOperation,
)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading