Skip to content

Commit

Permalink
Bump task_processing to get watcher_kubeconfig_paths change
Browse files Browse the repository at this point in the history
  • Loading branch information
jfongatyelp committed Jul 10, 2024
1 parent 433b9d8 commit 48a5b4a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion requirements-minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pytimeparse
pytz
PyYAML>=5.1
requests
task_processing[mesos_executor,k8s]>=1.1.0
task_processing[mesos_executor,k8s]>=1.2.0
Twisted>=19.7.0
urllib3>=1.24.2
Werkzeug>=0.15.3
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ setuptools==65.5.1
six==1.15.0
sshpubkeys==3.1.0
stack-data==0.6.2
task-processing==1.1.0
task-processing==1.2.0
traitlets==5.0.0
Twisted==22.10.0
typing-extensions==4.5.0
Expand Down
2 changes: 1 addition & 1 deletion tron/config/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def config_object_factory(name, required=None, optional=None):
"kubeconfig_path",
"enabled",
"default_volumes",
"old_kubeconfig_paths",
"watcher_kubeconfig_paths",
],
)

Expand Down
12 changes: 6 additions & 6 deletions tron/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ def __init__(
enabled: bool = True,
default_volumes: Optional[List[ConfigVolume]] = None,
pod_launch_timeout: Optional[int] = None,
old_kubeconfig_paths: Optional[List[str]] = None,
watcher_kubeconfig_paths: Optional[List[str]] = None,
):
# general k8s config
self.kubeconfig_path = kubeconfig_path
self.enabled = enabled
self.default_volumes: Optional[List[ConfigVolume]] = default_volumes or []
self.pod_launch_timeout = pod_launch_timeout or DEFAULT_POD_LAUNCH_TIMEOUT_S
self.old_kubeconfig_paths = old_kubeconfig_paths or ()
self.watcher_kubeconfig_paths = watcher_kubeconfig_paths or ()
# creating a task_proc executor has a couple steps:
# * create a TaskProcessor
# * load the desired plugin (in this case, the k8s one)
Expand Down Expand Up @@ -342,7 +342,7 @@ def get_runner(self, kubeconfig_path: str, queue: PyDeferredQueue) -> Optional[S
"namespace": "tron",
"version": __version__,
"kubeconfig_path": self.kubeconfig_path,
"old_kubeconfig_paths": self.old_kubeconfig_paths,
"watcher_kubeconfig_paths": self.watcher_kubeconfig_paths,
"task_configs": [task.get_config() for task in self.tasks.values()],
},
)
Expand Down Expand Up @@ -624,7 +624,7 @@ class KubernetesClusterRepository:
kubeconfig_path: Optional[str] = None
pod_launch_timeout: Optional[int] = None
default_volumes: Optional[List[ConfigVolume]] = None
old_kubeconfig_paths: Optional[Collection[str]] = ()
watcher_kubeconfig_paths: Optional[Collection[str]] = ()

# metadata config
clusters: Dict[str, KubernetesCluster] = {}
Expand All @@ -650,7 +650,7 @@ def get_cluster(cls, kubeconfig_path: Optional[str] = None) -> Optional[Kubernet
kubeconfig_path=kubeconfig_path,
enabled=cls.kubernetes_enabled,
default_volumes=cls.default_volumes,
old_kubeconfig_paths=cls.old_kubeconfig_paths,
watcher_kubeconfig_paths=cls.watcher_kubeconfig_paths,
)
cls.clusters[kubeconfig_path] = cluster

Expand All @@ -666,7 +666,7 @@ def configure(cls, kubernetes_options: ConfigKubernetes) -> None:
cls.kubeconfig_path = kubernetes_options.kubeconfig_path
cls.kubernetes_enabled = kubernetes_options.enabled
cls.default_volumes = kubernetes_options.default_volumes
cls.old_kubeconfig_paths = kubernetes_options.old_kubeconfig_paths
cls.watcher_kubeconfig_paths = kubernetes_options.watcher_kubeconfig_paths

for cluster in cls.clusters.values():
cluster.set_enabled(cls.kubernetes_enabled)
Expand Down

0 comments on commit 48a5b4a

Please sign in to comment.