@@ -134,10 +134,8 @@ def image_builder(buildspec, image_types=[], device_types=[]):
134134 ARTIFACTS .update (image_config ["context" ])
135135
136136 if build_context == "PR" :
137- cache_from_tag = tag_image_with_pr_number (image_config ["tag" ])
138137 image_tag = tag_image_with_pr_number (image_config ["tag" ])
139138 else :
140- cache_from_tag = image_config ["tag" ]
141139 image_tag = image_config ["tag" ]
142140
143141 if is_autopatch_build_enabled (buildspec_path = buildspec ):
@@ -361,7 +359,6 @@ def image_builder(buildspec, image_types=[], device_types=[]):
361359 tag = append_tag (image_tag , "pre-push" ),
362360 to_build = image_config ["build" ],
363361 stage = constants .PRE_PUSH_STAGE ,
364- cache_from_tag = cache_from_tag ,
365362 context = context ,
366363 additional_tags = additional_image_tags ,
367364 target = target ,
@@ -373,7 +370,7 @@ def image_builder(buildspec, image_types=[], device_types=[]):
373370 # inside function get_common_stage_image_object we make pre_push_stage_image_object non pushable.
374371 if image_config .get ("enable_common_stage_build" , True ):
375372 common_stage_image_object = generate_common_stage_image_object (
376- pre_push_stage_image_object , image_tag , cache_from_tag
373+ pre_push_stage_image_object , image_tag
377374 )
378375 COMMON_STAGE_IMAGES .append (common_stage_image_object )
379376
@@ -477,7 +474,7 @@ def process_images(pre_push_image_list, pre_push_image_type="Pre-push", buildspe
477474 return images_to_push
478475
479476
480- def generate_common_stage_image_object (pre_push_stage_image_object , image_tag , cache_from_tag ):
477+ def generate_common_stage_image_object (pre_push_stage_image_object , image_tag ):
481478 """
482479 Creates a common stage image object for a pre_push stage image. If for a pre_push stage image we create a common
483480 stage image, then we do not push the pre_push stage image to the repository. Instead, we just push its common stage
@@ -499,7 +496,6 @@ def generate_common_stage_image_object(pre_push_stage_image_object, image_tag, c
499496 tag = append_tag (image_tag , "multistage-common" ),
500497 to_build = pre_push_stage_image_object .to_build ,
501498 stage = constants .COMMON_STAGE ,
502- cache_from_tag = cache_from_tag ,
503499 additional_tags = pre_push_stage_image_object .additional_tags ,
504500 )
505501 pre_push_stage_image_object .to_push = False
0 commit comments