Skip to content

GCP Cloud Run - GCR is deprecated #1458

@MedAziz1

Description

@MedAziz1

Hello,
While trying to deploy an Artifact Registry, I ran into some problems with the image name. Checking the following file, I saw that it was trying to build a GCR image name.
https://github.com/lithops-cloud/lithops/blob/master/lithops/serverless/backends/gcp_cloudrun/cloudrun.py Line 78
As can be seen in the code snippet below, it's checking for 'gcr.io' and if it doesn't find it it will modify the image name.

    def _format_image_name(self, runtime_name):
        """
        Formats GCR image name from runtime name
        """
        if 'gcr.io' not in runtime_name:
            country = self.region.split('-')[0]
            return f'{country}.gcr.io/{self.project_name}/{runtime_name}'
        else:
            return runtime_name

As of March 18th 2025, Container Registry was deprecated and we can't write images to it anymore (https://docs.cloud.google.com/artifact-registry/docs/transition/transition-from-gcr).
I've looked if Artifact Registry was supported but I didn't find anything. Would it be possible to add support for it? It's the same format only with 'pkg.dev' instead of 'gcr.io'. (https://docs.cloud.google.com/artifact-registry/docs/docker/names)
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions