-
Notifications
You must be signed in to change notification settings - Fork 294
Remove forced retries=0 from watcher producer operators
#2479
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -192,11 +192,6 @@ def test_dbt_producer_watcher_operator_priority_weight_override(): | |||||||||||||||||||||||||||||||||||||||||||
| assert op.priority_weight == 100 | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| def test_dbt_producer_watcher_operator_preserves_explicit_retries(): | |
| """User-supplied retries argument should be preserved on the operator.""" | |
| op = DbtProducerWatcherOperator(project_dir=".", profile_config=None, retries=5) | |
| assert op.retries == 5 | |
| def test_dbt_producer_watcher_operator_preserves_default_args_retries_and_does_not_mutate(): | |
| """ | |
| When retries is provided via default_args, the operator should respect it | |
| and not mutate the caller's default_args dict. | |
| """ | |
| default_args = {"retries": 7} | |
| original_default_args = default_args.copy() | |
| op = DbtProducerWatcherOperator(project_dir=".", profile_config=None, default_args=default_args) | |
| assert op.retries == 7 | |
| # Ensure the original dict passed in was not mutated | |
| assert default_args == original_default_args |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -77,31 +77,6 @@ | |||||||||||||||||||||||||||||||||
| render_config = RenderConfig(load_method=LoadMode.DBT_MANIFEST, test_behavior=TestBehavior.NONE) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| def test_producer_watcher_respects_configured_retries(): | |
| """ | |
| Ensure that DbtProducerWatcherKubernetesOperator preserves a non-zero user-configured | |
| retries value instead of forcing retries=0. | |
| """ | |
| op = DbtProducerWatcherKubernetesOperator( | |
| task_id="test_retries", | |
| project_dir=".", | |
| profile_config=None, | |
| image="dbt-image:latest", | |
| retries=3, | |
| ) | |
| assert op.retries == 3 |
Uh oh!
There was an error while loading. Please reload this page.