Skip to content

Send who requested the build in the metrics payload - #4574

Open
migueldalberto wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:upload-build-requester
Open

migueldalberto wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:upload-build-requester

Conversation

@migueldalberto

Copy link
Copy Markdown
Contributor

Why

The QoR dashboard wants a "my branches / my builds" view (lembas#129). The only identity it has today is the commit's git author, fetched best-effort from GitHub. That misses builds a user started by hand on someone else's commit, and commits enrichment never reaches.

What

Two optional flags on flow/util/uploadMetadata.py:

Flag Payload key Jenkins source
--buildUserEmail build_user_email BUILD_USER_EMAIL — user who started the build by hand
--changeAuthorEmail change_author_email CHANGE_AUTHOR_EMAIL — PR author on PR builds
  • Sent at the top level on every schema version, including the v1 per-design fallback.
  • Blank values are left out.
  • They describe the build, not the payload's shape, so payload_schema_version is unchanged.
  • Without the flags the payload is byte-for-byte what it was.

jenkins-ci passes them from orfsUploadMetadata, probing for --buildUserEmail support like it does for --provenanceFile, so older ORFS branches keep uploading.

@migueldalberto migueldalberto self-assigned this Sep 28, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for capturing build requester information by introducing --buildUserEmail and --changeAuthorEmail command-line arguments to uploadMetadata.py. It includes a helper function resolve_requester to parse and clean these fields, which are then added to the pipeline and per-design payloads. The review feedback suggests two valuable improvements: simplifying the resolve_requester function using a dictionary comprehension for cleaner code, and hoisting the resolve_requester call outside the loop in publish_v1_per_design to prevent redundant executions and improve performance.

Comment thread flow/util/uploadMetadata.py
Comment thread flow/util/uploadMetadata.py Outdated
}
if provenance:
payload.update(provenance)
payload.update(resolve_requester(args))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Calling resolve_requester(args) inside the for d in design_records: loop is redundant and inefficient because its return value does not depend on the individual design record d.

To avoid recreating the dictionary and performing string stripping on every iteration, you should resolve the requester once outside the loop and reuse it.

For example:

def publish_v1_per_design(publisher, topic_path, design_records, args, provenance=None):
    ...
    futures = []
    requester = resolve_requester(args)
    for d in design_records:
        ...
        if provenance:
            payload.update(provenance)
        payload.update(requester)
        payload.update(d["metrics"])

Adds --buildUserEmail and --changeAuthorEmail to uploadMetadata.py, sent
as the top-level build_user_email and change_author_email keys on every
schema version, v1 per-design fallback included. Blank values are left
out. The dashboard stores them on the build and attributes the build to
the user who started it, so a "my branches" view can include builds a
user started by hand.

They describe the build rather than the payload's shape, so they do not
bump payload_schema_version. The backend must already register them as
metadata before this lands: a v1 message carries metrics at its root, and
an older backend would ingest the keys as metrics.

Signed-off-by: Miguel Dalberto Pedro <miguel.pedro@precisioninno.com>
@openroad-ci
openroad-ci force-pushed the upload-build-requester branch from fcd9748 to 23a2a2c Compare September 28, 2026 23:27
@openroad-ci

openroad-ci commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 2a199b9 · Jenkins build #2 · Baseline: build · View build on dashboard

62 design(s) checked — 9 with regression(s), 0 without a comparable baseline.

❌ asap7/aes-mbff base — 2 failing metric(s)
Metric target base delta limit band
constraints__clocks__count 1 2 -50.0% 2 Direct 0%
globalroute__timing__setup__tns -269.882 -2.43366 10989.552361463804% -78.43366 PeriodPadding 20%
❌ asap7/ibex base — 4 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -25560.4 0 — -200.0 PeriodPadding 20%
finish__timing__setup__tns -22264.4 0 — -200.0 PeriodPadding 20%
globalroute__timing__setup__tns -42980.7 -0.908162 4732612.886026942% -200.908162 PeriodPadding 20%
globalroute__timing__setup__ws -65.1011 -0.796807 8070.2469983320925% -50.796807 PeriodPadding 5.0%
❌ asap7/mock-cpu base — 6 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -252.167 0 — -66.6 PeriodPadding 20%
cts__timing__setup__ws -33.5438 2.69612 -1344.1508538195628% -16.65 PeriodPadding 5.0%
finish__timing__setup__tns -269.7 0 — -66.6 PeriodPadding 20%
finish__timing__setup__ws -33.658 12.8525 -361.87901186539585% -16.65 PeriodPadding 5.0%
globalroute__timing__setup__tns -348.256 0 — -66.6 PeriodPadding 20%
globalroute__timing__setup__ws -41.411 2.35761 -1856.4822001942646% -16.65 PeriodPadding 5.0%
❌ gt2n/gcd base — 7 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -786.696 0 — -100.0 PeriodPadding 20%
cts__timing__setup__ws -62.9036 158.356 -139.72290282654274% -25.0 PeriodPadding 5%
finish__timing__setup__tns -1187.76 0 — -100.0 PeriodPadding 20%
finish__timing__setup__ws -68.8317 150.061 -145.86914654707087% -25.0 PeriodPadding 5%
globalroute__timing__setup__tns -1187.75 0 — -100.0 PeriodPadding 20%
globalroute__timing__setup__ws -68.8299 150.061 -145.8679470348725% -25.0 PeriodPadding 5%
placeopt__design__instance__area 21.5127 18.5432 16.013956598645326% 21.32468 Padding 15%
❌ gt2n/jpeg base — 4 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -15681.9 0 — -200.0 PeriodPadding 20%
cts__timing__setup__ws -60.0663 131.953 -145.52098095534015% -50.0 PeriodPadding 5%
finish__timing__setup__tns -4650.05 0 — -200.0 PeriodPadding 20%
globalroute__timing__setup__tns -4617.66 0 — -200.0 PeriodPadding 20%
❌ ihp-sg13g2/gcd base — 10 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -6.49389 0 — -0.56 PeriodPadding 20%
cts__timing__setup__ws -0.215104 0.458359 -146.92915378556984% -0.14 PeriodPadding 5.0%
detailedroute__route__wirelength 12010 9892 21.411241407197735% 11375.8 Padding 15%
finish__design__instance__area 6686.06 5189.18 28.846176081770146% 5967.557 Padding 15%
finish__timing__setup__tns -6.98143 0 — -0.56 PeriodPadding 20%
finish__timing__setup__ws -0.239075 0.473577 -150.482814832646% -0.14 PeriodPadding 5.0%
globalroute__timing__setup__tns -12.1207 0 — -0.56 PeriodPadding 20%
globalroute__timing__setup__ws -0.397871 0.220928 -280.09079881228274% -0.14 PeriodPadding 5.0%
placeopt__design__instance__area 5858.7 4944.24 18.49546138536964% 5685.876 Padding 15%
placeopt__design__instance__count__stdcell 510 400 27.5% 460.0 Padding 15%
❌ ihp-sg13g2/jpeg base — 5 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -21.4754 0 — -1.6 PeriodPadding 20%
cts__timing__setup__ws -0.542417 0.935878 -157.95808855427737% -0.4 PeriodPadding 5.0%
finish__timing__setup__tns -3.82476 0 — -1.6 PeriodPadding 20%
globalroute__timing__setup__tns -48.242 0 — -1.6 PeriodPadding 20%
placeopt__design__instance__count__stdcell 88817 76451 16.17506638238872% 87918.65 Padding 15%
❌ sky130hd/ibex base — 7 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -403.299 0 — -2.0 PeriodPadding 20%
cts__timing__setup__ws -0.675496 0.00169686 -39908.58762655729% -0.5 PeriodPadding 5.0%
finish__design__instance__area 179252 154711 15.86247907388615% 177917.65 Padding 15%
finish__timing__setup__tns -386.114 -1.92918 19914.410267574825% -3.92918 PeriodPadding 20%
finish__timing__setup__ws -0.690877 -0.106836 546.6705979257928% -0.606836 PeriodPadding 5.0%
globalroute__timing__setup__tns -586.742 -0.091509 641085.0200526724% -2.091509 PeriodPadding 20%
globalroute__timing__setup__ws -0.873536 -0.0305391 2760.385538539119% -0.5305391 PeriodPadding 5.0%
❌ sky130hs/ibex base — 2 failing metric(s)
Metric target base delta limit band
finish__timing__setup__tns -544.939 -290.61 87.51557069612196% -348.732 PeriodPadding 20%
globalroute__timing__setup__tns -1005.43 -586.738 71.35927790598188% -704.0856 PeriodPadding 20%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants