pierrejeambrun commented on issue #43650:
URL: https://github.com/apache/airflow/issues/43650#issuecomment-2512212486

   Hello [ajitg25](https://github.com/ajitg25),
   
   I have assigned you. The function you are mentioning is located in the 
`models`. We do not want to update that part.
   
   This issue is referring to HTTP endpoints that are located in the FastAPI 
Rest API. Files of interests are in `api_fastapi`. More precisely in 
`api_fastapi/core_api/routes/public` for the public endpoint definition. In 
here you will find a multitude of endpoints, and several are for `updating` a 
resource. (Pool, Connection, Variable, etc...). We want the behavior of those 
`Update` endpoints to be harmonized, especially regarding the `mask` query 
parameter and also for `None` value handling.
   
   The idea is:
   - If a mask is provided, only update values specified in the mask
   - If no mask is provided, instanciate a DB entity and ensure that the 
payload is valid in that regard. update payload is a fully formed resource
   
   In both cases I think we should only use `set` values. Things that the user 
explicitely filed in the payload. (independently if those are None or not 
None). You can take a look at `patch_task_instance` that leverages 
`model_fields_set` to only retrive explicitely set values.


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