Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d40c92f
feat(ci): Add public log URLs to build failure reports
hunsche Oct 19, 2025
83de133
fix(ci): Explicitly set logsBucket for dynamic builds
hunsche Oct 19, 2025
2449f3c
fix(ci): Add log URL to initial Phase 1 report
hunsche Oct 19, 2025
04b5b46
fix(ci): Add log URL to initial Phase 2 report
hunsche Oct 19, 2025
4e97b32
Merge branch 'master' into feat/add-public-log-urls
hunsche Oct 20, 2025
0809195
feat: Handle trial builds with no reports
hunsche Oct 20, 2025
3d9eabb
refactor: Centralize GCB build info logging
hunsche Oct 20, 2025
09bd2c2
refactor: Make GCB backoff less noisy
hunsche Oct 20, 2025
82fdb6d
fix: Improve error handling for trial build startup failures
hunsche Oct 20, 2025
42c456f
style: Apply yapf formatting
hunsche Oct 20, 2025
a1af255
Merge branch 'master' into feat/add-public-log-urls
hunsche Oct 20, 2025
04dad19
refactor: Simplify build result handling in _do_build_type_builds fun…
hunsche Oct 20, 2025
8bd3e3d
style: Adjust indentation for better readability in _do_build_type_bu…
hunsche Oct 20, 2025
614f62a
Merge branch 'master' into feat/add-public-log-urls
hunsche Oct 20, 2025
3ba8379
Fix(test): Update golden file for trial_build_test
hunsche Oct 20, 2025
21152aa
feat(build): Skip trial_build unless explicitly invoked
hunsche Oct 20, 2025
eb6d199
feat(build): Skip trial_build runs and create empty results
hunsche Oct 20, 2025
7696bc8
feat(build): Skip report_generator when not invoked explicitly
hunsche Oct 20, 2025
02d49bd
Style: Remove comments and apply formatting
hunsche Oct 20, 2025
605c7e3
Fix: Add missing logging import in report_generator
hunsche Oct 20, 2025
26a982e
Fix: Flush output buffer to ensure skip message is logged
hunsche Oct 20, 2025
36f2912
Fix: Pass project_name to run_build in trial_build
hunsche Oct 20, 2025
2cea774
Refactor: Remove logging and unused code in trial_build_main function
hunsche Oct 20, 2025
aba1f11
Fix: Simplify print statement in main function for clarity
hunsche Oct 20, 2025
54f117f
feat: Skip report generation for untriggered trial builds
hunsche Oct 20, 2025
0953c7d
fix: Correct flag file path and name for CI tests
hunsche Oct 21, 2025
712cfcc
fix: Correct GCS path parsing in get_signed_url
hunsche Oct 21, 2025
0fe1384
fix: Correct GCS path parsing in get_signed_url
hunsche Oct 21, 2025
582bef4
Merge branch 'master' into feat/add-public-log-urls
hunsche Oct 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions infra/build/functions/build_and_push_test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def wait_for_build_and_report_summary(build_id, cloud_project='oss-fuzz-base'):
'----------------------------------------------------------------')
logging.info('GCB Build ID: %s', build_id)
logging.info('GCB Build URL: %s', logs_url)
log_url = (f'https://oss-fuzz-gcb-logs.storage.googleapis.com/'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is repeated many times in this PR. Can you create a common helper in build_lib for this and use that everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've moved the repeated logging into a common helper function.

f'log-{build_id}.txt')
logging.info('Log URL: %s', log_url)
logging.info(
'================================================================')

Expand All @@ -136,6 +139,9 @@ def wait_for_build_and_report_summary(build_id, cloud_project='oss-fuzz-base'):
'----------------------------------------------------------------')
logging.info('GCB Build ID: %s', build_id)
logging.info('GCB Build URL: %s', logs_url)
log_url = (f'https://oss-fuzz-gcb-logs.storage.googleapis.com/'
f'log-{build_id}.txt')
logging.info('Log URL: %s', log_url)
logging.info(
'================================================================')

Expand Down
1 change: 1 addition & 0 deletions infra/build/functions/build_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ def get_build_body( # pylint: disable=too-many-arguments
'steps': steps,
'timeout': str(timeout) + 's',
'options': options,
'logsBucket': 'gs://oss-fuzz-gcb-logs',
}
if tags:
build_body['tags'] = tags
Expand Down
28 changes: 19 additions & 9 deletions infra/build/functions/trial_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ def _do_test_builds(args, test_image_suffix, end_time, version_tag):
for build_id, build_type in project_builds:
logging.info(' - Build ID: %s', build_id)
logging.info(' - Build Type: %s', build_type)
logging.info(' GCB URL: %s',
build_lib.get_gcb_url(build_id, build_lib.IMAGE_PROJECT))
gcb_url = build_lib.get_gcb_url(build_id, build_lib.IMAGE_PROJECT)
log_url = f'https://oss-fuzz-gcb-logs.storage.googleapis.com/log-{build_id}.txt'
logging.info(' GCB URL: %s', gcb_url)
logging.info(' Log URL: %s', log_url)
logging.info('-----------------------')

wait_result = wait_on_builds(build_ids, credentials, build_lib.IMAGE_PROJECT,
Expand Down Expand Up @@ -544,8 +546,11 @@ def wait_on_builds(build_ids, credentials, cloud_project, end_time,
if status == 'SUCCESS':
successful_builds[project].append(build_id)
else:
logs_url = build_lib.get_gcb_url(build_id, cloud_project)
failed_builds[project].append((status, logs_url, build_type))
gcb_url = build_lib.get_gcb_url(build_id, cloud_project)
log_url = (f'https://oss-fuzz-gcb-logs.storage.googleapis.com/'
f'log-{build_id}.txt')
failed_builds[project].append(
(status, gcb_url, build_type, log_url))

wait_builds[project].remove((build_id, build_type))
if not wait_builds[project]:
Expand All @@ -558,8 +563,10 @@ def wait_on_builds(build_ids, credentials, cloud_project, end_time,

finished_builds_count += 1
status = 'UNKNOWN (too many HttpErrors)'
logs_url = build_lib.get_gcb_url(build_id, cloud_project)
failed_builds[project].append((status, logs_url, build_type))
gcb_url = build_lib.get_gcb_url(build_id, cloud_project)
log_url = (f'https://oss-fuzz-gcb-logs.storage.googleapis.com/'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_logs_url ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

f'log-{build_id}.txt')
failed_builds[project].append((status, gcb_url, build_type, log_url))
wait_builds[project].remove((build_id, build_type))
if not wait_builds[project]:
del wait_builds[project]
Expand All @@ -584,9 +591,11 @@ def wait_on_builds(build_ids, credentials, cloud_project, end_time,
if wait_builds:
for project, project_builds in list(wait_builds.items()):
for build_id, build_type in project_builds:
logs_url = build_lib.get_gcb_url(build_id, cloud_project)
gcb_url = build_lib.get_gcb_url(build_id, cloud_project)
log_url = (f'https://oss-fuzz-gcb-logs.storage.googleapis.com/'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_logs_url ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

f'log-{build_id}.txt')
failed_builds[project].append(
('TIMEOUT (Coordinator)', logs_url, build_type))
('TIMEOUT (Coordinator)', gcb_url, build_type, log_url))

# Final Report
successful_builds_count = sum(
Expand Down Expand Up @@ -634,12 +643,13 @@ def wait_on_builds(build_ids, credentials, cloud_project, end_time,
logging.error('--- FAILED BUILDS ---')
for project, failures in sorted(failed_builds.items()):
logging.error(' - %s:', project)
for status, gcb_url, build_type in failures:
for status, gcb_url, build_type, log_url in failures:
build_id = gcb_url.split('/')[-1].split('?')[0]
logging.error(' - Build ID: %s', build_id)
logging.error(' - Build Type: %s', build_type)
logging.error(' - Status: %s', status)
logging.error(' - GCB URL: %s', gcb_url)
logging.error(' - Log URL: %s', log_url)
logging.info('-----------------------')
return False

Expand Down
Loading