-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-3294] [Bug] dbt retry
does not respect target-path CLI flag / env variable
#8948
Comments
dbt retry
does not respect target-path CLI flag / env variabledbt retry
does not respect target-path CLI flag / env variable
Thanks for raising this @kevin-chao ! This looks like it was solved in dbt-core 1.6.6 by #8803:
Could you give this a shot and see if it solves this for you? |
Hey @dbeatty10, thanks for the quick triage! I gave it a try with When using ============================== 14:52:08.998563 | d7da2086-a55a-48f9-b343-9a8bda1ab450 ==============================
�[0m14:52:08.998563 [info ] [MainThread]: Running with dbt=1.6.6
�[0m14:52:08.998951 [debug] [MainThread]: running dbt with arguments {'printer_width': '80', 'indirect_selection': 'eager', 'write_json': 'True', 'log_cache_events': 'False', 'partial_parse': 'True', 'cache_selected_only': 'False', 'profiles_dir': '/Users/kevin/.dbt', 'debug': 'False', 'version_check': 'True', 'log_path': '/Users/kevin/dbt/logs', 'fail_fast': 'False', 'warn_error': 'None', 'use_colors': 'True', 'use_experimental_parser': 'False', 'no_print': 'None', 'quiet': 'False', 'log_format': 'default', 'static_parser': 'True', 'invocation_command': 'dbt retry', 'introspect': 'True', 'target_path': 'None', 'warn_error_options': 'WarnErrorOptions(include=[], exclude=[])', 'send_anonymous_usage_stats': 'True'}
�[0m14:52:09.186531 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': 'd7da2086-a55a-48f9-b343-9a8bda1ab450', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x105ca58b0>]}
�[0m14:52:09.197814 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': 'd7da2086-a55a-48f9-b343-9a8bda1ab450', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x107803a60>]}
�[0m14:52:09.198372 [info ] [MainThread]: Registered adapter: snowflake=1.6.4
�[0m14:52:09.240377 [debug] [MainThread]: checksum: 546b81fb56652c304d87abd676e84d4737d8a0c6b62160f4a6e79dcddbc842bb, vars: {}, profile: , target: , version: 1.6.6
�[0m14:52:10.576116 [debug] [MainThread]: Partial parsing enabled: 0 files deleted, 0 files added, 0 files changed.
�[0m14:52:10.576597 [debug] [MainThread]: Partial parsing enabled, no changes found, skipping parsing
�[0m14:52:11.008990 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'load_project', 'label': 'd7da2086-a55a-48f9-b343-9a8bda1ab450', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x125f3eee0>]}
�[0m14:52:12.206905 [error] [MainThread]: Encountered an error:
Runtime Error
Could not find previous run in 'target' target directory
�[0m14:52:12.207506 [debug] [MainThread]: Command `dbt retry` failed at 14:52:12.207445 after 3.24 seconds
�[0m14:52:12.207786 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x1034eeb80>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x152d58fd0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x152d58fa0>]}
�[0m14:52:12.208054 [debug] [MainThread]: Flushing usage events
�[0m14:53:55.114401 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x105c2efa0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x108431ee0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x1084465b0>]} When using ============================== 14:53:55.117193 | 4ad12cdc-9bf6-4e32-be39-78f854e8e0d2 ==============================
�[0m14:53:55.117193 [info ] [MainThread]: Running with dbt=1.6.6
�[0m14:53:55.117858 [debug] [MainThread]: running dbt with arguments {'printer_width': '80', 'indirect_selection': 'eager', 'write_json': 'True', 'log_cache_events': 'False', 'partial_parse': 'True', 'cache_selected_only': 'False', 'warn_error': 'None', 'version_check': 'True', 'profiles_dir': '/Users/kevin/.dbt', 'log_path': '/Users/kevin/dbt/logs', 'fail_fast': 'False', 'debug': 'False', 'use_colors': 'True', 'use_experimental_parser': 'False', 'no_print': 'None', 'quiet': 'False', 'log_format': 'default', 'introspect': 'True', 'warn_error_options': 'WarnErrorOptions(include=[], exclude=[])', 'static_parser': 'True', 'target_path': '/Users/kevin/dbt/test', 'invocation_command': 'dbt run -s stg_google_ads__account_history', 'send_anonymous_usage_stats': 'True'}
�[0m14:53:55.316020 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'project_id', 'label': '4ad12cdc-9bf6-4e32-be39-78f854e8e0d2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x108431880>]}
�[0m14:53:55.327699 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'adapter_info', 'label': '4ad12cdc-9bf6-4e32-be39-78f854e8e0d2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x108f8ebe0>]}
�[0m14:53:55.328393 [info ] [MainThread]: Registered adapter: snowflake=1.6.4
�[0m14:53:55.371382 [debug] [MainThread]: checksum: 546b81fb56652c304d87abd676e84d4737d8a0c6b62160f4a6e79dcddbc842bb, vars: {}, profile: , target: , version: 1.6.6
�[0m14:53:55.373585 [info ] [MainThread]: Unable to do partial parsing because saved manifest not found. Starting full parse.
�[0m14:53:55.373942 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '4ad12cdc-9bf6-4e32-be39-78f854e8e0d2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x108f93850>]}
�[0m14:54:08.840438 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'experimental_parser', 'label': '4ad12cdc-9bf6-4e32-be39-78f854e8e0d2', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x10cce7c70>]}
...
�[0m14:54:34.093047 [debug] [MainThread]: Command end result
�[0m14:54:34.729373 [info ] [MainThread]:
�[0m14:54:34.729889 [info ] [MainThread]: �[32mCompleted successfully�[0m
�[0m14:54:34.730174 [info ] [MainThread]:
�[0m14:54:34.730419 [info ] [MainThread]: Done. PASS=1 WARN=0 ERROR=0 SKIP=0 TOTAL=1
�[0m14:54:34.730822 [debug] [MainThread]: Command `dbt run` succeeded at 14:54:34.730767 after 39.65 seconds
�[0m14:54:34.731093 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x105c2efa0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x108f8ebe0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x12adc2430>]}
�[0m14:54:34.731360 [debug] [MainThread]: Flushing usage events Notably in the debug statement, the environment variable selectively shows up for target-path. I can also confirm that |
Thanks for giving that a try @kevin-chao ! I tried it myself and was able to see the same thing as you. It seems like the missing piece might be what you called out in your original issue:
Possible solutionIn my local testing with an editable version of dbt-core, both @p.target_path CaveatI get the following warning (which I think is expected due to #8638 and #8160 (comment):
Toggle to see full log output
Acceptance criteria for implementation
|
My organization encountered this today and it's a bummer that the workaround is "use a deprecated |
My team has also encountered this issue after updating dbt from 1.4.4 to 1.7.6. We would really appreciate the fix for this bug. |
@graciegoheen As of the change we added here, you can specify just |
As @ChenyuLInx already mentioned, the snippet here shows why providing I did a write-up in #9575 (comment) to give examples why we should enable |
Hi, Ive hit an issue that relies on this fix. I was wondering when this is likely to be released? |
@the4thamigo-uk our next 1.7 patch is currently scheduled for wednesday! |
Is this a new bug in dbt-core?
Current Behavior
The current implementation of
dbt retry
seems to only look forrun_results.json
when:dbt_project.yml
While the target-path configuration in
dbt_project.yml
can solve my issue today, I recognize that it has been deprecated and will likely no longer work in future versions. The other options I have are the CLI flag / environment variable, which when tested produce two different errors that boil down to these configurations not being supported.Expected Behavior
When using
dbt retry
, I should be able to:dbt retry --target-path /path/to/artifacts
DBT_TARGET_PATH=/path/to/artifacts
Steps To Reproduce
test_artifacts
) and moverun_results.json
to that folder.3a.
dbt retry --target-path test_artifacts
3b. In my .zshrc, set
export DBT_TARGET_PATH=~/path/to/dbt/test_artifacts
, source shell and rundbt retry
dbt retry
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: