Skip to content

Commit 08cf6a8

Browse files
committed
fixes
1 parent 3352e3f commit 08cf6a8

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

infra/build/functions/build_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def get_project_image_steps( # pylint: disable=too-many-arguments
442442
config,
443443
architectures=None,
444444
experiment=False,
445-
cache_image=''):
445+
cache_image=None):
446446
"""Returns GCB steps to build OSS-Fuzz project image."""
447447
if architectures is None:
448448
architectures = []

infra/build/functions/build_project.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ def image(self):
190190

191191
return f'gcr.io/{build_lib.IMAGE_PROJECT}/{self.name}'
192192

193-
def cached_image(self, sanitizer):
194-
return _CACHED_IMAGE.format(name=self.real_name, sanitizer=sanitizer)
193+
@property
194+
def cached_image(self):
195+
return _CACHED_IMAGE.format(
196+
name=self.real_name, sanitizer=self.cached_sanitizer)
195197

196198

197199
def get_last_step_id(steps):
@@ -355,13 +357,14 @@ def get_build_steps_for_project(project,
355357

356358
timestamp = get_datetime_now().strftime('%Y%m%d%H%M')
357359

358-
# if we use caching, then we need to use the right name. We assume that
360+
# If we use caching, then we need to use the right name. We assume that
359361
# there is only a single sanitizer.
360362
if use_caching:
361-
project.cached_sanitizer=project.sanitizers[0]
362-
cache_image = project.cached_image()
363+
project.cached_sanitizer = project.sanitizers[0]
364+
cache_image = project.cached_image
363365
else:
364-
cache_image = ''
366+
cache_image = None
367+
365368
build_steps = build_lib.get_project_image_steps(
366369
project.name,
367370
project.image,

0 commit comments

Comments
 (0)