Hi, after upgrading to prefect 1.0 we are seeing t...
# prefect-community
a
Hi, after upgrading to prefect 1.0 we are seeing this warning during our deployments
...venv/lib/python3.8/site-packages/prefect/client/client.py:848: UserWarning: A flow with the same name is already contained in storage; if you changed your Flow since the last build, you might experience unexpected issues and should re-create your storage object.
I don't understand why we see that, because, we create a new Docker storage object on every deployment
Copy code
flow.storage = Docker(....)
Can anyone explain what this error means, or how to address it?
k
What did you upgrade from? Nothing rings a bell around this. How do you register also?
a
It's been a while 0.14 I believe
Copy code
flow.register(
        project_name=client_code,   
        labels=[environment, client_code],
    )
k
Can I see the storage definition?
a
sure
Copy code
flow.storage = Docker(
        registry_url=image_registry_url(),
        python_dependencies=["boto3"],
        dockerfile=dockerfile_path,
        image_tag="latest",
        env_vars={
            "DATATEER_ENV": environment,
        },
        build_kwargs={
            "buildargs": {
                "MELTANO_DATABASE_URI": os.getenv("MELTANO_DATABASE_URI"),
                "DEPLOY_KEY_PREFECT_LIB": deploy_key_prefect_lib,
            }
        },
    )
I also noticed in the last run it appears that the docker build is running twice--that might explain the warning. I'm digging to see if something in our script might be triggering a second build
give me a moment to look there
k
Ohh I see. It all looks good here.
a
Confirmed, there was a path in the build script that could attempt to register twice. Thanks @Kevin Kho
k
Ah ok. Glad you figured it out