Skip to content

Commit 89a3a64

Browse files
authored
Revert "feat(infra): Add base_os_version to support parallel builds" (google#14144)
Reverts google#14128 This caused some breakages in https://github.com/google/oss-fuzz/actions/runs/18567323759/job/52931880439?pr=14064. `infra/helper.py` cannot have any external dependencies
1 parent 9db9d9a commit 89a3a64

File tree

7 files changed

+27
-263
lines changed

7 files changed

+27
-263
lines changed

.github/workflows/check_base_os.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

infra/build/functions/build_lib.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -685,24 +685,12 @@ def get_gcb_url(build_id, cloud_project='oss-fuzz'):
685685
f'{build_id}?project={cloud_project}')
686686

687687

688-
def get_runner_image_name(test_image_suffix, base_image_tag=None):
689-
"""Returns the runner image that should be used.
690-
691-
Returns the testing image if |test_image_suffix|.
692-
"""
688+
def get_runner_image_name(test_image_suffix):
689+
"""Returns the runner image that should be used. Returns the testing image if
690+
|test_image_suffix|."""
693691
image = f'gcr.io/{BASE_IMAGES_PROJECT}/base-runner'
694-
695-
# For trial builds, the version is embedded in the suffix.
696692
if test_image_suffix:
697693
image += '-' + test_image_suffix
698-
return image
699-
700-
# For local/manual runs, the version is passed as a tag.
701-
# Only add a tag if it's specified and not 'legacy', as 'legacy' implies
702-
# 'latest', which is the default behavior.
703-
if base_image_tag and base_image_tag != 'legacy':
704-
image += ':' + base_image_tag
705-
706694
return image
707695

708696

infra/build/functions/build_project.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
class Config:
7474
testing: bool = False
7575
test_image_suffix: Optional[str] = None
76-
base_image_tag: Optional[str] = None
7776
repo: Optional[str] = DEFAULT_OSS_FUZZ_REPO
7877
branch: Optional[str] = None
7978
parallel: bool = False
@@ -454,10 +453,8 @@ def get_build_steps_for_project(project,
454453
f'--architecture {build.architecture} {project.name}\\n' +
455454
'*' * 80)
456455
# Test fuzz targets.
457-
runner_image_name = build_lib.get_runner_image_name(
458-
config.test_image_suffix, config.base_image_tag)
459456
test_step = {
460-
'name': runner_image_name,
457+
'name': build_lib.get_runner_image_name(config.test_image_suffix),
461458
'env': env,
462459
'args': [
463460
'bash', '-c',

infra/build/functions/trial_build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ def _do_test_builds(args, test_image_suffix, end_time, version_tag):
321321

322322
config = build_project.Config(testing=True,
323323
test_image_suffix=test_image_suffix,
324-
base_image_tag=version_tag,
325324
repo=args.repo,
326325
branch=args.branch,
327326
parallel=False,
@@ -433,7 +432,7 @@ def _do_build_type_builds(args, config, credentials, build_type, projects):
433432
credentials,
434433
build_type.type_name,
435434
extra_tags=tags,
436-
timeout=PROJECT_BUILD_TIMEOUT))['id']
435+
timeout=PROJECT_BUILD_TIMEOUT))
437436
time.sleep(1) # Avoid going over 75 requests per second limit.
438437
except Exception as error: # pylint: disable=broad-except
439438
# Handle flake.

infra/build/functions/trial_build_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_build_steps_correct(self, mock_gcb_build_and_push_images,
7373
del mock_wait_on_builds
7474
self.maxDiff = None # pylint: disable=invalid-name
7575
build_id = 1
76-
mock_run_build.return_value = {'id': build_id}
76+
mock_run_build.return_value = build_id
7777
branch_name = 'mybranch'
7878
project = 'skcms'
7979
args = [

infra/ci/check_base_os.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)