From 754aa2350e9204d40f03f39c1a2b5538e84bc674 Mon Sep 17 00:00:00 2001 From: John Joyce Date: Tue, 26 Apr 2022 06:30:41 -0700 Subject: [PATCH] feat(cli): Eagerly load datahub actions CLI commands (#4748) --- metadata-ingestion/src/datahub/entrypoints.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/metadata-ingestion/src/datahub/entrypoints.py b/metadata-ingestion/src/datahub/entrypoints.py index 9d66e1612c1cb0..2c13e1283fc5ce 100644 --- a/metadata-ingestion/src/datahub/entrypoints.py +++ b/metadata-ingestion/src/datahub/entrypoints.py @@ -132,6 +132,15 @@ def init() -> None: datahub.add_command(telemetry_cli) datahub.add_command(migrate) datahub.add_command(timeline) +try: + import datahub_actions + + datahub.add_command(datahub_actions.cli.actions) +except ImportError: + # TODO: Increase the log level once this approach has been validated. + logger.debug( + "Failed to load datahub actions framework. Please confirm that the acryl-datahub-actions package has been installed from PyPi." + ) def main(**kwargs):