Document supported databricks_retry_args usage for deferrable Databricks operators#68017
Document supported databricks_retry_args usage for deferrable Databricks operators#68017kosiew wants to merge 3 commits into
databricks_retry_args usage for deferrable Databricks operators#68017Conversation
8b7caa8 to
283df3e
Compare
|
cc @moomindani for review |
moomindani
left a comment
There was a problem hiding this comment.
Thanks for the follow-up — this is exactly the docs fix scoped at the end of the #64960 thread, and the structure of the two new sections is clean (heading levels, anchors, and code blocks all check out). However, two of the content claims do not match what the merged code actually does, and two files should not be in the diff:
- The "Supported (serialization-safe and runtime-valid)" example
{"reraise": True}is not runtime-valid:BaseDatabricksHookreplaces (does not merge) the defaultretry_args, sostop/waitare lost and tenacity falls back tostop_never+wait_none()— an infinite, zero-backoff retry loop. Settingdatabricks_retry_argsat all also makesretry_limit/retry_delayno-ops. Since tenacity strategy objects (the only way to setstop/waitinsideretry_args) are exactly what deferrable mode rejects, the honest guidance is "do not usedatabricks_retry_argsin deferrable mode; useretry_limit/retry_delay", rather than a supported example. - "will raise ValueError at task submission" overstates the timing: validation runs in the trigger constructors at defer time, after
submit_run/run_nowhas already launched the Databricks run. (The #64960 thread did say "before any Databricks API call", but re-checking the merged code, the operator path submits first and defers second —operators/databricks.py:834-836.) generated/provider_dependencies.json.sha256sumis a stale-base rebase artifact — please rebase onto currentmainand drop it.- The hand-added changelog entry should be removed (release-manager-maintained file; see inline).
Details inline.
Drafted-by: Claude Code (Fable 5); reviewed by @moomindani before posting
|
Small correction to one point in my review: Drafted-by: Claude Code (Fable 5); reviewed by @moomindani before posting |
…ferrable operators Add "Retry args in deferrable mode" subsection under DatabricksSubmitRunDeferrableOperator and DatabricksRunNowDeferrableOperator explaining: - Serialization requirement: only plain Python primitives allowed across the trigger boundary - Supported shapes (int/float primitives, nested plain-dict) - Unsupported shapes (Tenacity objects, callables) with note that a ValueError is raised at task submission - Recommended workaround: use non-deferrable mode for custom retry strategies Also update changelog for 7.16.0.
and clean up xrefs - Fixed all Databricks operator cross-references to use full module paths - Verified removal of stale short xrefs, reraise, "plain primitives," and "task submission" wording - Updated changelog and ensured generated checksum remains consistent with main branch
283df3e to
5a750de
Compare
What does this PR do?
Follow up for #64960
Adds documentation clarifying which
databricks_retry_argsconfigurations are supported when using Databricks operators in deferrable mode.The new documentation:
databricks_retry_argsmust be serialization-safe because it is serialized across the trigger boundary whendeferrable=True.{"reraise": True}.retry_limitandretry_delayoperator parameters.stop_after_attempt,wait_incrementing, etc.) and arbitrary callables.Does this PR introduce any user-facing change?
Yes. Documentation now explicitly describes the serialization requirements and supported shapes for
databricks_retry_argsin deferrable Databricks operators, helping users avoid unsupported retry configurations.How was this patch tested?
No tests were added or modified. This PR contains documentation and changelog updates only.
Was generative AI tooling used to co-author this PR?
ChatGPT