From 36d4f998662e4fe85f0e3f7f07f3e53fb4d549f3 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Fri, 17 May 2024 14:17:51 -0500 Subject: [PATCH] add new mode --- core/dbt/cli/requires.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/dbt/cli/requires.py b/core/dbt/cli/requires.py index 0104515d601..a7a282f2891 100644 --- a/core/dbt/cli/requires.py +++ b/core/dbt/cli/requires.py @@ -107,6 +107,8 @@ def setup_record_replay(): recorder = Recorder(RecorderMode.REPLAY, recording_path) elif rec_mode == RecorderMode.RECORD: recorder = Recorder(RecorderMode.RECORD) + elif rec_mode == RecorderMode.RECORD_QUERIES: + recorder = Recorder(RecorderMode.RECORD_QUERIES) get_invocation_context().recorder = recorder @@ -114,7 +116,7 @@ def setup_record_replay(): def tear_down_record_replay(): recorder = get_invocation_context().recorder if recorder is not None: - if recorder.mode == RecorderMode.RECORD: + if recorder.mode == RecorderMode.RECORD or recorder.mode == RecorderMode.RECORD_QUERIES: recorder.write("recording.json") elif recorder.mode == RecorderMode.REPLAY: recorder.write_diffs("replay_diffs.json")