zenml-nightly 0.75.0.dev20250318__py3-none-any.whl → 0.80.0.dev20250322__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. zenml/VERSION +1 -1
  2. zenml/__init__.py +3 -1
  3. zenml/artifacts/artifact_config.py +2 -2
  4. zenml/artifacts/utils.py +4 -8
  5. zenml/cli/__init__.py +6 -6
  6. zenml/cli/base.py +2 -2
  7. zenml/cli/login.py +2 -2
  8. zenml/cli/project.py +1 -1
  9. zenml/cli/server.py +6 -4
  10. zenml/cli/service_accounts.py +2 -2
  11. zenml/cli/service_connectors.py +1 -1
  12. zenml/cli/stack.py +1 -1
  13. zenml/cli/stack_components.py +1 -1
  14. zenml/cli/user_management.py +1 -1
  15. zenml/cli/utils.py +3 -3
  16. zenml/client.py +9 -9
  17. zenml/config/compiler.py +1 -1
  18. zenml/config/server_config.py +1 -1
  19. zenml/constants.py +2 -1
  20. zenml/enums.py +12 -0
  21. zenml/integrations/__init__.py +0 -64
  22. zenml/integrations/airflow/__init__.py +0 -2
  23. zenml/integrations/argilla/__init__.py +0 -1
  24. zenml/integrations/aws/__init__.py +0 -3
  25. zenml/integrations/azure/__init__.py +0 -2
  26. zenml/integrations/azure/service_connectors/azure_service_connector.py +1 -1
  27. zenml/integrations/bentoml/__init__.py +0 -2
  28. zenml/integrations/bentoml/services/bentoml_container_deployment.py +2 -2
  29. zenml/integrations/bentoml/services/bentoml_local_deployment.py +1 -1
  30. zenml/integrations/bentoml/steps/bentoml_deployer.py +1 -1
  31. zenml/integrations/bitbucket/__init__.py +0 -2
  32. zenml/integrations/comet/__init__.py +0 -2
  33. zenml/integrations/databricks/__init__.py +0 -2
  34. zenml/integrations/databricks/services/databricks_deployment.py +3 -1
  35. zenml/integrations/deepchecks/__init__.py +0 -2
  36. zenml/integrations/discord/__init__.py +0 -2
  37. zenml/integrations/evidently/__init__.py +0 -2
  38. zenml/integrations/facets/__init__.py +0 -2
  39. zenml/integrations/feast/__init__.py +0 -2
  40. zenml/integrations/gcp/__init__.py +0 -3
  41. zenml/integrations/github/__init__.py +0 -2
  42. zenml/integrations/github/code_repositories/github_code_repository.py +7 -2
  43. zenml/integrations/gitlab/__init__.py +0 -1
  44. zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py +5 -2
  45. zenml/integrations/great_expectations/__init__.py +0 -3
  46. zenml/integrations/huggingface/__init__.py +0 -1
  47. zenml/integrations/huggingface/services/huggingface_deployment.py +3 -1
  48. zenml/integrations/hyperai/__init__.py +0 -2
  49. zenml/integrations/kaniko/__init__.py +0 -2
  50. zenml/integrations/kubeflow/__init__.py +0 -1
  51. zenml/integrations/kubernetes/__init__.py +0 -2
  52. zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +4 -0
  53. zenml/integrations/kubernetes/orchestrators/kube_utils.py +89 -1
  54. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +124 -83
  55. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +44 -10
  56. zenml/integrations/kubernetes/orchestrators/manifest_utils.py +33 -1
  57. zenml/integrations/label_studio/__init__.py +0 -2
  58. zenml/integrations/langchain/__init__.py +0 -2
  59. zenml/integrations/lightgbm/__init__.py +0 -1
  60. zenml/integrations/lightning/__init__.py +0 -2
  61. zenml/integrations/mlflow/__init__.py +1 -3
  62. zenml/integrations/mlflow/services/mlflow_deployment.py +1 -1
  63. zenml/integrations/modal/__init__.py +0 -1
  64. zenml/integrations/neptune/__init__.py +0 -2
  65. zenml/integrations/neural_prophet/__init__.py +0 -2
  66. zenml/integrations/numpy/__init__.py +0 -2
  67. zenml/integrations/openai/__init__.py +0 -1
  68. zenml/integrations/pandas/__init__.py +0 -2
  69. zenml/integrations/pigeon/__init__.py +0 -1
  70. zenml/integrations/pillow/__init__.py +0 -3
  71. zenml/integrations/polars/__init__.py +0 -2
  72. zenml/integrations/prodigy/__init__.py +0 -1
  73. zenml/integrations/pycaret/__init__.py +0 -2
  74. zenml/integrations/pytorch/__init__.py +0 -1
  75. zenml/integrations/pytorch_lightning/__init__.py +0 -2
  76. zenml/integrations/registry.py +34 -0
  77. zenml/integrations/s3/__init__.py +0 -2
  78. zenml/integrations/scipy/__init__.py +0 -2
  79. zenml/integrations/seldon/__init__.py +0 -2
  80. zenml/integrations/seldon/services/seldon_deployment.py +3 -2
  81. zenml/integrations/sklearn/__init__.py +1 -1
  82. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +43 -18
  83. zenml/integrations/skypilot_aws/__init__.py +1 -3
  84. zenml/integrations/skypilot_azure/__init__.py +1 -2
  85. zenml/integrations/skypilot_gcp/__init__.py +1 -3
  86. zenml/integrations/skypilot_kubernetes/__init__.py +1 -3
  87. zenml/integrations/skypilot_lambda/__init__.py +1 -3
  88. zenml/integrations/slack/__init__.py +0 -1
  89. zenml/integrations/spark/__init__.py +0 -1
  90. zenml/integrations/tekton/__init__.py +0 -1
  91. zenml/integrations/tensorboard/__init__.py +0 -2
  92. zenml/integrations/tensorboard/services/tensorboard_service.py +1 -1
  93. zenml/integrations/tensorflow/__init__.py +0 -2
  94. zenml/integrations/vllm/__init__.py +0 -1
  95. zenml/integrations/vllm/services/vllm_deployment.py +1 -1
  96. zenml/integrations/wandb/__init__.py +0 -1
  97. zenml/integrations/whylogs/__init__.py +0 -1
  98. zenml/integrations/xgboost/__init__.py +0 -2
  99. zenml/login/credentials.py +1 -1
  100. zenml/materializers/__init__.py +1 -0
  101. zenml/model_deployers/base_model_deployer.py +1 -1
  102. zenml/models/__init__.py +4 -0
  103. zenml/models/v2/base/filter.py +162 -54
  104. zenml/models/v2/base/scoped.py +132 -0
  105. zenml/models/v2/core/artifact_version.py +12 -33
  106. zenml/models/v2/core/model_version.py +12 -50
  107. zenml/models/v2/core/pipeline_run.py +12 -32
  108. zenml/models/v2/core/service.py +2 -2
  109. zenml/models/v2/core/step_run.py +15 -32
  110. zenml/{services/service_type.py → models/v2/misc/service.py} +1 -1
  111. zenml/orchestrators/step_run_utils.py +1 -1
  112. zenml/orchestrators/utils.py +1 -1
  113. zenml/services/__init__.py +3 -5
  114. zenml/services/container/container_service.py +2 -1
  115. zenml/services/local/local_service.py +2 -1
  116. zenml/services/service.py +3 -2
  117. zenml/services/service_endpoint.py +2 -1
  118. zenml/services/service_monitor.py +1 -1
  119. zenml/services/service_status.py +1 -12
  120. zenml/stack_deployments/aws_stack_deployment.py +10 -5
  121. zenml/stack_deployments/azure_stack_deployment.py +47 -41
  122. zenml/stack_deployments/constants.py +30 -0
  123. zenml/stack_deployments/gcp_stack_deployment.py +6 -0
  124. zenml/steps/entrypoint_function_utils.py +1 -1
  125. zenml/utils/dashboard_utils.py +73 -8
  126. zenml/utils/server_utils.py +52 -0
  127. zenml/zen_server/dashboard/assets/{404-BbAvjc7Z.js → 404-2I8egBQu.js} +1 -1
  128. zenml/zen_server/dashboard/assets/@reactflow-BHoFKFSZ.js +17 -0
  129. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-XL2NfFgP.js → AlertDialogDropdownItem-D7KZcPFw.js} +1 -1
  130. zenml/zen_server/dashboard/assets/CodeSnippet-DUkCnBpQ.js +9 -0
  131. zenml/zen_server/dashboard/assets/{CollapsibleCard-Djtd_ocf.js → CollapsibleCard-B5-5Plnd.js} +1 -1
  132. zenml/zen_server/dashboard/assets/{Commands-V-hH_IKQ.js → Commands-CbOMmarC.js} +1 -1
  133. zenml/zen_server/dashboard/assets/{ComponentBadge-CVN2FsiW.js → ComponentBadge-FrujKBC6.js} +1 -1
  134. zenml/zen_server/dashboard/assets/ComponentIcon-Dx5fBrDX.js +1 -0
  135. zenml/zen_server/dashboard/assets/{CsvVizualization-CWaQcWIN.js → CsvVizualization-B8E3p9we.js} +1 -1
  136. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-CTLRrcFM.js → DeleteAlertDialog-BgTZbbAt.js} +1 -1
  137. zenml/zen_server/dashboard/assets/{DialogItem-ST291Hsl.js → DialogItem-CNWLiJcc.js} +1 -1
  138. zenml/zen_server/dashboard/assets/{Error-CIBjAdSc.js → Error-BkUP4Luv.js} +1 -1
  139. zenml/zen_server/dashboard/assets/ExecutionStatus-CD8Vj7sp.js +1 -0
  140. zenml/zen_server/dashboard/assets/{Helpbox-cwQNH06F.js → Helpbox-DIx6mDOH.js} +1 -1
  141. zenml/zen_server/dashboard/assets/{Infobox-DYKoAVhW.js → Infobox-BHEdNmME.js} +1 -1
  142. zenml/zen_server/dashboard/assets/{InlineAvatar-Bk4QLPTU.js → InlineAvatar-Bin9UPKJ.js} +1 -1
  143. zenml/zen_server/dashboard/assets/{NestedCollapsible-CE4OF670.js → NestedCollapsible-Da-k0Mff.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{Partials-cL1-u_sT.js → Partials-TNaYjHsV.js} +1 -1
  145. zenml/zen_server/dashboard/assets/ProBadge-BfPp-B97.js +1 -0
  146. zenml/zen_server/dashboard/assets/{ProCta-DtUutIul.js → ProCta-7_FtpX3I.js} +1 -1
  147. zenml/zen_server/dashboard/assets/ProviderIcon-CxeziA5a.js +1 -0
  148. zenml/zen_server/dashboard/assets/{ProviderRadio-C4bltH6-.js → ProviderRadio-DPmZHff_.js} +1 -1
  149. zenml/zen_server/dashboard/assets/RunSelector-BVKB4Z8F.js +1 -0
  150. zenml/zen_server/dashboard/assets/{RunsBody-D2VoO-cR.js → RunsBody-Cj4sIqQB.js} +1 -1
  151. zenml/zen_server/dashboard/assets/{SearchField-DfNxVtjV.js → SearchField-DjAOZic5.js} +1 -1
  152. zenml/zen_server/dashboard/assets/SecretTooltip-mMAAP4dM.js +1 -0
  153. zenml/zen_server/dashboard/assets/{SetPassword-CWl2mwz8.js → SetPassword-B0o5kSJU.js} +1 -1
  154. zenml/zen_server/dashboard/assets/{StackList-C8KNd00o.js → StackList-5UB8LoEq.js} +1 -1
  155. zenml/zen_server/dashboard/assets/{Tabs-BEWDPvPV.js → Tabs-AuhCyzle.js} +1 -1
  156. zenml/zen_server/dashboard/assets/Tick-CHW0jc8Y.js +1 -0
  157. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DCuCj7NK.js → UpdatePasswordSchemas-Bauivjf-.js} +1 -1
  158. zenml/zen_server/dashboard/assets/{UsageReason-CwUrEwEz.js → UsageReason-Dr5ca5M4.js} +1 -1
  159. zenml/zen_server/dashboard/assets/{Wizard-CynnoHg4.js → Wizard-XEp9rGmf.js} +1 -1
  160. zenml/zen_server/dashboard/assets/{WizardFooter-B2bYs89C.js → WizardFooter-BtL1Gi1k.js} +1 -1
  161. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-B509kMlL.js → all-pipeline-runs-query-COvsm3bC.js} +1 -1
  162. zenml/zen_server/dashboard/assets/configuration-form-BJUCr0wl.js +1 -0
  163. zenml/zen_server/dashboard/assets/{create-stack-BjWXz5nx.js → create-stack-B2c98UlP.js} +1 -1
  164. zenml/zen_server/dashboard/assets/{delete-run-CzPWbsBy.js → delete-run-Do3XyF4W.js} +1 -1
  165. zenml/zen_server/dashboard/assets/flavor-select-D8CranSY.js +1 -0
  166. zenml/zen_server/dashboard/assets/{form-schemas-B6u3P_a4.js → form-schemas-Bm-dTV3L.js} +1 -1
  167. zenml/zen_server/dashboard/assets/{index-BCKg1Y5r.css → index-6mLFgFwe.css} +1 -1
  168. zenml/zen_server/dashboard/assets/{index-Bjeu4_0O.js → index-CzhJC6pc.js} +1 -1
  169. zenml/zen_server/dashboard/assets/{index-CaRx22lH.js → index-D-n6tspq.js} +1 -1
  170. zenml/zen_server/dashboard/assets/{index-DWoLoYDY.js → index-DPjvk73v.js} +8 -8
  171. zenml/zen_server/dashboard/assets/{index-Dba8yULY.js → index-eIIP-0dQ.js} +1 -1
  172. zenml/zen_server/dashboard/assets/login-mutation-D6uiKsKk.js +1 -0
  173. zenml/zen_server/dashboard/assets/{not-found-DGQ8rm7B.js → not-found-DFrksY0r.js} +1 -1
  174. zenml/zen_server/dashboard/assets/page-B-uHUFcm.js +1 -0
  175. zenml/zen_server/dashboard/assets/page-B0Llmzo_.js +1 -0
  176. zenml/zen_server/dashboard/assets/page-B150LbzG.js +1 -0
  177. zenml/zen_server/dashboard/assets/{page-CfeQbejg.js → page-B1Un9vAU.js} +1 -1
  178. zenml/zen_server/dashboard/assets/{page-CxrLV30P.js → page-B80TE04v.js} +1 -1
  179. zenml/zen_server/dashboard/assets/page-BIseZTJt.js +2 -0
  180. zenml/zen_server/dashboard/assets/{page-C5xq6rqE.js → page-BJ15SGwt.js} +1 -1
  181. zenml/zen_server/dashboard/assets/{page-B6msmF1h.js → page-BJrZsPSh.js} +1 -1
  182. zenml/zen_server/dashboard/assets/page-BMZaECzB.js +1 -0
  183. zenml/zen_server/dashboard/assets/{page-D1upvSPi.js → page-BTvnIFGR.js} +1 -1
  184. zenml/zen_server/dashboard/assets/{page-DLw1Apss.js → page-BXh1mF-D.js} +1 -1
  185. zenml/zen_server/dashboard/assets/page-BZUxCBoD.js +1 -0
  186. zenml/zen_server/dashboard/assets/page-BeFiRx31.js +1 -0
  187. zenml/zen_server/dashboard/assets/{page-C89bN6VV.js → page-BnUwQBeg.js} +1 -1
  188. zenml/zen_server/dashboard/assets/{page-k-UXKVnV.js → page-BqQ6y8Hb.js} +1 -1
  189. zenml/zen_server/dashboard/assets/page-BwAFqFCf.js +1 -0
  190. zenml/zen_server/dashboard/assets/page-BzlVs5tC.js +1 -0
  191. zenml/zen_server/dashboard/assets/{page-C3BbJ-5n.js → page-C11vPVkH.js} +1 -1
  192. zenml/zen_server/dashboard/assets/{page-AnG2ilmi.js → page-CAKBSE9f.js} +1 -1
  193. zenml/zen_server/dashboard/assets/page-CPe9nQSo.js +1 -0
  194. zenml/zen_server/dashboard/assets/page-D0Zt2-7X.js +1 -0
  195. zenml/zen_server/dashboard/assets/page-D2F0Rvak.js +1 -0
  196. zenml/zen_server/dashboard/assets/{page-2EzZ5aWS.js → page-D5GZlpKq.js} +1 -1
  197. zenml/zen_server/dashboard/assets/{page-CxoG4zme.js → page-DBNBYSwq.js} +1 -1
  198. zenml/zen_server/dashboard/assets/page-DDvwWgKP.js +6 -0
  199. zenml/zen_server/dashboard/assets/page-DF9q7ySu.js +1 -0
  200. zenml/zen_server/dashboard/assets/page-DOzFoJuo.js +1 -0
  201. zenml/zen_server/dashboard/assets/page-DaHH2ZEF.js +1 -0
  202. zenml/zen_server/dashboard/assets/{page-B9ELcPAy.js → page-Dd-0y3SU.js} +1 -1
  203. zenml/zen_server/dashboard/assets/{page-Dy6HYsJr.js → page-DhNnHHmX.js} +1 -1
  204. zenml/zen_server/dashboard/assets/{page-CZ_3LB0U.js → page-DkJfgcDi.js} +1 -1
  205. zenml/zen_server/dashboard/assets/page-EhqRFAZc.js +1 -0
  206. zenml/zen_server/dashboard/assets/{page-nHAZvd76.js → page-NIWnUdVg.js} +1 -1
  207. zenml/zen_server/dashboard/assets/{page-DazwBcbq.js → page-kYlFrH53.js} +1 -1
  208. zenml/zen_server/dashboard/assets/page-ygCPGHAV.js +1 -0
  209. zenml/zen_server/dashboard/assets/{persist-BglceT_t.js → persist-C5RlwSq6.js} +1 -1
  210. zenml/zen_server/dashboard/assets/{persist-CMkLV2Cs.js → persist-DHGuHP2H.js} +1 -1
  211. zenml/zen_server/dashboard/assets/{service-DNKY_ZYd.js → service-Do7yitqe.js} +1 -1
  212. zenml/zen_server/dashboard/assets/{sharedSchema-BOmQa793.js → sharedSchema-i_9Y4WcA.js} +1 -1
  213. zenml/zen_server/dashboard/assets/stack-detail-query-omCumL7U.js +1 -0
  214. zenml/zen_server/dashboard/assets/update-server-settings-mutation-B4eE33z-.js +1 -0
  215. zenml/zen_server/dashboard/index.html +4 -4
  216. zenml/zen_server/deploy/daemon/daemon_zen_server.py +1 -1
  217. zenml/zen_server/deploy/deployment.py +1 -2
  218. zenml/zen_server/deploy/docker/docker_zen_server.py +1 -1
  219. zenml/zen_server/rbac/endpoint_utils.py +1 -2
  220. zenml/zen_server/routers/projects_endpoints.py +14 -3
  221. zenml/zen_server/routers/stack_deployment_endpoints.py +12 -4
  222. zenml/zen_server/utils.py +2 -86
  223. zenml/zen_stores/migrations/versions/0.80.0_release.py +23 -0
  224. zenml/zen_stores/migrations/versions/288f4fb6e112_make_tags_user_scoped.py +2 -2
  225. zenml/zen_stores/migrations/versions/41b28cae31ce_make_artifacts_workspace_scoped.py +2 -2
  226. zenml/zen_stores/migrations/versions/f1d723fd723b_add_secret_private_attr.py +2 -2
  227. zenml/zen_stores/schemas/artifact_visualization_schemas.py +1 -1
  228. zenml/zen_stores/schemas/model_schemas.py +1 -1
  229. zenml/zen_stores/schemas/service_schemas.py +1 -1
  230. zenml/zen_stores/schemas/step_run_schemas.py +1 -1
  231. zenml/zen_stores/schemas/trigger_schemas.py +1 -1
  232. zenml/zen_stores/sql_zen_store.py +5 -0
  233. {zenml_nightly-0.75.0.dev20250318.dist-info → zenml_nightly-0.80.0.dev20250322.dist-info}/METADATA +3 -3
  234. {zenml_nightly-0.75.0.dev20250318.dist-info → zenml_nightly-0.80.0.dev20250322.dist-info}/RECORD +237 -235
  235. zenml/zen_server/dashboard/assets/@reactflow-DMaYqp8l.js +0 -17
  236. zenml/zen_server/dashboard/assets/CodeSnippet-D8ptwPjg.js +0 -9
  237. zenml/zen_server/dashboard/assets/ComponentIcon-gpMJ2Y2e.js +0 -1
  238. zenml/zen_server/dashboard/assets/ExecutionStatus-DHiK3Am-.js +0 -1
  239. zenml/zen_server/dashboard/assets/ProBadge-ypma7R8i.js +0 -1
  240. zenml/zen_server/dashboard/assets/ProviderIcon-DKN3Gdcg.js +0 -1
  241. zenml/zen_server/dashboard/assets/RunSelector-CYmRHGdm.js +0 -1
  242. zenml/zen_server/dashboard/assets/SecretTooltip-CHPWF0bu.js +0 -1
  243. zenml/zen_server/dashboard/assets/Tick-DgU4udUn.js +0 -1
  244. zenml/zen_server/dashboard/assets/configuration-form-BEwWCxqY.js +0 -1
  245. zenml/zen_server/dashboard/assets/flavor-select-C1pyy8gq.js +0 -1
  246. zenml/zen_server/dashboard/assets/login-mutation-7WFxPe10.js +0 -1
  247. zenml/zen_server/dashboard/assets/page-BKN4SYXY.js +0 -1
  248. zenml/zen_server/dashboard/assets/page-BNrOW_3T.js +0 -2
  249. zenml/zen_server/dashboard/assets/page-BX6ZrAVH.js +0 -1
  250. zenml/zen_server/dashboard/assets/page-BnOdORy3.js +0 -1
  251. zenml/zen_server/dashboard/assets/page-BtkfcEI7.js +0 -1
  252. zenml/zen_server/dashboard/assets/page-Bz_grLBY.js +0 -1
  253. zenml/zen_server/dashboard/assets/page-CCEwuGU4.js +0 -1
  254. zenml/zen_server/dashboard/assets/page-COAGXWJu.js +0 -1
  255. zenml/zen_server/dashboard/assets/page-CaibMa0l.js +0 -1
  256. zenml/zen_server/dashboard/assets/page-CskoTYOC.js +0 -1
  257. zenml/zen_server/dashboard/assets/page-Cyoe7AtN.js +0 -1
  258. zenml/zen_server/dashboard/assets/page-D03wm5f1.js +0 -1
  259. zenml/zen_server/dashboard/assets/page-D8UimvyP.js +0 -1
  260. zenml/zen_server/dashboard/assets/page-DEnmFyzi.js +0 -1
  261. zenml/zen_server/dashboard/assets/page-TiOZeeo0.js +0 -1
  262. zenml/zen_server/dashboard/assets/page-cveasWUr.js +0 -6
  263. zenml/zen_server/dashboard/assets/page-iTvxfhgZ.js +0 -1
  264. zenml/zen_server/dashboard/assets/page-niRD8Hqz.js +0 -1
  265. zenml/zen_server/dashboard/assets/stack-detail-query-CI_YMUx6.js +0 -1
  266. zenml/zen_server/dashboard/assets/transform-DKsRLKTv.js +0 -1
  267. zenml/zen_server/dashboard/assets/update-server-settings-mutation-CNYCc-FU.js +0 -1
  268. {zenml_nightly-0.75.0.dev20250318.dist-info → zenml_nightly-0.80.0.dev20250322.dist-info}/LICENSE +0 -0
  269. {zenml_nightly-0.75.0.dev20250318.dist-info → zenml_nightly-0.80.0.dev20250322.dist-info}/WHEEL +0 -0
  270. {zenml_nightly-0.75.0.dev20250318.dist-info → zenml_nightly-0.80.0.dev20250322.dist-info}/entry_points.txt +0 -0
