Skip to content

Commit

Permalink
fix retry as CLI (#9443)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenyuLInx authored Jan 24, 2024
1 parent ad723a6 commit 50b85a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240124-142522.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix retry command run from CLI
time: 2024-01-24T14:25:22.846199-08:00
custom:
Author: ChenyuLInx
Issue: "9444"
3 changes: 1 addition & 2 deletions core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,12 @@ def run(ctx, **kwargs):
@requires.profile
@requires.project
@requires.runtime_config
@requires.manifest
def retry(ctx, **kwargs):
"""Retry the nodes that failed in the previous run."""
# Retry will parse manifest inside the task after we consolidate the flags
task = RetryTask(
ctx.obj["flags"],
ctx.obj["runtime_config"],
ctx.obj["manifest"],
)

results = task.run()
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/task/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@


class RetryTask(ConfiguredTask):
def __init__(self, args, config, manifest) -> None:
def __init__(self, args, config) -> None:
# load previous run results
state_path = args.state or config.target_path
self.previous_results = load_result_state(
Expand Down

0 comments on commit 50b85a0

Please sign in to comment.