```# prefect version 23:39:04.743 | DEBUG | pref...
# ask-community
j
Copy code
# prefect version
23:39:04.743 | DEBUG   | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/57e0246d-d752-4737-b29a-192e8f6eb886/workspaces/6d439078-f534-4a0a-89e0-9c4ced644d6a/>
Version:             2.5.0
API version:         0.8.2
Python version:      3.8.16
Git commit:          eac37918
Built:               Thu, Oct 6, 2022 12:41 PM
OS/Arch:             linux/aarch64
Profile:             default
Server type:         cloud
I am trying to create a deployment that calls a flow with a flow_run_name parameter. I am guessing that my prefect version needs to be updated however I don't know how to upgrade the prefect cloud version. My actual local prefect agent is using the latest 2.8.2 but I'm guessing it is prefect cloud that is stuck on 2.5.0 and I see no documentation on how to update that.
Copy code
@flow(flow_run_name='testing123')
TypeError: flow() got an unexpected keyword argument 'flow_run_name'
n
hi @John Horn
I am guessing that my prefect version needs to be updated
I'd guess the same! you should not have to update prefect cloud (in fact, that's not a thing you can do), just your local version of the
prefect
package. so in your local dev env / agent env you could do
pip install -U prefect
j
the weird thing is I am using a docker agent based on prefect 2.8.2, but when I run prefect version it returns me the cloud server version. Is there a way to get the version of the agent and not the version of the cloud server?
n
hmm I'm not sure what you mean by
when I run prefect version it returns me the cloud server version
is the output you shared above what you get when you run
prefect version
in the environment where you're running your agent?
j
correct it is. what throws me off is
Copy code
Built:               Thu, Oct 6, 2022 12:41 PM
OS/Arch:             linux/aarch64
Profile:             default
Server type:         cloud
I thought that was the version of the cloud but now I know better.
its weird because my docker image version is : prefect-orion:2.8.2
n
hmm, are you using an infrastructure block to specify the image on your deployment?
j
I believe I am.
Copy code
infrastructure=DockerContainer(
            image='prefect-orion:2.8.2',
that's why the prefect version return was really throwing me off. I even deleted all my docker images and rebuilt to make sure I didn't have a straggler getting in there
🤔 1
I tried messing with the image_pull_policy as well and tried IF_NOT_PRESENT as well as ALWAYS
n
does your flow require special deps or could you try using
prefecthq/prefect:2.8.2-python3.{minor version}
for the
image
?
actually how are you running your agent? I think it is what needs to update its prefect version
j
I'm spinning up a container locally using docker compose. The base Dockerfile utilizes 2.8.2
Copy code
FROM prefecthq/prefect:2.8.2-python3.8
Dockerfile:
Copy code
FROM prefecthq/prefect:2.8.2-python3.8

RUN apt update && \
    apt install -y vim && \
    pip install psycopg2-binary s3fs && \
    pip install --upgrade httpcore==0.16.2 \
    pip install gcsfs==2022.11.0

WORKDIR /
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
docker compose service yaml
Copy code
services:
  # --------------------------------------#
  #             Docker Agent              #
  # --------------------------------------#
  prefect-agent:
    build: .
#    image: ${PREFECT_AGENT_IMAGE}
    command:
      - prefect
      - agent
      - start
      - -q
      - default
and the command to kick off the agents
Copy code
docker-compose -f docker-compose.yaml up -d --force-recreate --no-deps --scale prefect-agent=10
I tried again wiping all images and rebuilding using the --no-cache option
and get the same response:
Copy code
prefect version
21:39:48.043 | DEBUG   | prefect.client - Connecting to API at <https://api.prefect.cloud/api/accounts/57e0246d-d752-4737-b29a-192e8f6eb886/workspaces/6d439078-f534-4a0a-89e0-9c4ced644d6a/>
Version:             2.5.0
API version:         0.8.2
Python version:      3.8.16
Git commit:          eac37918
Built:               Thu, Oct 6, 2022 12:41 PM
OS/Arch:             linux/aarch64
Profile:             default
Server type:         cloud
not sure how this solved it but I changed the image to be:
Copy code
prefecthq/prefect:2.8.1-python3.8