@@ -44,5 +44,3 @@ class DiscordIntegration(Integration):
44
44
 
45
45
  return [DiscordAlerterFlavor]
46
46
 
47
-
48
- DiscordIntegration.check_installation()
@@ -87,5 +87,3 @@ class EvidentlyIntegration(Integration):
87
87
 
88
88
  return [EvidentlyDataValidatorFlavor]
89
89
 
90
-
91
- EvidentlyIntegration.check_installation()
@@ -45,5 +45,3 @@ class FacetsIntegration(Integration):
45
45
  return cls.REQUIREMENTS + \
46
46
  PandasIntegration.get_requirements(target_os=target_os)
47
47
 
48
-
49
- FacetsIntegration.check_installation()
@@ -60,5 +60,3 @@ class FeastIntegration(Integration):
60
60
  return cls.REQUIREMENTS + \
61
61
  PandasIntegration.get_requirements(target_os=target_os)
62
62
 
63
-
64
- FeastIntegration.check_installation()
@@ -84,6 +84,3 @@ class GcpIntegration(Integration):
84
84
  VertexOrchestratorFlavor,
85
85
  VertexStepOperatorFlavor,
86
86
  ]
87
-
88
-
89
- GcpIntegration.check_installation()
@@ -39,5 +39,3 @@ class GitHubIntegration(Integration):
39
39
 
40
40
  return [GithubWebhookEventSourceFlavor]
41
41
 
42
-
43
- GitHubIntegration.check_installation()
@@ -237,12 +237,17 @@ class GitHubCodeRepository(BaseCodeRepository):
237
237
  Returns:
238
238
  Whether the remote url is correct.
239
239
  """
240
- https_url = f"https://{self.config.host}/{self.config.owner}/{self.config.repository}.git"
240
+ host = self.config.host or "github.com"
241
+ host = host.rstrip("/")
242
+
243
+ https_url = (
244
+ f"https://{host}/{self.config.owner}/{self.config.repository}.git"
245
+ )
241
246
  if url == https_url:
242
247
  return True
243
248
 
244
249
  ssh_regex = re.compile(
245
- f".*@{self.config.host}:{self.config.owner}/{self.config.repository}.git"
250
+ f".*@{host}:{self.config.owner}/{self.config.repository}.git"
246
251
  )
247
252
  if ssh_regex.fullmatch(url):
248
253
  return True
@@ -25,4 +25,3 @@ class GitLabIntegration(Integration):
25
25
  REQUIREMENTS: List[str] = ["python-gitlab"]
26
26
 
27
27
 
28
- GitLabIntegration.check_installation()
@@ -176,10 +176,13 @@ class GitLabCodeRepository(BaseCodeRepository):
176
176
  Returns:
177
177
  Whether the remote url is correct.
178
178
  """
