<@ULVA73B9P> I'm running Prefect OSS on Kubernetes...
# ask-marvin
k
@Marvin I'm running Prefect OSS on Kubernetes. I specified the Prefect server version using the prefectTag. My application where the flows are defined also uses Prefect pip package as a dependency, it's frequently updated via the renovate bot. How do I keep the versions in sync?
m
thought for 828.8 seconds
Great question. Short answer: pin both sides and let Renovate update them together, with the server upgraded first. Key compatibility note (Prefect 3.x) - Newer servers work with older clients, but newer clients may not work with older servers. - Therefore, upgrade order should be: server first, then client. - Docs: Server concepts and Helm deployment Two practical approaches A) Keep server and client in lockstep (recommended) - Pin exact versions for both: - Helm values:
prefectTag: "3.x.y"
- Python:
prefect==3.x.y
- Configure Renovate so a single PR bumps both the server image tag and the Python dependency together. Example renovate.json - This: - Tracks
prefectTag
in your Helm values as a Docker dependency - Updates
prefect
from PyPI - Groups both updates into one PR called “prefect server + client”
Copy code
{
  "extends": [
    "config:recommended"
  ],
  "regexManagers": [
    {
      "fileMatch": [
        "(^|/)(values|helm/.+values)\\.ya?ml$"
      ],
      "matchStrings": [
        // Matches: prefectTag: "3.0.11" or prefectTag: 3.0.11
        "prefectTag:\\s*\"?(?<currentValue>\\d+\\.\\d+\\.\\d+)\"?"
      ],
      "datasourceTemplate": "docker",
      "depNameTemplate": "prefecthq/prefect",
      "versioningTemplate": "semver"
    }
  ],
  "packageRules": [
    {
      "groupName": "prefect server + client",
      "matchDatasources": ["pypi", "docker"],
      "matchPackagePatterns": ["^prefect$"],
      "matchPackageNames": ["prefecthq/prefect", "prefect"],
      "separateMajorMinor": true,
      "rangeStrategy": "pin"
    }
  ]
}
Helm values example
Copy code
# values.yaml
prefectTag: "3.0.11"
# …rest of your chart config
Python dependency pin (requirements.txt/pyproject)
Copy code
prefect==3.0.11
Deployment tip: Even if Renovate opens one PR for both, apply/deploy the server change first, then roll your app/worker images so the new client talks to the upgraded server. B) Keep to the same minor, auto-accept patches - If you want less churn, pin both to a minor line and accept patch bumps: - Helm:
prefectTag: "3.0.x"
(or let Renovate bump to 3.0.z) - Python:
prefect~=3.0
(PEP 440 “compatible release”) - Still follow the server-first upgrade order. Extra notes - The Prefect server Docker tag corresponds to the Python package version (e.g., server image tag 3.0.11 matches PyPI prefect==3.0.11). - If your flows run in custom worker images, also pin
prefect
inside those images to the same version you deploy in your app code. If you share: - the path/name of your Helm values file - how
prefectTag
is defined there - how you manage Python deps (requirements.txt vs Poetry) …I can tailor the Renovate regex and matching rules precisely for your repo. Relevant docs - Prefect Server concepts (compatibility guidance) - Running Prefect Server on Kubernetes with Helm