- 
                Notifications
    You must be signed in to change notification settings 
- Fork 15.9k
fix for databricks repair buttons not overriding the template parameters #46704
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
Conversation
| 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) 
 | 
| 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? | 
| (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). | 
| @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 :) | 
        
          
                providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | @potiuk Updated, please check | 
| @potiuk just reminding in case its lost in your inbox | 
| Indeed. Good idea to bump it. | 
| Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. | 
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?
#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?
…ers (apache#46704) * fix for databricks repair buttons not overriding the template parameters * add unit test * update unit test to validate input json
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?
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
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
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
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

On Repair (Before Fix)

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