179
+ host = self.config.host or "gitlab.com"
180
+ host = host.rstrip("/")
181
+
179
182
  parsed_url = urlparse(url)
180
183
  if (
181
184
  parsed_url.scheme == "https"
182
- and parsed_url.hostname == self.config.host
185
+ and parsed_url.hostname == host
183
186
  and parsed_url.path
184
187
  == f"/{self.config.group}/{self.config.project}.git"
185
188
  ):
@@ -188,7 +191,7 @@ class GitLabCodeRepository(BaseCodeRepository):
188
191
  ssh_regex = re.compile(
189
192
  r"^(?P<scheme_with_delimiter>ssh://)?"
190
193
  r"(?P<userinfo>git)"
191
- f"@{self.config.host}:"
194
+ f"@{host}:"
192
195
  r"(?P<port>\d+)?"
193
196
  r"(?(scheme_with_delimiter)/|/?)"
194
197
  f"{self.config.group}/{self.config.project}.git$",
@@ -66,6 +66,3 @@ class GreatExpectationsIntegration(Integration):
66
66
 
67
67
  return cls.REQUIREMENTS + \
68
68
  PandasIntegration.get_requirements(target_os=target_os)
69
-
70
-
71
- GreatExpectationsIntegration.check_installation()
@@ -75,4 +75,3 @@ class HuggingfaceIntegration(Integration):
75
75
  return [HuggingFaceModelDeployerFlavor]
76
76
 
77
77
 
78
- HuggingfaceIntegration.check_installation()
@@ -28,11 +28,13 @@ from huggingface_hub.errors import HfHubHTTPError
28
28
  from pydantic import Field
29
29
 
30
30
  from zenml.client import Client
31
+ from zenml.enums import ServiceState
31
32
  from zenml.integrations.huggingface.flavors.huggingface_model_deployer_flavor import (
32
33
  HuggingFaceBaseConfig,
33
34
  )
34
35
  from zenml.logger import get_logger
35
- from zenml.services import ServiceState, ServiceStatus, ServiceType
36
+ from zenml.models.v2.misc.service import ServiceType
37
+ from zenml.services import ServiceStatus
36
38
  from zenml.services.service import BaseDeploymentService, ServiceConfig
37
39
 
38
40
  logger = get_logger(__name__)
@@ -49,5 +49,3 @@ class HyperAIIntegration(Integration):
49
49
 
50
50
  return [HyperAIOrchestratorFlavor]
51
51
 
52
-
53
- HyperAIIntegration.check_installation()
@@ -38,5 +38,3 @@ class KanikoIntegration(Integration):
38
38
 
39
39
  return [KanikoImageBuilderFlavor]
40
40
 
41
-
42
- KanikoIntegration.check_installation()
@@ -49,4 +49,3 @@ class KubeflowIntegration(Integration):
49
49
  return [KubeflowOrchestratorFlavor]
50
50
 
51
51
 
52
- KubeflowIntegration.check_installation()
@@ -48,5 +48,3 @@ class KubernetesIntegration(Integration):
48
48
 
49
49
  return [KubernetesOrchestratorFlavor, KubernetesStepOperatorFlavor]
50
50
 
51
-
52
- KubernetesIntegration.check_installation()
@@ -85,6 +85,9 @@ class KubernetesOrchestratorConfig(
85
85
  parallel_step_startup_waiting_period: How long to wait in between
86
86
  starting parallel steps. This can be used to distribute server
87
87
  load when running pipelines with a huge amount of parallel steps.
88
+ pass_zenml_token_as_secret: If `True`, the ZenML token will be passed
89
+ as a Kubernetes secret to the pods. For this to work, the Kubernetes
90
+ client must have permissions to create secrets in the namespace.
88
91
  """
89
92
 
90
93
  incluster: bool = False
@@ -93,6 +96,7 @@ class KubernetesOrchestratorConfig(
93
96
  local: bool = False
94
97
  skip_local_validations: bool = False
95
98
  parallel_step_startup_waiting_period: Optional[float] = None
99
+ pass_zenml_token_as_secret: bool = False
96
100
 
97
101
  @property
98
102
  def is_remote(self) -> bool:
@@ -34,7 +34,7 @@ Adjusted from https://github.com/tensorflow/tfx/blob/master/tfx/utils/kube_utils
34
34
  import enum
35
35
  import re
36
36
  import time
37
- from typing import Any, Callable, Optional, TypeVar, cast
37
+ from typing import Any, Callable, Dict, Optional, TypeVar, cast
38
38
 
39
39
  from kubernetes import client as k8s_client
40
40
  from kubernetes import config as k8s_config
@@ -43,6 +43,7 @@ from kubernetes.client.rest import ApiException
43
43
  from zenml.integrations.kubernetes.orchestrators.manifest_utils import (
44
44
  build_namespace_manifest,
45
45
  build_role_binding_manifest_for_service_account,
46
+ build_secret_manifest,
46
47
  build_service_account_manifest,
47
48
  )
48
49
  from zenml.logger import get_logger
@@ -371,3 +372,90 @@ def create_namespace(core_api: k8s_client.CoreV1Api, namespace: str) -> None:
371
372
  """
372
373
  manifest = build_namespace_manifest(namespace)
373
374
  _if_not_exists(core_api.create_namespace)(body=manifest)
375
+
376
+
377
+ def create_secret(
378
+ core_api: k8s_client.CoreV1Api,
379
+ namespace: str,
380
+ secret_name: str,
381
+ data: Dict[str, Optional[str]],
382
+ ) -> None:
383
+ """Create a Kubernetes secret.
384
+
385
+ Args:
386
+ core_api: Client of Core V1 API of Kubernetes API.
387
+ namespace: The namespace in which to create the secret.
388
+ secret_name: The name of the secret to create.
389
+ data: The secret data.
390
+ """
391
+ core_api.create_namespaced_secret(
392
+ namespace=namespace,
393
+ body=build_secret_manifest(name=secret_name, data=data),
394
+ )
395
+
396
+
397
+ def update_secret(
398
+ core_api: k8s_client.CoreV1Api,
399
+ namespace: str,
400
+ secret_name: str,
401
+ data: Dict[str, Optional[str]],
402
+ ) -> None:
403
+ """Update a Kubernetes secret.
404
+
405
+ Args:
406
+ core_api: Client of Core V1 API of Kubernetes API.
407
+ namespace: The namespace in which to update the secret.
408
+ secret_name: The name of the secret to update.
409
+ data: The secret data. If the value is None, the key will be removed
410
+ from the secret.
411
+ """
412
+ core_api.patch_namespaced_secret(
413
+ namespace=namespace,
414
+ name=secret_name,
415
+ body=build_secret_manifest(name=secret_name, data=data),
416
+ )
417
+
418
+
419
+ def create_or_update_secret(
420
+ core_api: k8s_client.CoreV1Api,
421
+ namespace: str,
422
+ secret_name: str,
423
+ data: Dict[str, Optional[str]],
424
+ ) -> None:
425
+ """Create a Kubernetes secret if it doesn't exist, or update it if it does.
426
+
427
+ Args:
428
+ core_api: Client of Core V1 API of Kubernetes API.
429
+ namespace: The namespace in which to create or update the secret.
430
+ secret_name: The name of the secret to create or update.
431
+ data: The secret data. If the value is None, the key will be removed
432
+ from the secret.
433
+
434
+ Raises:
435
+ ApiException: If the secret creation failed for any reason other than
436
+ the secret already existing.
437
+ """
438
+ try:
439
+ create_secret(core_api, namespace, secret_name, data)
440
+ except ApiException as e:
441
+ if e.status != 409:
442
+ raise
443
+ update_secret(core_api, namespace, secret_name, data)
444
+
445
+
446
+ def delete_secret(
447
+ core_api: k8s_client.CoreV1Api,
448
+ namespace: str,
449
+ secret_name: str,
450
+ ) -> None:
451
+ """Delete a Kubernetes secret.
452
+
453
+ Args:
454
+ core_api: Client of Core V1 API of Kubernetes API.
455
+ namespace: The namespace in which to delete the secret.
456
+ secret_name: The name of the secret to delete.
457
+ """
458
+ core_api.delete_namespaced_secret(
459
+ name=secret_name,
460
+ namespace=namespace,
461
+ )
@@ -41,6 +41,7 @@ from typing import (
41
41
  Type,
42
42
  cast,
43
43
  )
44
+ from uuid import UUID
44
45
 
45
46
  from kubernetes import client as k8s_client
46
47
  from kubernetes import config as k8s_config
@@ -72,6 +73,7 @@ if TYPE_CHECKING:
72
73
  logger = get_logger(__name__)
73
74
 
74
75
  ENV_ZENML_KUBERNETES_RUN_ID = "ZENML_KUBERNETES_RUN_ID"
76
+ KUBERNETES_SECRET_TOKEN_KEY_NAME = "zenml_api_token"
75
77
 
76
78
 
77
79
  class KubernetesOrchestrator(ContainerizedOrchestrator):
@@ -221,45 +223,52 @@ class KubernetesOrchestrator(ContainerizedOrchestrator):
221
223
  msg = f"'{self.name}' Kubernetes orchestrator error: "
222
224
 
223
225
  if not self.connector:
224
- if not kubernetes_context:
226
+ if kubernetes_context:
227
+ contexts, active_context = self.get_kubernetes_contexts()
228
+
229
+ if kubernetes_context not in contexts:
230
+ return False, (
231
+ f"{msg}could not find a Kubernetes context named "
232
+ f"'{kubernetes_context}' in the local "
233
+ "Kubernetes configuration. Please make sure that "
234
+ "the Kubernetes cluster is running and that the "
235
+ "kubeconfig file is configured correctly. To list "
236
+ "all configured contexts, run:\n\n"
237
+ " `kubectl config get-contexts`\n"
238
+ )
239
+ if kubernetes_context != active_context:
240
+ logger.warning(
241
+ f"{msg}the Kubernetes context "
242
+ f"'{kubernetes_context}' configured for the "
243
+ f"Kubernetes orchestrator is not the same as the "
244
+ f"active context in the local Kubernetes "
245
+ f"configuration. If this is not deliberate, you "
246
+ f"should update the orchestrator's "
247
+ f"`kubernetes_context` field by running:\n\n"
248
+ f" `zenml orchestrator update {self.name} "
249
+ f"--kubernetes_context={active_context}`\n"
250
+ f"To list all configured contexts, run:\n\n"
251
+ f" `kubectl config get-contexts`\n"
252
+ f"To set the active context to be the same as the "
253
+ f"one configured in the Kubernetes orchestrator "
254
+ f"and silence this warning, run:\n\n"
255
+ f" `kubectl config use-context "
256
+ f"{kubernetes_context}`\n"
257
+ )
258
+ elif self.config.incluster:
259
+ # No service connector or kubernetes_context is needed when
260
+ # the orchestrator is being used from within a Kubernetes
261
+ # cluster.
262
+ pass
263
+ else:
225
264
  return False, (
226
- f"{msg}you must either link this stack component to a "
265
+ f"{msg}you must either link this orchestrator to a "
227
266
  "Kubernetes service connector (see the 'zenml "
228
- "orchestrator connect' CLI command) or explicitly set "
267
+ "orchestrator connect' CLI command), explicitly set "
229
268
  "the `kubernetes_context` attribute to the name of the "
230
269
  "Kubernetes config context pointing to the cluster "
231
- "where you would like to run pipelines."
232
- )
233
-
234
- contexts, active_context = self.get_kubernetes_contexts()
235
-
236
- if kubernetes_context not in contexts:
237
- return False, (
238
- f"{msg}could not find a Kubernetes context named "
239
- f"'{kubernetes_context}' in the local "
240
- "Kubernetes configuration. Please make sure that the "
241
- "Kubernetes cluster is running and that the kubeconfig "
242
- "file is configured correctly. To list all configured "
243
- "contexts, run:\n\n"
244
- " `kubectl config get-contexts`\n"
245
- )
246
- if kubernetes_context != active_context:
247
- logger.warning(
248
- f"{msg}the Kubernetes context '{kubernetes_context}' " # nosec
249
- f"configured for the Kubernetes orchestrator is not "
250
- f"the same as the active context in the local "
251
- f"Kubernetes configuration. If this is not deliberate,"
252
- f" you should update the orchestrator's "
253
- f"`kubernetes_context` field by running:\n\n"
254
- f" `zenml orchestrator update {self.name} "
255
- f"--kubernetes_context={active_context}`\n"
256
- f"To list all configured contexts, run:\n\n"
257
- f" `kubectl config get-contexts`\n"
258
- f"To set the active context to be the same as the one "
259
- f"configured in the Kubernetes orchestrator and "
260
- f"silence this warning, run:\n\n"
261
- f" `kubectl config use-context "
262
- f"{kubernetes_context}`\n"
270
+ "where you would like to run pipelines, or set the "
271
+ "`incluster` attribute to `True`."
263
272
  )
264
273
 
265
274
  silence_local_validations_msg = (
@@ -368,6 +377,17 @@ class KubernetesOrchestrator(ContainerizedOrchestrator):
368
377
 
369
378
  return pod_settings
370
379
 
380
+ def get_token_secret_name(self, deployment_id: UUID) -> str:
381
+ """Returns the name of the secret that contains the ZenML token.
382
+
383
+ Args:
384
+ deployment_id: The ID of the deployment.
385
+
386
+ Returns:
387
+ The name of the secret that contains the ZenML token.
388
+ """
389
+ return f"zenml-token-{deployment_id}"
390
+
371
391
  def prepare_or_run_pipeline(
372
392
  self,
373
393
  deployment: "PipelineDeploymentResponse",
@@ -439,6 +459,38 @@ class KubernetesOrchestrator(ContainerizedOrchestrator):
439
459
  # Authorize pod to run Kubernetes commands inside the cluster.
440
460
  service_account_name = self._get_service_account_name(settings)
441
461
 
462
+ # We set some default minimum resource requests for the orchestrator pod
463
+ # here if the user has not specified any, because the orchestrator pod
464
+ # takes up some memory resources itself and, if not specified, the pod
465
+ # will be scheduled on any node regardless of available memory and risk
466
+ # negatively impacting or even crashing the node due to memory pressure.
467
+ orchestrator_pod_settings = self.apply_default_resource_requests(
468
+ memory="400Mi",
469
+ cpu="100m",
470
+ pod_settings=settings.orchestrator_pod_settings,
471
+ )
472
+
473
+ if self.config.pass_zenml_token_as_secret:
474
+ secret_name = self.get_token_secret_name(deployment.id)
475
+ token = environment.pop("ZENML_STORE_API_TOKEN")
476
+ kube_utils.create_or_update_secret(
477
+ core_api=self._k8s_core_api,
478
+ namespace=self.config.kubernetes_namespace,
479
+ secret_name=secret_name,
480
+ data={KUBERNETES_SECRET_TOKEN_KEY_NAME: token},
481
+ )
482
+ orchestrator_pod_settings.env.append(
483
+ {
484
+ "name": "ZENML_STORE_API_TOKEN",
485
+ "valueFrom": {
486
+ "secretKeyRef": {
487
+ "name": secret_name,
488
+ "key": KUBERNETES_SECRET_TOKEN_KEY_NAME,
489
+ }
490
+ },
491
+ }
492
+ )
493
+
442
494
  # Schedule as CRON job if CRON schedule is given.
443
495
  if deployment.schedule:
444
496
  if not deployment.schedule.cron_expression:
@@ -458,7 +510,7 @@ class KubernetesOrchestrator(ContainerizedOrchestrator):
458
510
  args=args,
459
511
  service_account_name=service_account_name,
460
512
  privileged=False,
461
- pod_settings=settings.orchestrator_pod_settings,
513
+ pod_settings=orchestrator_pod_settings,
462
514
  env=environment,
463
515
  mount_local_stores=self.config.is_local,
464
516
  )
@@ -472,57 +524,46 @@ class KubernetesOrchestrator(ContainerizedOrchestrator):
472
524
  f'`"{cron_expression}"`.'
473
525
  )
474
526
  return
475
-
476
- # We set some default minimum resource requests for the orchestrator pod
477
- # here if the user has not specified any, because the orchestrator pod
478
- # takes up some memory resources itself and, if not specified, the pod
479
- # will be scheduled on any node regardless of available memory and risk
480
- # negatively impacting or even crashing the node due to memory pressure.
481
- orchestrator_pod_settings = self.apply_default_resource_requests(
482
- memory="400Mi",
483
- cpu="100m",
484
- pod_settings=settings.orchestrator_pod_settings,
485
- )
486
-
487
- # Create and run the orchestrator pod.
488
- pod_manifest = build_pod_manifest(
489
- run_name=orchestrator_run_name,
490
- pod_name=pod_name,
491
- pipeline_name=pipeline_name,
492
- image_name=image,
493
- command=command,
494
- args=args,
495
- privileged=False,
496
- pod_settings=orchestrator_pod_settings,
497
- service_account_name=service_account_name,
498
- env=environment,
499
- mount_local_stores=self.config.is_local,
500
- )
501
-
502
- self._k8s_core_api.create_namespaced_pod(
503
- namespace=self.config.kubernetes_namespace,
504
- body=pod_manifest,
505
- )
506
-
507
- # Wait for the orchestrator pod to finish and stream logs.
508
- if settings.synchronous:
509
- logger.info("Waiting for Kubernetes orchestrator pod...")
510
- kube_utils.wait_pod(
511
- kube_client_fn=self.get_kube_client,
527
+ else:
528
+ # Create and run the orchestrator pod.
529
+ pod_manifest = build_pod_manifest(
530
+ run_name=orchestrator_run_name,
512
531
  pod_name=pod_name,
513
- namespace=self.config.kubernetes_namespace,
514
- exit_condition_lambda=kube_utils.pod_is_done,
515
- timeout_sec=settings.timeout,
516
- stream_logs=True,
532
+ pipeline_name=pipeline_name,
533
+ image_name=image,
534
+ command=command,
535
+ args=args,
536
+ privileged=False,
537
+ pod_settings=orchestrator_pod_settings,
538
+ service_account_name=service_account_name,
539
+ env=environment,
540
+ mount_local_stores=self.config.is_local,
517
541
  )
518
- else:
519
- logger.info(
520
- f"Orchestration started asynchronously in pod "
521
- f"`{self.config.kubernetes_namespace}:{pod_name}`. "
522
- f"Run the following command to inspect the logs: "
523
- f"`kubectl logs {pod_name} -n {self.config.kubernetes_namespace}`."
542
+
543
+ self._k8s_core_api.create_namespaced_pod(
544
+ namespace=self.config.kubernetes_namespace,
545
+ body=pod_manifest,
524
546
  )
525
547
 
548
+ # Wait for the orchestrator pod to finish and stream logs.
549
+ if settings.synchronous:
550
+ logger.info("Waiting for Kubernetes orchestrator pod...")
551
+ kube_utils.wait_pod(
552
+ kube_client_fn=self.get_kube_client,
553
+ pod_name=pod_name,
554
+ namespace=self.config.kubernetes_namespace,
555
+ exit_condition_lambda=kube_utils.pod_is_done,
556
+ timeout_sec=settings.timeout,
557
+ stream_logs=True,
558
+ )
559
+ else:
560
+ logger.info(
561
+ f"Orchestration started asynchronously in pod "
562
+ f"`{self.config.kubernetes_namespace}:{pod_name}`. "
563
+ f"Run the following command to inspect the logs: "
564
+ f"`kubectl logs {pod_name} -n {self.config.kubernetes_namespace}`."
565
+ )
566
+
526
567
  def _get_service_account_name(
527
568
  self, settings: KubernetesOrchestratorSettings
528
569
  ) -> str:
@@ -28,6 +28,7 @@ from zenml.integrations.kubernetes.flavors.kubernetes_orchestrator_flavor import
28
28
  from zenml.integrations.kubernetes.orchestrators import kube_utils
29
29
  from zenml.integrations.kubernetes.orchestrators.kubernetes_orchestrator import (
30
30
  ENV_ZENML_KUBERNETES_RUN_ID,
31
+ KUBERNETES_SECRET_TOKEN_KEY_NAME,
31
32
  KubernetesOrchestrator,
32
33
  )
33
34
  from zenml.integrations.kubernetes.orchestrators.manifest_utils import (
@@ -82,6 +83,9 @@ def main() -> None:
82
83
  kube_client = orchestrator.get_kube_client(incluster=True)
83
84
  core_api = k8s_client.CoreV1Api(kube_client)
84
85
 
86
+ env = get_config_environment_vars()
87
+ env[ENV_ZENML_KUBERNETES_RUN_ID] = orchestrator_run_id
88
+
85
89
  def run_step_on_kubernetes(step_name: str) -> None:
86
90
  """Run a pipeline step in a separate Kubernetes pod.
87
91
 
@@ -115,9 +119,6 @@ def main() -> None:
115
119
  orchestrator_settings
116
120
  )
117
121
 
118
- env = get_config_environment_vars()
119
- env[ENV_ZENML_KUBERNETES_RUN_ID] = orchestrator_run_id
120
-
121
122
  # We set some default minimum memory resource requests for the step pod
122
123
  # here if the user has not specified any, because the step pod takes up
123
124
  # some memory resources itself and, if not specified, the pod will be
@@ -128,6 +129,23 @@ def main() -> None:
128
129
  pod_settings=settings.pod_settings,
129
130
  )
130
131
 
132
+ if orchestrator.config.pass_zenml_token_as_secret:
133
+ env.pop("ZENML_STORE_API_TOKEN", None)
134
+ secret_name = orchestrator.get_token_secret_name(
135
+ deployment_config.id
136
+ )
137
+ pod_settings.env.append(
138
+ {
139
+ "name": "ZENML_STORE_API_TOKEN",
140
+ "valueFrom": {
141
+ "secretKeyRef": {
142
+ "name": secret_name,
143
+ "key": KUBERNETES_SECRET_TOKEN_KEY_NAME,
144
+ }
145
+ },
146
+ }
147
+ )
148
+
131
149
  # Define Kubernetes pod manifest.
132
150
  pod_manifest = build_pod_manifest(
133
151
  pod_name=pod_name,
@@ -166,13 +184,29 @@ def main() -> None:
166
184
  parallel_node_startup_waiting_period = (
167
185
  orchestrator.config.parallel_step_startup_waiting_period or 0.0
168
186
  )
169
- ThreadedDagRunner(
170
- dag=pipeline_dag,
171
- run_fn=run_step_on_kubernetes,
172
- parallel_node_startup_waiting_period=parallel_node_startup_waiting_period,
173
- ).run()
174
-
175
- logger.info("Orchestration pod completed.")
187
+ try:
188
+ ThreadedDagRunner(
189
+ dag=pipeline_dag,
190
+ run_fn=run_step_on_kubernetes,
191
+ parallel_node_startup_waiting_period=parallel_node_startup_waiting_period,
192
+ ).run()
193
+ logger.info("Orchestration pod completed.")
194
+ finally:
195
+ if (
196
+ orchestrator.config.pass_zenml_token_as_secret
197
+ and deployment_config.schedule is None
198
+ ):
199
+ secret_name = orchestrator.get_token_secret_name(
200
+ deployment_config.id
201
+ )
202
+ try:
203
+ kube_utils.delete_secret(
204
+ core_api=core_api,
205
+ namespace=args.kubernetes_namespace,
206
+ secret_name=secret_name,
207
+ )
208
+ except k8s_client.rest.ApiException as e:
209
+ logger.error(f"Error cleaning up secret {secret_name}: {e}")
176
210
 
177
211
 
178
212
  if __name__ == "__main__":