Hey everyone, I have a couple of flows that are ru...
# ask-community
d
Hey everyone, I have a couple of flows that are running just fine and now I get this new error when trying to register a new flow -
Copy code
raise InterruptedError(line.get("error"))
      InterruptedError: name invalid: Request contains an invalid argument.
In order to register my flow I use the following command -
Copy code
prefect register --project "Project_name" --path path_to_flow_file.py --name "brands-recognition"
Project_name is the project I have at Prefect cloud path_to_flow_file is the path to the file which contains my flow brands-recognition is the flow name. This is my flow snippet (for debug purposes - just 2 tasks)-
Copy code
schedule = IntervalSchedule(interval=timedelta(days=7))

with Flow("brands-recognition",
          storage=Docker(registry_url="us-central1-docker.pkg.dev/xxx/",
                         dockerfile="./Dockerfile"), schedule=schedule) as flow:  # , schedule=schedule
    mode = Parameter('FULL_UPDATE', default=None)
    task_a(mode)

flow.run_config = VertexRun(machine_type='e2-standard-8', labels=["ml"],
                            service_account='prefect-integration@xx')

# flow.run()
Now when running locally - the flow runs smoothly and generates a result. It seems like the problem is only at the pushing phase (when I register the flow). What am I missing? Thanks.
a
it looks like the error is coming from BigQuery rather than from Prefect? If building a Docker image at registration causes some issues, you can always build your image yourself and pass it to your run configuration or use Docker storage with
stored_as_script=True
. Here are two examples that show this pattern
d
I don’t think so since I get this error when running the registration command that I attached - it happens at stage 14 of the registration which is the docker push phase. I used the same method for all of my previous flows and it works.
The build works - when testing locally and even when registering to prefect -
Copy code
Successfully built 52d7d77892d6
Successfully tagged us-central1-docker.pkg.dev/xx/xxxx/brands-recognition:2021-12-20t15-13-10-030169-00-00
And then it fails at the next step
Copy code
INFO - prefect.Docker | Pushing image to the registry...
a
Can you send a full stack trace?
if only push to registry doesn’t work, I’d login again:
Copy code
docker login -u yourusername -p yourpassword
d
Sure, this is the full stack trace of the error
Copy code
[2021-12-20 17:13:25+0200] INFO - prefect.Docker | Pushing image to the registry...
    Error building storage:
      Traceback (most recent call last):
        File "/Users/dekelr/PycharmProjects/venvs/brand-identification/lib/python3.9/site-packages/prefect/cli/build_register.py", line 463, in build_and_register
    storage.build()
        File "/Users/dekelr/PycharmProjects/venvs/brand-identification/lib/python3.9/site-packages/prefect/storage/docker.py", line 308, in build
    self._build_image(push=push)
        File "/Users/dekelr/PycharmProjects/venvs/brand-identification/lib/python3.9/site-packages/prefect/storage/docker.py", line 381, in _build_image
    self.push_image(full_name, self.image_tag)
        File "/Users/dekelr/PycharmProjects/venvs/brand-identification/lib/python3.9/site-packages/prefect/storage/docker.py", line 595, in push_image
    raise InterruptedError(line.get("error"))
      InterruptedError: name invalid: Request contains an invalid argument.
I already logged out and back in - still doesn’t work.
a
Thanks. So this error definitely comes from the Prefect’s storage: I would try to push the image without Prefect from the same terminal session to investigate where this error comes from
👀 1
d
I’m getting the same error when pushing manually without Prefect. Anyone also had this issue? Thanks