set ImageIdentifier.repository for custom registries#1163
Open
dansola wants to merge 1 commit into
Open
Conversation
Contributor
Author
pingsutw
reviewed
Jun 5, 2026
| IMAGE_TASK_DOMAIN = os.environ.get("FLYTE_IMAGEBUILDER_TASK_DOMAIN", "production") | ||
|
|
||
|
|
||
| def _custom_repository(repository: str) -> str: |
Member
There was a problem hiding this comment.
nit: could we rename it to _get_registry
| def _custom_repository(repository: str) -> str: | ||
| # SE-775: for a custom registry override (clone(registry=...)) the image is pushed to a custom | ||
| # repo; tell GetImage to look there instead of the cluster's default repo. Empty for the default. | ||
| first_segment = repository.split("/", maxsplit=1)[0] |
Member
There was a problem hiding this comment.
Suggested change
| first_segment = repository.split("/", maxsplit=1)[0] | |
| registry = repository.split("/", maxsplit=1)[0] |
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.
Set
ImageIdentifier.repositoryfor custom registriesWhen checking whether an image already exists, tell the backend which repo to look in.
Why: for images built with
clone(registry=...), the existence check (GetImage) wasimplicitly looking in the cluster's default repo, never finding the image, so it rebuilt every
run. Now we pass the custom registry/repo explicitly via the new
ImageIdentifier.repositoryfield so the lookup hits. (SE-775)
Default-repo images send an empty
repository, so nothing changes for them. Pulled thedetection into a small
_custom_repository()helper with a unit test.Depends on the
flyteidl2release that includesImageIdentifier.repository— needs aflyteidl2version bump here once it's out.