Fix BazelContainer cloud packaging with unset push_image_tag - #74
Open
rootkiller6788 wants to merge 1 commit into
Open
Fix BazelContainer cloud packaging with unset push_image_tag#74rootkiller6788 wants to merge 1 commit into
rootkiller6788 wants to merge 1 commit into
Conversation
The BazelContainer packaging path passed push_image_tag directly to image.tag() and images.push() without falling back to a default GCR tag, so packaging a BazelContainer with a Vertex/Kubernetes executor that does not set push_image_tag crashed with an AttributeError. Add the same default-tag fallback already used by the Dockerfile and PythonContainer paths.
rootkiller6788
marked this pull request as ready for review
August 23, 2026 09:28
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.
Problem
Packaging an
xm.BazelContainerfor a cloud executor (xm_local.Vertex/xm_local.Kubernetes) crashes when the executor spec does not setpush_image_tag(the default)._package_bazel_containerpasses the resultingNonestraight intoimage.tag()andclient.images.push(), which fails withAttributeError: 'NoneType' object has no attribute 'rsplit'.The sibling packaging paths already handle this:
_package_dockerfileand_package_python_containerfall back to a freshly tagged image in the project's GCR whenpush_image_tagis unset, and_package_containerreuses the image repository when it already points at the project's GCR.Fix
Add the same default-tag fallback to
_package_bazel_container: whenpush_image_tagis unset, generate agcr.io/{project}/{target_name}:{timestamp}tag, matching the_package_dockerfilebehavior.Verification
push_image_tagisOptional[str] = Noneon bothVertexSpecandKubernetesSpec._get_push_image_tagreturns it unchanged.xm.BazelContainercloud path was the only one missing theNoneguard.