Using the KubernetesJob from prefect.infrastructure provides the following warning:
Copy code
PrefectDeprecationWarning: prefect.infrastructure.kubernetes.KubernetesJob has been deprecated. It will not be available after Sep 2024. Use the Kubernetes worker from prefect-kubernetes instead. Refer to the upgrade guide for more information: <https://docs.prefect.io/latest/guides/upgrade-guide-agents-to-workers/>.
However, the listed upgrade docs still reference the same KubernetesJob:
> from prefect.infrastructure import KubernetesJob
>
> KubernetesJob.load("my-k8s-job").publish_as_work_pool()
Is the warning message still correct and this is being deprecated?
n
Nate
08/14/2024, 1:42 PM
hi @Niall O'Riordan - publish_as_work_pool is just a method that youd run as “the final act” of your KubernetesJob infra block, which creates the Kubernetes work pool that you’d use instead going forward
ie infra blocks like KubernetesJob are being replaced by work pools, publish_as_work_pool is just a method to translate the latter into the former automatically so you don’t have to copy the info over
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.