You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shahar1 (via GitHub)" <gi...@apache.org> on 2025/02/24 19:12:25 UTC

Re: [PR] [WIP] Fix default of `rendered_fields` Field in `TaskInstanceResponsse` pydantic model [airflow]

shahar1 commented on PR #46985:
URL: https://github.com/apache/airflow/pull/46985#issuecomment-2679414306

   > Pydantic is smart enough to cope with that automatically: https://docs.pydantic.dev/latest/concepts/fields/#mutable-default-values
   > 
   > But for reader clarity and to enforce good practice, an explicit `default_factory` seems more appropriate 👍.
   
   Thanks for the clarification!
   Ironically, the CI didn't like this change 😅
   ```yaml
   +++ b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml
   @@ -10429,7 +10429,6 @@ components:
            rendered_fields:
              type: object
              title: Rendered Fields
   -          default: {}
            trigger:
              anyOf:
              - $ref: '#/components/schemas/TriggerResponse'
   ```
   
   Not too harsh about it though, eespecially if it's already handled as you mention.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org