Abhi2939 opened a new pull request, #76873:
URL: https://github.com/apache/airflow/pull/76873

   closes: #76723
   
   ## Summary
   
   Airflow 3.4 changed clearing a task to discard its task state by default. 
The clear dialog offers a browser-local preference, but administrators can't 
set a consistent default for their deployment. This PR adds a deployment-wide 
option for the default `keep_task_state` behavior.
   
   ## Changes
   
   - New config option `[api] default_keep_task_state` (boolean, default 
`False`). The default matches the current 3.4 behavior, so existing deployments 
are unaffected.
   - **API:** when a clear task instances request omits `keep_task_state`, the 
server resolves the value from this option at request time, so config changes 
are respected. An explicitly provided value always wins.
   - **UI:** the option is exposed through the UI config endpoint. The clear 
task and clear group dialogs use it as the initial checkbox state, and a stored 
browser-local preference still overrides it.
   - Regenerated the OpenAPI specs, the UI client, and the airflowctl 
datamodels.
   
   ## Tests
   
   - Backend: tests for the config endpoint and for clearing task instances 
with the field omitted (config true and false) and explicitly set.
   - UI: `useUserSettings` tests covering the server default, a stored 
preference overriding it, and persisting a new value.


-- 
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