Lower case the repositories when pushing to registry#549
Merged
joaopapereira merged 4 commits intocarvel-dev:developfrom Apr 7, 2026
Merged
Conversation
85a8610 to
cad1935
Compare
cad1935 to
0154d31
Compare
0154d31 to
f756a62
Compare
f756a62 to
76daa68
Compare
0b01707 to
10d7dce
Compare
Some registries allow the URL's provided to have uppercase characters despite the convention disctating that only lower case characters, numbers and . or / can be present in the namespace. Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
Signed-off-by: João Pereira <joaopapereira@gmail.com>
10d7dce to
5b562a4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates image push behavior to handle registries that reject uppercase characters in repository names by normalizing image destinations, and adjusts an e2e relocation test image set.
Changes:
- Add fallback logic to lowercase
imageDstwhen tag parsing fails due to a bad name. - Update e2e relocate test fixture by removing two images from the “many images” case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/e2e/relocate_test.go | Removes two images from the e2e relocation test input/output expectations. |
| pkg/kbld/builder/docker/docker.go | Adds error-type check and retries tag creation after lowercasing the destination reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+197
to
+201
| } else if errors.Is(err, ®name.ErrBadName{}) { | ||
| imageDstTagged, err = regname.NewTag(strings.ToLower(imageDst)) | ||
| if err != nil { | ||
| err := fmt.Errorf("Lower casing repository still failed: %s", err) | ||
| return ImageDigest{}, err |
Comment on lines
68
to
73
| - image: index.docker.io/istio/proxyv2@sha256:fc09ea0f969147a4843a564c5b677fbf3a6f94b56627d00b313b4c30d5fef094 | ||
| - image: index.docker.io/istio/sidecar_injector@sha256:ba446f8cf98bafdad4514fd492432dd180243cbc55a0b9c6bebfe31cb169033d | ||
| - image: index.docker.io/eirini/opi@sha256:2e0b84c5fcb1e6e5cdb07a70210f2e462aa52119f7a330660a7444a938deefbb | ||
| - image: ghcr.io/buildpacks-community/kpack/controller@sha256:80e71f484f0aa5f54eb549f5d5e015ac5373c9bc616f12891d676a7e1dfb80bd | ||
| - image: ghcr.io/buildpacks-community/kpack/webhook@sha256:43fc8706c744f4686cc81d10dddc0ab9cd222d7d885904f3d6cc9c184a73cd84 | ||
| - image: index.docker.io/bitnami/postgresql@sha256:9762d9a80b90a5efe299d4848057ac5c45fb384570b36f60aad38fe2b1704bd6 | ||
| - image: index.docker.io/metacontroller/metacontroller@sha256:ad85cb5f5ad9a61a3f38277fed371df43ea0fc55d9073dfa8f4fc2e27c127603 | ||
| - image: index.docker.io/minio/minio@sha256:5e96d539583afd9a7da14e0d9bf2360d316e4e8219659d82b8ef106a9d75b16c |
Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
93b5669 to
2f2c5f7
Compare
Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some registries allow the URL's provided to have uppercase characters despite the convention disctating that only lower case characters, numbers and . or / can be present in the namespace.