Skip to content

Commit

Permalink
[Backport 1.7.latest] fix retry as CLI (#9448)
Browse files Browse the repository at this point in the history
(cherry picked from commit 50b85a0)

Co-authored-by: Chenyu Li <[email protected]>
  • Loading branch information
github-actions[bot] and ChenyuLInx authored Jan 25, 2024
1 parent 3f3dda4 commit bc494bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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"
2 changes: 1 addition & 1 deletion core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ def run(ctx, **kwargs):
@requires.runtime_config
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 bc494bb

Please sign in to comment.