You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kaxil (via GitHub)" <gi...@apache.org> on 2026/05/01 00:23:18 UTC

Re: [PR] Fix max_active_runs lost during DAG serialisation when value equals schema default [airflow]

kaxil commented on PR #65310:
URL: https://github.com/apache/airflow/pull/65310#issuecomment-4357061212

   Walking back my earlier suggestion. The `client_defaults` indirection makes sense for tasks because there are many of them per payload, so factoring N common defaults out of M tasks saves N×M bytes. For DAG-level fields there's exactly one DAG per payload, so the wrapper costs more than it saves and the abstraction doesn't earn its complexity. Measured locally: client_defaults approach is ~50 B/DAG heavier than just always-emitting these fields, on top of ~80 extra lines of code.
   
   Simplest fix: keep the schema.json changes (drop `default:` for the 5 fields), drop everything else. With no schema default, `_is_excluded` already returns False for these fields → they're always emitted → reader reads them directly. No `DAG_DEFAULTS`, no `generate_client_defaults`, no `_matches_client_defaults`, no deserialize-time setattr loop, no `__getattr__` fallback.
   
   The PR's original carve-out approach was actually closer to right than this rewrite. Apologies for the detour.


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