feat: make flyte build the supported CI image build path#792
Draft
feat: make flyte build the supported CI image build path#792
Conversation
Add tag: Optional[str] = None parameter to clone() method, allowing users to override the content-hash-based tag with an explicit tag. Empty strings are normalized to None to fall back to content-hash-based tagging. Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
… → _build_image_bg Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Adds a --force group-level option to the `flyte build` command that is forwarded to `flyte.build_images` to skip image existence checks and always rebuild. Tests verify the flag is passed correctly when set and defaults to False when omitted. Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
…ools Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
…osition The *-separator changes made tag and other parameters keyword-only, which risks breaking existing user code. Roll back those changes and instead append tag= as the last positional argument in each factory method and clone() for consistency without imposing keyword-only constraints on callers. from_uv_script retains its pre-existing *-separator (it was keyword-only on main already); tag= is appended after secret_mounts. Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Contributor
Author
|
Thinking we should support bare images, not wrapped in |
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.
Summary
tag: Optional[str] = NonetoImage.clone(),from_dockerfile(),from_debian_base(), andfrom_uv_script()— placed immediately afternamein every signature, consistent withregistryandnameImage._tagfield with a publicImage.tagattribute, consistent withregistryandname; constructors now passtag=directly to_new()instead of using post-constructionobject.__setattr__force: bool = Falsethroughbuild_images→_build_images→_build_image_bg→build.aioso the existingImageBuildEngine.build(force=)param is reachable from the public API--forceflag toflyte buildCLI viaBuildArguments, wired intoBuildEnvCommand.invokeexamples/image/ci_build_image.pywith a comment pointing toflyte buildUsage
Pattern A — retag + rebuild via remote builder:
Pattern B — Dockerfile-based build:
# CI step — always rebuild and push flyte build images.py my_image --forceTest Plan
uv run pytest tests/flyte/test_image.py tests/flyte/test_deploy.py tests/cli/test_build.py -v— 70 tests, all passuv run flyte build --help—--forceappears in output