cuddly-jelly-27016
08/11/2025, 5:15 AMNoOpBuilder override should_build function.
## How was this patch tested?
Test workflow:
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/flytekitcuddly-jelly-27016
08/16/2025, 4:19 PM