Skip to content

Document supported databricks_retry_args usage for deferrable Databricks operators#68017

Open
kosiew wants to merge 3 commits into
apache:mainfrom
kosiew:callable-deserialization-02-64609
Open

Document supported databricks_retry_args usage for deferrable Databricks operators#68017
kosiew wants to merge 3 commits into
apache:mainfrom
kosiew:callable-deserialization-02-64609

Conversation

@kosiew

@kosiew kosiew commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Follow up for #64960

Adds documentation clarifying which databricks_retry_args configurations are supported when using Databricks operators in deferrable mode.

The new documentation:

  • Explains that databricks_retry_args must be serialization-safe because it is serialized across the trigger boundary when deferrable=True.
  • Documents supported value types (plain Python primitives and collections of primitives).
  • Provides examples of supported configurations, such as {"reraise": True}.
  • Explains that retry count and delay should be configured through the dedicated retry_limit and retry_delay operator parameters.
  • Documents unsupported configurations, including Tenacity strategy objects (stop_after_attempt, wait_incrementing, etc.) and arbitrary callables.
  • Recommends using the non-deferrable Databricks operators when custom callable retry strategies are required.
  • Adds a Databricks provider changelog entry describing the documentation update.

Does this PR introduce any user-facing change?

Yes. Documentation now explicitly describes the serialization requirements and supported shapes for databricks_retry_args in 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?
  • Yes (please specify the tool below)
    ChatGPT

@kosiew kosiew force-pushed the callable-deserialization-02-64609 branch from 8b7caa8 to 283df3e Compare June 4, 2026 14:14
@eladkal

eladkal commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

cc @moomindani for review

@moomindani moomindani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The "Supported (serialization-safe and runtime-valid)" example {"reraise": True} is not runtime-valid: BaseDatabricksHook replaces (does not merge) the default retry_args, so stop/wait are lost and tenacity falls back to stop_never + wait_none() — an infinite, zero-backoff retry loop. Setting databricks_retry_args at all also makes retry_limit/retry_delay no-ops. Since tenacity strategy objects (the only way to set stop/wait inside retry_args) are exactly what deferrable mode rejects, the honest guidance is "do not use databricks_retry_args in deferrable mode; use retry_limit/retry_delay", rather than a supported example.
  2. "will raise ValueError at task submission" overstates the timing: validation runs in the trigger constructors at defer time, after submit_run/run_now has 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.)
  3. generated/provider_dependencies.json.sha256sum is a stale-base rebase artifact — please rebase onto current main and drop it.
  4. 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

Comment thread generated/provider_dependencies.json.sha256sum Outdated
Comment thread providers/databricks/docs/operators/run_now.rst Outdated
Comment thread providers/databricks/docs/operators/run_now.rst Outdated
Comment thread providers/databricks/docs/operators/run_now.rst Outdated
Comment thread providers/databricks/docs/operators/run_now.rst Outdated
Comment thread providers/databricks/docs/operators/submit_run.rst
Comment thread providers/databricks/docs/changelog.rst Outdated
@moomindani

Copy link
Copy Markdown
Contributor

Small correction to one point in my review: generated/provider_dependencies.json.sha256sum was re-added to main by #68775 a few hours before I posted (the same accidental re-add pattern as #67080, after #68801 had removed it), so "a file that no longer exists upstream" is no longer accurate. The requested action is unchanged: rebase onto current main and keep this file out of this PR's diff.


Drafted-by: Claude Code (Fable 5); reviewed by @moomindani before posting

kosiew added 3 commits July 3, 2026 15:14
…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
@kosiew kosiew force-pushed the callable-deserialization-02-64609 branch from 283df3e to 5a750de Compare July 3, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants