Göktuğ Aşcı
11/22/2024, 7:36 AMMehdi
11/22/2024, 11:03 AMjob_template.json
wich defines the configuration for the jobs
https://github.com/PrefectHQ/prefect-helm/tree/1904f18b2155f85a70141e27e289150bec245431/charts/prefect-worker#configuring-a-bas[…]late-on-the-workerMehdi
11/22/2024, 11:05 AMGöktuğ Aşcı
11/22/2024, 11:30 AMMehdi
11/22/2024, 11:32 AMGöktuğ Aşcı
11/22/2024, 2:24 PMGöktuğ Aşcı
11/22/2024, 2:41 PMGöktuğ Aşcı
11/22/2024, 3:52 PM{
"EXTRA_PIP_PACKAGES": "prefect-dbt prefect-github prefect-gcp prefect-sqlalchemy dbt-core>=1.8.0,<1.9.0 dbt-postgres>=1.8.0,<1.9.0 dbt-bigquery>=1.8.0,<1.9.0",
"PREFECT_LOGGING_LEVEL": "DEBUG"
}
here is how I configure it via the UIGöktuğ Aşcı
11/22/2024, 3:59 PMNate
11/22/2024, 4:03 PMnamespace
is a field on the work pool, so it doesn't need to be configured when you provision the infra, but you can pass in defaults via baseJobTemplate as @Mehdi kindly mentionedGöktuğ Aşcı
11/22/2024, 4:05 PMGöktuğ Aşcı
11/22/2024, 4:05 PMGöktuğ Aşcı
11/22/2024, 4:06 PMGöktuğ Aşcı
11/22/2024, 4:06 PMNate
11/22/2024, 4:06 PMGöktuğ Aşcı
11/22/2024, 4:12 PM➜ prefect-docorbit git:(main) ✗ kubectl logs -n prefect notorious-bug-bpw6x-lkg6m
exec /usr/bin/tini: exec format error
Göktuğ Aşcı
11/22/2024, 4:12 PMGöktuğ Aşcı
11/22/2024, 4:23 PMGöktuğ Aşcı
11/22/2024, 4:23 PMGöktuğ Aşcı
11/22/2024, 4:24 PMNate
11/22/2024, 4:24 PMGöktuğ Aşcı
11/22/2024, 4:26 PM{
"EXTRA_PIP_PACKAGES": "prefect-dbt prefect-github prefect-gcp prefect-sqlalchemy dbt-core>=1.8.0,<1.9.0 dbt-postgres>=1.8.0,<1.9.0 dbt-bigquery>=1.8.0,<1.9.0",
"PREFECT_LOGGING_LEVEL": "DEBUG"
}
I get the issue when I want to customise my own docker imageMehdi
11/22/2024, 4:26 PMGöktuğ Aşcı
11/22/2024, 4:26 PMNate
11/22/2024, 4:26 PMNate
11/22/2024, 4:27 PMimage
on the work pool, which flow run pods will use, which is entirely independent of the worker podMehdi
11/22/2024, 4:27 PMGöktuğ Aşcı
11/22/2024, 4:27 PMGöktuğ Aşcı
11/22/2024, 4:28 PMprefect-dbt prefect-github prefect-gcp prefect-sqlalchemy dbt-core>=1.8.0,<1.9.0 dbt-postgres>=1.8.0,<1.9.0 dbt-bigquery>=1.8.0,<1.9.0
Göktuğ Aşcı
11/22/2024, 4:28 PMGöktuğ Aşcı
11/22/2024, 4:34 PMNate
11/22/2024, 4:34 PMimage
on a per flow run basisGöktuğ Aşcı
11/22/2024, 4:43 PMGöktuğ Aşcı
11/22/2024, 4:44 PMGöktuğ Aşcı
11/22/2024, 4:46 PMNate
11/22/2024, 4:49 PMprefect-dbt
or any other ones you listed, bc these are dependencies required by your flow run. all your worker needs is 'prefect[kubernetes]'
because all it does is communicate with the kubernetes API to create pods where your flow runs happen
◦ start your worker like this
• the flow runs pods that are created by the worker
◦ these pods will actually need prefect-dbt
and your other runtime python dependencies, bc this is where your code will happen.
◦ you do not configure these dependencies by configuring the worker, these dependencies are configured by setting an image
on your kubernetes work pool in the UI or via job variable overrides
setting an image
on your kubernetes work pool is how you can
avoid this phase
Göktuğ Aşcı
11/22/2024, 4:50 PMGöktuğ Aşcı
11/22/2024, 4:51 PMGöktuğ Aşcı
11/22/2024, 4:51 PMMehdi
11/22/2024, 5:01 PMGöktuğ Aşcı
11/22/2024, 5:32 PMGöktuğ Aşcı
11/22/2024, 5:46 PM