From 19bf903422302445fd974d3977ae02305f21c629 Mon Sep 17 00:00:00 2001 From: Ishan Date: Wed, 3 Jan 2024 08:20:28 +0530 Subject: [PATCH] deps,clean and docs generate missing from the pipeline. --- .../commands/run-tasks-migrate-cmd.py | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/ddpui/management/commands/run-tasks-migrate-cmd.py b/ddpui/management/commands/run-tasks-migrate-cmd.py index 08dee276..1756e46f 100644 --- a/ddpui/management/commands/run-tasks-migrate-cmd.py +++ b/ddpui/management/commands/run-tasks-migrate-cmd.py @@ -1008,26 +1008,7 @@ def migrate_org_pipelines(self, org: Org): continue org_task = OrgTask.objects.filter(org=org, task=task).first() - if org_task.task.slug == TASK_DBTRUN: - dbt_core_task_setup = PrefectDbtTaskSetup( - seq=TRANSFORM_TASKS_SEQ[org_task.task.slug] + seq, - slug=org_task.task.slug, - commands=[ - f"{dbt_binary} {org_task.task.command} --target {target}" - ], - type=DBTCORE, - env={}, - working_dir=project_dir, - profiles_dir=f"{project_dir}/profiles/", - project_dir=project_dir, - cli_profile_block=cli_profile_block.block_name, - cli_args=[], - ) - - task_config = dict(dbt_core_task_setup) - tasks.append(task_config) - - elif org_task.task.slug == TASK_GITPULL: + if org_task.task.slug == TASK_GITPULL: shell_env = {"secret-git-pull-url-block": ""} gitpull_secret_block = OrgPrefectBlockv1.objects.filter( @@ -1050,6 +1031,24 @@ def migrate_org_pipelines(self, org: Org): task_config = dict(shell_task_setup) tasks.append(task_config) + else: + dbt_core_task_setup = PrefectDbtTaskSetup( + seq=TRANSFORM_TASKS_SEQ[org_task.task.slug] + seq, + slug=org_task.task.slug, + commands=[ + f"{dbt_binary} {org_task.task.command} --target {target}" + ], + type=DBTCORE, + env={}, + working_dir=project_dir, + profiles_dir=f"{project_dir}/profiles/", + project_dir=project_dir, + cli_profile_block=cli_profile_block.block_name, + cli_args=[], + ) + + task_config = dict(dbt_core_task_setup) + tasks.append(task_config) params["config"] = {"tasks": tasks} logger.info(f"PARAMS {new_dataflow.deployment_id}")