Skip to content

Conversation

@gpadavala
Copy link
Contributor

@gpadavala gpadavala commented Feb 12, 2025

Fixes: #45462

Issue
When templated parameters are used in the DatabricksWorkflowTaskGroup/DatabricksNotebookOperator, the parameter values are not assigned on the workflow. They are sent as override values when the job is triggered (runtime) after the templated values are replaced by airflow.. However on repair, the code is setup to just trigger the repair api of databricks with just the run id, we have raised a ticket with databricks to find out that they do not auto fetch "overridden" values on repair, and hence are to be overridden again during repair call.

On Trigger
image

On Repair (Before Fix)
image

I have tested the changes in our organisation instance and are working fine

@boring-cyborg
Copy link

boring-cyborg bot commented Feb 12, 2025

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 (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits 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: [email protected]
    Slack: https://s.apache.org/airflow-slack

@potiuk
Copy link
Member

potiuk commented Feb 15, 2025

Coud you please add a unit test for it and explain a bit more what is the problem you are solving in description of your commit?

@potiuk
Copy link
Member

potiuk commented Feb 15, 2025

(just to explain - while it links to the issue, keeping the cause explanation in the commit, will make it easier to find the cause and provide a changelog).

@gpadavala
Copy link
Contributor Author

@potiuk I have updated the PR description to add the details of issue, and also added a test (I am not sure if this test will suffice).. please let me know :)

@gpadavala
Copy link
Contributor Author

@potiuk Updated, please check

@gpadavala
Copy link
Contributor Author

@potiuk just reminding in case its lost in your inbox

@potiuk
Copy link
Member

potiuk commented Apr 7, 2025

Indeed. Good idea to bump it.

@potiuk potiuk merged commit b752f7e into apache:main Apr 7, 2025
4 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Apr 7, 2025

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

kaxil added a commit to astronomer/airflow that referenced this pull request Apr 7, 2025
apache#46704 added changes but the tests were failing

```
=========================== short test summary info ============================
FAILED providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py::test_repair_task_with_params - AssertionError: expected call not found.
Expected: repair_run({'run_id': 12345, 'rerun_tasks': ['task1', 'task2'], 'overriding_parameters': {'key1': 'value1', 'key2': 'value2'}})
Actual: repair_run({'run_id': 12345, 'latest_repair_id': 100, 'rerun_tasks': ['task1', 'task2'], 'key1': 'value1', 'key2': 'value2'})
====== 1 failed, 6631 passed, 122 skipped, 1 warning in 793.11s (0:13:13) ======

```

https://github.com/apache/airflow/actions/runs/14309323849/job/40100685431?
kaxil added a commit that referenced this pull request Apr 7, 2025
#46704 added changes but the tests were failing

```
=========================== short test summary info ============================
FAILED providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py::test_repair_task_with_params - AssertionError: expected call not found.
Expected: repair_run({'run_id': 12345, 'rerun_tasks': ['task1', 'task2'], 'overriding_parameters': {'key1': 'value1', 'key2': 'value2'}})
Actual: repair_run({'run_id': 12345, 'latest_repair_id': 100, 'rerun_tasks': ['task1', 'task2'], 'key1': 'value1', 'key2': 'value2'})
====== 1 failed, 6631 passed, 122 skipped, 1 warning in 793.11s (0:13:13) ======

```

https://github.com/apache/airflow/actions/runs/14309323849/job/40100685431?
simonprydden pushed a commit to simonprydden/airflow that referenced this pull request Apr 8, 2025
…ers (apache#46704)

* fix for databricks repair buttons not overriding the template parameters

* add unit test

* update unit test to validate input json
simonprydden pushed a commit to simonprydden/airflow that referenced this pull request Apr 8, 2025
apache#46704 added changes but the tests were failing

```
=========================== short test summary info ============================
FAILED providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py::test_repair_task_with_params - AssertionError: expected call not found.
Expected: repair_run({'run_id': 12345, 'rerun_tasks': ['task1', 'task2'], 'overriding_parameters': {'key1': 'value1', 'key2': 'value2'}})
Actual: repair_run({'run_id': 12345, 'latest_repair_id': 100, 'rerun_tasks': ['task1', 'task2'], 'key1': 'value1', 'key2': 'value2'})
====== 1 failed, 6631 passed, 122 skipped, 1 warning in 793.11s (0:13:13) ======

```

https://github.com/apache/airflow/actions/runs/14309323849/job/40100685431?
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request May 29, 2025
apache/airflow#46704 added changes but the tests were failing

```
=========================== short test summary info ============================
FAILED providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py::test_repair_task_with_params - AssertionError: expected call not found.
Expected: repair_run({'run_id': 12345, 'rerun_tasks': ['task1', 'task2'], 'overriding_parameters': {'key1': 'value1', 'key2': 'value2'}})
Actual: repair_run({'run_id': 12345, 'latest_repair_id': 100, 'rerun_tasks': ['task1', 'task2'], 'key1': 'value1', 'key2': 'value2'})
====== 1 failed, 6631 passed, 122 skipped, 1 warning in 793.11s (0:13:13) ======

```

https://github.com/apache/airflow/actions/runs/14309323849/job/40100685431?

GitOrigin-RevId: 659150689e631c610ea18485b9986e3ff27f0b36
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 24, 2025
apache/airflow#46704 added changes but the tests were failing

```
=========================== short test summary info ============================
FAILED providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py::test_repair_task_with_params - AssertionError: expected call not found.
Expected: repair_run({'run_id': 12345, 'rerun_tasks': ['task1', 'task2'], 'overriding_parameters': {'key1': 'value1', 'key2': 'value2'}})
Actual: repair_run({'run_id': 12345, 'latest_repair_id': 100, 'rerun_tasks': ['task1', 'task2'], 'key1': 'value1', 'key2': 'value2'})
====== 1 failed, 6631 passed, 122 skipped, 1 warning in 793.11s (0:13:13) ======

```

https://github.com/apache/airflow/actions/runs/14309323849/job/40100685431?

GitOrigin-RevId: 659150689e631c610ea18485b9986e3ff27f0b36
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Oct 22, 2025
apache/airflow#46704 added changes but the tests were failing

```
=========================== short test summary info ============================
FAILED providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py::test_repair_task_with_params - AssertionError: expected call not found.
Expected: repair_run({'run_id': 12345, 'rerun_tasks': ['task1', 'task2'], 'overriding_parameters': {'key1': 'value1', 'key2': 'value2'}})
Actual: repair_run({'run_id': 12345, 'latest_repair_id': 100, 'rerun_tasks': ['task1', 'task2'], 'key1': 'value1', 'key2': 'value2'})
====== 1 failed, 6631 passed, 122 skipped, 1 warning in 793.11s (0:13:13) ======

```

https://github.com/apache/airflow/actions/runs/14309323849/job/40100685431?

GitOrigin-RevId: 659150689e631c610ea18485b9986e3ff27f0b36
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.

Templates not resolved in DatabricksNotebookOperator then in DatabricksWorkflowTaskGroup used

2 participants