Prajwal7842 commented on code in PR #71220:
URL: https://github.com/apache/airflow/pull/71220#discussion_r3872547662
##########
airflow-core/src/airflow/models/pool.py:
##########
@@ -92,6 +92,26 @@ class Pool(Base):
def __repr__(self):
return str(self.pool)
+ @staticmethod
+ def get_include_deferred_override() -> bool | None:
+ """
+ Get the cluster-wide ``include_deferred`` value fixed via config, if
any.
+
+ When ``[core] pool_include_deferred`` is set, its value applies to
every pool and takes
+ precedence over the per-pool ``include_deferred`` column. Returns None
when unset.
+ """
+ from airflow.configuration import conf
+
+ if conf.get("core", "pool_include_deferred", fallback=""):
+ return conf.getboolean("core", "pool_include_deferred")
+ return None
+
+ @property
+ def effective_include_deferred(self) -> bool:
Review Comment:
We can use a slight variation of option 1 where we accept values until the
global config is not set. Once set, the UI option is disabled and shows the
global value. Now later on, if admin decides to unset the value, the
existing/old values given by the users start honoring again and new users get
option to choose/update their value. WDYT ?
--
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]