Hi I'm using a "Cloud Run - Push" work pool and it...
# ask-community
j
Hi I'm using a "Cloud Run - Push" work pool and it's working great! However, when I try to add a VPC Connector in order to have a static outbound IP the flows don't work... Error msg:
Flow run could not be submitted to infrastructure: <HttpError 400 when requesting <https://europe-west1-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/xxxxxxxx/jobs?alt=json> returned "metadata.annotations[<http://run.googleapis.com/vpc-access-connector|run.googleapis.com/vpc-access-connector>]: Annotation '<http://run.googleapis.com/vpc-access-connector|run.googleapis.com/vpc-access-connector>' is not supported on resources of kind 'Service'. Supported kinds are: Revision, Execution". Details: "[{'@type': '<http://type.googleapis.com/google.rpc.BadRequest|type.googleapis.com/google.rpc.BadRequest>', 'fieldViolations': [{'field': 'metadata.annotations[<http://run.googleapis.com/vpc-access-connector]|run.googleapis.com/vpc-access-connector]>', 'description': "Annotation '<http://run.googleapis.com/vpc-access-connector|run.googleapis.com/vpc-access-connector>' is not supported on resources of kind 'Service'. Supported kinds are: Revision, Execution"}]}]">
w
hi @Johan sh, thanks for raising, would you please file and issue in the prefect repo with any reproduction steps and we can get it triaged? https://github.com/PrefectHQ/prefect
๐Ÿ‘ 1
j
Hey it looks like where the vpc annotation is supposed to go changed. If you could file the issue that would be great and we'll get it fixed in the template. For now if you go into the advanced tab on your work pool and remove the vpc annotation from the upper level metadata and add it into the execution spec template it should work. So your
job_body
value should look something like:
Copy code
{
    "kind": "Job",
    "spec":
    {
        "template":
        {
            "metadata":
            {
                "annotations":
                {
                    "<http://run.googleapis.com/vpc-access-connector|run.googleapis.com/vpc-access-connector>": "{{ vpc_connector_name }}"
                }
            },
            "spec":
            {
              ...
            }
        }
    },
    "metadata":
    {
        "name": "{{ name }}",
        "annotations":
        {
            "<http://run.googleapis.com/launch-stage|run.googleapis.com/launch-stage>": "BETA"
        }
    },
    "apiVersion": "<http://run.googleapis.com/v1|run.googleapis.com/v1>"
}
๐Ÿ™ 1
๐Ÿ™Œ 1
j
FYI I hit the same issue and the provided fix worked. I didn't see the issue created yet so I made it here: https://github.com/PrefectHQ/prefect/issues/10621