File tree Expand file tree Collapse file tree
tests/flytekit/unit/core/image_spec Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ class NoOpBuilder(ImageSpecBuilder):
88
99 def should_build (self , image_spec : ImageSpec ) -> bool :
1010 """
11- The build_image function of NoOpBuilder uses the image_spec name as defined by the user without
12- checking whether the image exists in the Docker registry. Therefore, the should_build function
13- should always return True to trigger the build_image function .
11+ The build_image function of NoOpBuilder does not actually build a Docker image.
12+ Since no Docker build process occurs, we do not need to check for Docker daemon
13+ or existing images. Therefore, should_build should always return True .
1414
1515 Args:
1616 image_spec (ImageSpec): Image specification
Original file line number Diff line number Diff line change @@ -364,6 +364,7 @@ def test_noop_builder_updates_image_name_mapping():
364364 from flytekit .image_spec .noop_builder import NoOpBuilder
365365
366366 # Clear any existing mappings to ensure clean test state
367+ ImageBuildEngine ._REGISTRY .pop ("noop" , None )
367368 ImageBuildEngine ._IMAGE_NAME_TO_REAL_NAME .clear ()
368369
369370 # Register NoOpBuilder
@@ -391,5 +392,5 @@ def test_noop_builder_updates_image_name_mapping():
391392 assert actual_real_name == expected_image_name
392393
393394 # Clean up
394- del ImageBuildEngine ._REGISTRY [ "noop" ]
395+ ImageBuildEngine ._REGISTRY . pop ( "noop" , None )
395396 ImageBuildEngine ._IMAGE_NAME_TO_REAL_NAME .clear ()
You can’t perform that action at this time.
0 commit comments