All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: "Richard Purdie" <richard.purdie@linuxfoundation.org>,
	<yocto-patches@lists.yoctoproject.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [yocto-patches] [PATCH yocto-autobuilder2 2/3] yocto_console_view: Keep known revision mappings
Date: Wed, 12 Feb 2025 09:14:32 +0100	[thread overview]
Message-ID: <D7QBFLDY4P2O.16N4AMK1DM3F5@bootlin.com> (raw)
In-Reply-To: <410d2fa497ea2b0bcf194559ad6eba60799a8928.camel@linuxfoundation.org>

On Wed Feb 12, 2025 at 1:01 AM CET, Richard Purdie wrote:
> On Tue, 2025-02-11 at 15:48 +0100, Mathieu Dubois-Briand via lists.yoctoproject.org wrote:
> > The yp_build_revision property disappears from the build instance once
> > the build is done. There is no reason for its value to change, so keep
> > the last seen value in revision mapping. This will prevent finished
> > builds to jump back to "Unresolved Revision".
> > 
> > Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> > ---
> >  .../src/views/ConsoleView/ConsoleView.tsx          | 25 +++-------------------
> >  1 file changed, 3 insertions(+), 22 deletions(-)
> > 
> > diff --git a/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx b/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx
> > index 973c26424233..93c51b340b17 100644
> > --- a/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx
> > +++ b/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx
> > @@ -208,6 +208,9 @@ function selectChangeForBuild(build: Build, buildset: Buildset,
> >    return fakeChange
> >  }
> >  
> > +const revMapping = new Map<int, string>();
> > +const branchMapping = new Map<int, string>();
> > +
> >  export const ConsoleView = observer(() => {
> >    const accessor = useDataAccessor([]);
> >  
> > @@ -263,8 +266,6 @@ export const ConsoleView = observer(() => {
> >      builderIdsWithBuilds.add(build.builderid);
> >    }
> >  
> > -  const revMapping = new Map<int, string>();
> > -  const branchMapping = new Map<int, string>();
> >    for (const build of buildsQuery.array) {
> >      let change = false;
> >      let {
> > @@ -278,26 +279,6 @@ export const ConsoleView = observer(() => {
> >        branchMapping[build.buildid] = build.properties.yp_build_branch[0];
> >        change = true;
> >      }
> > -    if ((!revMapping[buildid] || !branchMapping[buildid]) && !build.complete_at) {
> > -      build.getProperties().onChange = properties => {
> > -        change = false;
> > -        buildid = properties.endpoint.split('/')[1];
> > -        if (!revMapping[buildid]) {
> > -          const rev = getBuildProperty(properties[0], 'yp_build_revision');
> > -          if (rev != null) {
> > -            revMapping[buildid] = rev;
> > -            change = true;
> > -          }
> > -        }
> > -        if (!branchMapping[buildid]) {
> > -          const branch = getBuildProperty(properties[0], 'yp_build_branch');
> > -          if (branch != null) {
> > -            branchMapping[buildid] = branch;
> > -            change = true;
> > -          }
> > -        }
> > -      };
> > -    }
> >    }
> >  
> >    function getBuildProperty(properties, property) {
>
> When you start a build, it gets "Unresolved Revision" and I think by
> removing this code, it remains there even when the revision becomes
> known. The code would have allowed it to move to the correct line in
> the display. This therefore may fix one issue at the expense of
> another...
>

The issue is this part of the code actually did nothing. I believe I
imported this from the previous version of the plugin but never really
tested it.

I've been trying a few variations, yesterday but it looks like we never
get the property update.

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2025-02-12  8:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 14:48 [PATCH yocto-autobuilder2 0/3] yocto_console_view: Fix various small issues after migration Mathieu Dubois-Briand
2025-02-11 14:48 ` [PATCH yocto-autobuilder2 1/3] yocto_console_view: Group similar builder builds Mathieu Dubois-Briand
2025-02-11 14:48 ` [PATCH yocto-autobuilder2 2/3] yocto_console_view: Keep known revision mappings Mathieu Dubois-Briand
2025-02-12  0:01   ` [yocto-patches] " Richard Purdie
2025-02-12  8:14     ` Mathieu Dubois-Briand [this message]
2025-02-12 10:08       ` Richard Purdie
2025-02-11 14:48 ` [PATCH yocto-autobuilder2 3/3] yocto_console_view: Fix output link on valkyrie Mathieu Dubois-Briand

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=D7QBFLDY4P2O.16N4AMK1DM3F5@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yocto-patches@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.