<@ULVA73B9P> how can I tell which version of prefe...
# ask-marvin
s
@Marvin how can I tell which version of prefect I am running when orchestrating through prefect cloud?
m
thought for 236.1 seconds
Short answer: Prefect Cloud does not display or record the Prefect Python package version used for a flow run. The version that matters is whatever is installed in the environment where your flows/workers run. Ways to check: - From the runtime environment (e.g., your worker container/VM):
Copy code
prefect version
# or
prefect --version
- Inside your flow (logs it to the run logs):
Copy code
from prefect import flow, get_run_logger
import prefect

@flow
def my_flow():
    get_run_logger().info(f"Prefect version: {prefect.__version__}")
- If you want it visible per run in Cloud without reading logs, add it as a tag:
Copy code
import prefect
from prefect import flow

@flow(tags=[f"prefect:{prefect.__version__}"])
def my_flow():
    ...
Note: Prefect 3.x does not store
prefect_version
on the Flow Run object, so you can’t retrieve it for past runs unless you logged or tagged it. Do you need this for a specific historical run, or just to confirm what your workers are currently using?
s
@Marvin we use an ECS workpool with our own docker image. But there is some prefect code running from prefect cloud that handles the scheduling right? I need to know what version that is. Is it tied to the work pool?
m
thought for 231.9 seconds
Great question. Here’s how this works in Prefect 3.x Cloud: - Scheduling/orchestration is handled entirely by Prefect Cloud’s backend services. It is not tied to your work pool type (ECS, Docker, Kubernetes, etc.). Work pools/workers only determine how runs are picked up and executed, not how they’re scheduled. - The “version” of that Cloud scheduling/orchestration code is managed by Prefect and is not exposed per-workspace or per-work-pool. It’s a shared, continuously deployed service. What you can see: - API protocol version: You can query the Cloud API to see the protocol version Cloud speaks:
Copy code
curl -s <https://api.prefect.cloud/api/version>
This returns something like "0.8.x" which is the server API protocol version. - Local/client version: On your worker/CI/dev machine:
Copy code
prefect version
# or
prefect --version
Note: The “API version” shown by
prefect version
is the client’s supported protocol version, not fetched from Cloud. When talking to Prefect Cloud, the client intentionally skips strict server-version checks because Cloud is maintained for compatibility. If you specifically need the exact Prefect package version running in Cloud’s backend (for audit/compliance), that’s not surfaced via the public API. Let me know if you need that for a formal record and I can point you to the best path (usually a support request).