Cannot deploy a docker image with its digest to Cloud Run.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
What happened:
If you specify a Docker image using the digest which has 64 characters and is calculated with SHA-256 algorithm as data in EventWatcher and configure the manifest side's service.yaml under piped monitoring to rewrite the container image deployed to the Cloud Run service in the handler, the service.spec.template.metadata.name can exceed 64 characters. As a result, this causes a BadRequest error and the deployment fails, as shown below.
[2025-03-17 12:10:58 +09:00]
Successfully prepared service manifest with traffic percentages as below:
[2025-03-17 12:10:58 +09:00]
helloworld-1bd4d708f94fcfb58b51b3a0818edc52bcc079104fc0fa3347ff0f309f9ed8b2-ca1937a: 100
[2025-03-17 12:10:58 +09:00]
Start applying the service manifest
[2025-03-17 12:10:58 +09:00]
Failed to update the service helloworld (googleapi: Error 400: service.spec.template.metadata.name: only lowercase, digits, and hyphens; must begin with letter, and may not end with hyphen; must be less than 64 characters.
Details:
[
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "only lowercase, digits, and hyphens; must begin with letter, and may not end with hyphen; must be less than 64 characters.",
"field": "service.spec.template.metadata.name"
}
]
}
]
, badRequest)
What you expected to happen:
The deployment completes successfully even when the EventWatcher handler rewrites the Docker image with the digest.
How to reproduce it:
-
Configure app.pipecd.yaml so that the EventWatcher handler rewrites $.spec.template.spec.containers[0].image in service.yaml under the application's Application Directory.
-
In the CI workflow, execute actions-event-register with the corresponding name and labels, specifying the Docker image name using a digest as data in the EventWatcher matcher.
-
Verify that the event has been registered successfully.
-
Watch the log of the deployment.
Environment:
pipedversion: v0.50.2control-planeversion:v0.50.2- Others:
actions-event-registerversion: v0.50.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Cloud Run manifest generation path from the EventWatcher handler that rewrites service.yaml and constructs service.spec.template.metadata.name. Reproduce the failure with a 64-character SHA-256 image digest, then verify that the generated name stays within Cloud Run's length and character limits and that deployment succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100