public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Alba Herrerías" <alba@thehoodiefirm.com>
To: openembedded-core@lists.openembedded.org
Cc: engineering@neighbourhood.ie, Ross.Burton@arm.com,
	Alex Feyerke <alex@neighbourhood.ie>
Subject: [PATCH v2] build_perf: don’t bake commit annotations into html, always fetch dynamically.
Date: Thu, 12 Feb 2026 15:20:23 +0000	[thread overview]
Message-ID: <20260212152023.30604-1-albaherreriasdev@gmail.com> (raw)
In-Reply-To: <F8985EDB-2808-485E-954C-685E56F9E526@arm.com>

From: Alex Feyerke <alex@neighbourhood.ie>

Signed-off-by: Alex Feyerke <alex@neighbourhood.ie>
---
 scripts/lib/build_perf/html/report.html | 20 ++++++++++++++++++--
 scripts/oe-build-perf-report            | 13 -------------
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html
index 4b37893cd0..779aa55573 100644
--- a/scripts/lib/build_perf/html/report.html
+++ b/scripts/lib/build_perf/html/report.html
@@ -140,6 +140,11 @@ button:hover {
   max-width: 30em;
   text-wrap: auto;
 }
+
+.annotation-container:not(:empty) {
+  display: inline-block;
+}
+
 @media (prefers-color-scheme: dark) {
   :root {
     --text: #e9e8fa;
@@ -198,8 +203,8 @@ button:hover {
       <tr>
         <th>{{ item.title }}</th>
         {%if key == 'commit' %}
-          <td>{{ poky_link(item.value) }}{%if metadata.commit_annotation and metadata.commit_annotation.value %}<br>{{metadata.commit_annotation.value}}{% endif %}</td>
-          <td>{{ poky_link(item.value_old) }}{%if metadata.commit_annotation and metadata.commit_annotation.value %}<br>{{metadata.commit_annotation.value_old}}{% endif %}</td>
+          <td>{{ poky_link(item.value) }}<span class="annotation-container" data-commit="{{ item.value }}"></span></td>
+          <td>{{ poky_link(item.value_old) }}<span class="annotation-container" data-commit="{{ item.value_old }}"></span></td>
         {% elif key == 'commit_annotation' %}
         {% else %}
           <td>{{ item.value }}</td>
@@ -529,6 +534,17 @@ chartData.forEach(test => {
     drawChart(measurement.chart_elem_start_time_id, startTimeChartConfig)
     drawChart(measurement.chart_elem_commit_count_id, commitCountChartConfig)
   })
+
+  // Splice commit annotations into the table at the top of the page
+  if (commitAnnotations) {
+    document.querySelectorAll("[data-commit]").forEach((item) => {
+      const commitNumber = item.getAttribute("data-commit")
+      const matchingAnnotation = commitAnnotations[commitNumber]
+      if (matchingAnnotation) {
+        item.innerText = matchingAnnotation
+      }
+    })
+  }
 })
 
 
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index f9bdef2712..02da745a6c 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -432,19 +432,6 @@ def print_html_report(data, id_comp, buildstats):
     try:
         response = urlopen(commitAnnotationsURL)
         commitAnnotationsJSON = json.loads(response.read())
-        # Splice the annotations into the metadata
-        commit = metadata.get('commit', {})
-        annotations_out = {}
-
-        if (h := commit.get('value')) in commitAnnotationsJSON:
-            annotations_out['value'] = commitAnnotationsJSON[h]
-
-        if (h := commit.get('value_old')) in commitAnnotationsJSON:
-            annotations_out['value_old'] = commitAnnotationsJSON[h]
-
-        if annotations_out:
-            metadata['commit_annotation'] = annotations_out
-            metadata['commit_annotation']['title'] = "Commit annotation"
 
     except error.URLError as e:
         logging.debug(f"Couldn't find any commit annotations at {commitAnnotationsURL}, reason: {e.reason}.")
-- 
2.40.1



  reply	other threads:[~2026-02-12 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28 12:57 [PATCH 0/1] build_perf: add commit annotations Alba Herrerías
2026-01-28 12:57 ` [PATCH 1/1] " Alba Herrerías
2026-02-06 11:16   ` [OE-core] " Ross Burton
2026-02-12 15:20     ` Alba Herrerías [this message]
2026-02-12 15:45       ` Patchtest results for [PATCH v2] build_perf: don’t bake commit annotations into html, always fetch dynamically patchtest

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260212152023.30604-1-albaherreriasdev@gmail.com \
    --to=alba@thehoodiefirm.com \
    --cc=Ross.Burton@arm.com \
    --cc=alex@neighbourhood.ie \
    --cc=engineering@neighbourhood.ie \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox