kaxil commented on a change in pull request #10996:
URL: https://github.com/apache/airflow/pull/10996#discussion_r493789664
##########
File path: airflow/executors/kubernetes_executor.py
##########
@@ -60,6 +60,35 @@
KubernetesWatchType = Tuple[str, str, Optional[str], Dict[str, str], str]
+class ResourceVersion:
+ """Singleton for tracking resourceVersion from Kubernetes"""
+
+ _instance = None
+ _resource_version = "0"
+
+ def __new__(cls):
+ if cls._instance is None:
+ cls._instance = super(ResourceVersion, cls).__new__(cls)
+ # Put any initialization here.
+ return cls._instance
+
+ @property
+ def resource_version(self):
+ """
+ Get resourceVersion for Kubernetes object tracking
+ @return:
+ """
+ return self._resource_version
+
+ @resource_version.setter
+ def resource_version(self, value):
+ """
+ Set resourceVersion for Kubernetes object tracking
+ @param value:
Review comment:
same here
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]