Vamsi-klu commented on PR #68519:
URL: https://github.com/apache/airflow/pull/68519#issuecomment-4724250755

   Thanks for the thorough review. All five points are addressed.
   
   1. self.json mutation breaking retries: none of the three operators write 
self.json in execute() any more. DatabricksCreateJobsOperator drops the unused 
write, DatabricksSubmitRunOperator submits a local deep-copied payload, and 
DatabricksRunNowOperator stores the merged payload on a transient 
self._merged_json while execute_complete() reconstructs from the template 
fields via _get_merged_json(). This also closed a related aliasing bug 
(per-task params injection was mutating the named template fields in place) and 
now recovers a job_parameters passed as the named argument across a 
defer/resume.
   
   2. normalise_json_content after API calls in RunNow: moved before any hook 
access so a bad payload fails fast with no remote side-effects, and added the 
same up-front validation to SubmitRun for parity.
   
   3. Deferred validation as a silent breaking change: documented with a `.. 
note::` in the changelog.
   
   4. ast.literal_eval: kept (it is required for classic-Jinja-from-XCom string 
rendering) and documented in the function docstring, the :param json: docs of 
all three operators, and the changelog.
   
   5. datetime.now() in the new test: replaced with a new DEFAULT_DATE constant 
(it did not exist in the file yet).
   
   New tests cover each fix: template-field non-mutation (including the 
named-field aliasing case), fail-fast-before-API for both operators, the named 
job_parameters resume regression, and the previously uncovered synchronous 
repair path. breeze run mypy and the targeted unit suite are green.
   
   ---
   Drafted-by: Claude Code (Opus 4.8); reviewed by @Vamsi-klu before posting
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to