Skip to content

Preserve Databricks deferrable trigger caller across triggerer restarts#66965

Open
Nishieee wants to merge 1 commit into
apache:mainfrom
Nishieee:fix/databricks-trigger-caller-serialize
Open

Preserve Databricks deferrable trigger caller across triggerer restarts#66965
Nishieee wants to merge 1 commit into
apache:mainfrom
Nishieee:fix/databricks-trigger-caller-serialize

Conversation

@Nishieee
Copy link
Copy Markdown

DatabricksExecutionTrigger and DatabricksSQLStatementExecutionTrigger passed caller into DatabricksHook but omitted it from serialize(), so the triggerer lost the operator’s value after restart/handoff. Persist caller on the instance, include it in serialize(), and add tests for default serialization and round-trip.

related: #66961


Was generative AI tooling used to co-author this PR?
  • Yes — Cursor

Generated-by: Cursor following the guidelines

@boring-cyborg
Copy link
Copy Markdown

boring-cyborg Bot commented May 14, 2026

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@eladkal eladkal requested a review from shahar1 May 14, 2026 19:25
Copy link
Copy Markdown
Contributor

@SameerMesiah97 SameerMesiah97 left a comment

Choose a reason for hiding this comment

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

Just a few nits. Looks fine otherwise.

TASK_RUN_ID3 = 33
TASK_RUN_ID3_KEY = "third_task"
JOB_ID = 42
RUN_PAGE_URL = "https://XX.cloud.databricks.com/#jobs/1/runs/1"
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.

I would add a constant called CALLER here and then use that in your tests.. I think it's okay to use the same caller argument for both as the string itself is not behaviorally important

:param retry_limit: The number of times to retry the connection in case of service outages.
:param retry_delay: The number of seconds to wait between retries.
:param retry_args: An optional dictionary with arguments passed to ``tenacity.Retrying`` class.
:param run_page_url: The run page url.
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.

Should we not add docstring entries for repair_run and caller?

By default, the trigger will poll every 30 seconds.
:param retry_limit: The number of times to retry the connection in case of service outages.
:param retry_delay: The number of seconds to wait between retries.
:param retry_args: An optional dictionary with arguments passed to ``tenacity.Retrying`` class.
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.

Same here. I think we should add a docstring entry for caller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants