<#3311 [BUG] ImageSpec NoOpBuilder should always r...
# flyte-github
c
#3311 [BUG] ImageSpec NoOpBuilder should always return True while calling should_build function Pull request opened by popojk ## Tracking issue closes #6561 ## Why are the changes needed? The NoOpBuilder should overrride should_build function in order to correctly trigger build_image function in an environment that docker daemon is not running. ## What changes were proposed in this pull request? Make
NoOpBuilder
override
should_build
function. ## How was this patch tested? Test workflow:
Copy code
from flytekit.image_spec.noop_builder import NoOpBuilder
from flytekit import task, workflow, ImageSpec

image_spec = ImageSpec(
    name="test_image",
    builder="noop",
    base_image="localhost:30000/test_image:latest",
    registry="ghcr.io/not_exist_registry"
    
)

@task(container_image=image_spec)
def task_1(message: str) -> str:
    print(message)
    return message

@workflow
def wf() -> str:
    return task_1("hello")
We define a docker registry in
image_spec
that is not existed, and we expect that the SDK will still use the image user defined without actually communicating with the docker registry. After remote running the workflow, the SDK will use the user defined image as expected. [截圖 2025-08-11 上午11 44 59](https://private-user-images.githubusercontent.com/66259759/476434361-7183965d-7c58-439b-89d1-dc6bd9c14919.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTUzNjE0NzgsIm5iZiI6MTc1NTM2MTE3OCwicGF0aCI6Ii82NjI1OTc1OS80NzY0MzQzNjEtNzE4Mzk2NWQtN2M1OC00MzliLTg5ZDEtZGM2YmQ5YzE0OTE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwODE2VDE2MTkzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlNzRhNTY5YzQ0MzVjZjFmOTAyN2JjYzFhYjc1NDcwY2ZjYmM4NmQ4ZGZiZTdkZTViNzk4Njk0OGNhYTQyYmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.H-rKYasBl8WxmOI2jq0hKtXi8h3YkqogdvTolw-_zX4) ### Setup process ### Screenshots ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link https://bito.ai#summarystart| ### Summary by Bito This pull request adds a new method, should_build, to the NoOpBuilder class, fixing a bug by ensuring it consistently returns True. It enhances the build_image method to function even when the Docker daemon is down and improves the testing suite to validate the NoOpBuilder's functionality across various environments, ensuring better reliability and behavior. flyteorg/flytekit