Steve Smith
09/22/2022, 1:34 PMentrypoint="app\\flows\\my_flow.py:my_flow"
), so when I try to run it the job cannot find the flow source code. My fix is to manually replace "\\" with "/" in the entrypoint to make it a Linux-style path before applying the deployment. Is this a known issue?Rob Freedy
09/22/2022, 2:30 PMSteve Smith
09/22/2022, 2:36 PMRob Freedy
09/22/2022, 2:40 PMSteve Smith
09/22/2022, 2:46 PMk8s_job_prod = KubernetesJob(
namespace="default",
image=stack['ecr_image_uri'],
image_pull_policy=KubernetesImagePullPolicy.IF_NOT_PRESENT,
labels=dict(group="group", app="app", env=env),
service_account_name='service_name',
)
infra_overrides['customizations'] = [
{
"op": "add",
"path": "/spec/template/spec/containers/0/resources",
"value": {
"requests": {
"cpu": resources.cpu,
"memory": resources.memory
}
},
}
]
deployment_build = Deployment.build_from_flow(
flow=my_flow,
name=full_deployment_name,
description=description,
version=version,
work_queue_name="my-q",
tags=["group", "app", "env"],
infrastructure=k8s_job_prod,
infra_overrides=infra_overrides,
)
# Fix for deployments from Windows, entrypoint needs linux-style path
deployment_build.entrypoint = deployment_build.entrypoint.replace("\\", "/")
deployment_build.apply()
Bianca Hoch
09/22/2022, 3:21 PMMarvin
09/22/2022, 3:22 PMRob Freedy
09/22/2022, 3:23 PMAndreas Nord
09/22/2022, 4:03 PM