https://prefect.io logo
f

Florent VanDeMoortele

09/15/2023, 5:03 PM
Hi Since I updated from prefect 2.12.1 to 2.13.0, I have an error when I install the Helm Chart associated to my Prefect version:
Error: parse error at (prefect-worker/charts/common/templates/_labels.tpl:14): unclosed action
Is there a breaking change?
e

Edward Park

09/15/2023, 5:07 PM
hey florent - which helm chart + version are you using?
f

Florent VanDeMoortele

09/15/2023, 5:11 PM
No problem when I use prefect in 2.12.1. The problem is from 2.13.0 I use systematically the chart version associated to my Prefect version, ie with
helm upgrade --install prefect-worker prefect/prefect-worker --version $CHART_VERSION
Where chart_version is defined by:
CHART_VERSION=$(helm search repo prefect/prefect-worker -l | grep $PREFECT_VERSION
Here is my complete code:
Copy code
# Get chart version corresponding to Prefect version
CHART_VERSION=$(helm search repo prefect/prefect-worker -l | grep $PREFECT_VERSION | awk '{print $2}')
# Deploy worker with Helm chart
helm upgrade --install prefect-worker prefect/prefect-worker \
  --version $CHART_VERSION \
  --namespace=$KUBERNETES_NAMESPACE \
  --set worker.config.workPool=$KUBERNETES_WORK_POOL_NAME \
  --set worker.cloudApiConfig.accountId=$PREFECT_ACCOUNT_ID \
  --set worker.cloudApiConfig.workspaceId=$PREFECT_WORKSPACE_ID
👀 1
Related question: when I upgrade my Prefect version in the requirements of my code, do I need to upgrade the worker with the associated version? Or can I use the same worker?
e

Edward Park

09/15/2023, 5:36 PM
hey florent, could you double check your shell variable values, or share any other chart values that you’re passing in? i stubbed in some dummy values and ran your exact command (and double checked that
CHART_VERSION
evaluated to
2023.09.07
, which is the correct chart version corresponding to 2.13.0
Copy code
$ helm upgrade --install prefect-worker prefect/prefect-worker \
  --version $CHART_VERSION \
  --namespace=$KUBERNETES_NAMESPACE \
  --set worker.config.workPool=$KUBERNETES_WORK_POOL_NAME \
  --set worker.cloudApiConfig.accountId=$PREFECT_ACCOUNT_ID \
  --set worker.cloudApiConfig.workspaceId=$PREFECT_WORKSPACE_ID
Release "prefect-worker" does not exist. Installing it now.
NAME: prefect-worker
LAST DEPLOYED: Fri Sep 15 10:34:42 2023
NAMESPACE: test-namespace
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Check Prefect worker connections in the prefect UI at "<https://app.prefect.cloud/account/eddie-account-id/workspace/eddie-workspace-id>"
Related question: when I upgrade my Prefect version in the requirements of my code, do I need to upgrade the worker with the associated version? Or can I use the same worker?
it’s not required, but it’s strongly recommended that they stay in lockstep so there aren’t any unexpected incompatibilities
👍 2
f

Florent VanDeMoortele

09/18/2023, 9:13 AM
Thank you for your answer @Edward Park. Here is my command without variables:
Copy code
helm upgrade --install prefect-worker prefect/prefect-worker \
    --version 2023.09.14 \
    --namespace=prefect \
    --set worker.config.workPool=wp-dev \
    --set worker.cloudApiConfig.accountId=$PREFECT_ACCOUNT_ID \
    --set worker.cloudApiConfig.workspaceId=$PREFECT_WORKSPACE_ID
For account_id and workspace_id, it's my uuid so I don't share them here (but it works with last 2.12.x version) And I have the same error:
Error: UPGRADE FAILED: parse error at (prefect-worker/charts/common/templates/_labels.tpl:14): unclosed action
👀 1
e

Edward Park

09/18/2023, 5:46 PM
hmm. @Florent VanDeMoortele do you have any additional values that you’re passing into the chart here, besides workPool, accountId, and workspaceId?
also - could you confirm your
helm version
when you have a moment, and if possible update it to the latest? it looks like the issue is that one of our dependency charts introduced a templating expression that is incompatible with < helm 3.6.x
if you’re unable to update your
helm
client version, for whatever reason - we just cut a new chart version that includes a backwards compatible fix to your issue https://github.com/PrefectHQ/prefect-helm/releases/tag/2023.09.18
f

Florent VanDeMoortele

09/19/2023, 8:38 AM
I was in
Version:"v3.4.2"
for my local Helm. I updated to the latest version and now it works ! Thanks a lot @Edward Park 🙏
💙 1