diff mbox series

[yocto-autobuilder-helper] send_qa_email: add git-describe output if possible

Message ID 20260126085252.178615-2-yoann.congal@smile.fr
State New
Headers show
Series [yocto-autobuilder-helper] send_qa_email: add git-describe output if possible | expand

Commit Message

Yoann Congal Jan. 26, 2026, 8:52 a.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

This would allow to quickly identify commits that are not on the right
branch.

Partial example of output on my whinlatter-nut branch:
  bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30 (yocto-5.3-3-g74f8a927c)
  meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07 (yocto-5.3-1-g6973ca6)
  openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a (yocto-5.3-73-gb4e7819b99)
(It shows that every commits are correctly after yocto-5.3)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 scripts/send_qa_email.py | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Mikko Rapeli Jan. 26, 2026, 9:24 a.m. UTC | #1
Hi,

On Mon, Jan 26, 2026 at 09:52:53AM +0100, Yoann Congal via lists.yoctoproject.org wrote:
> From: Yoann Congal <yoann.congal@smile.fr>
> 
> This would allow to quickly identify commits that are not on the right
> branch.
> 
> Partial example of output on my whinlatter-nut branch:
>   bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30 (yocto-5.3-3-g74f8a927c)
>   meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07 (yocto-5.3-1-g6973ca6)
>   openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a (yocto-5.3-73-gb4e7819b99)
> (It shows that every commits are correctly after yocto-5.3)

The output may or may not work, and may actually confuse users:

bitbake$ git describe --match yocto-* origin/master
yocto-5.3-52-gcdd79c1768ac
core$ git describe --match yocto-* origin/master
yocto-5.1-4541-g6c31c2a73185
meta-yocto$ git describe --match yocto-* origin/master
yocto-5.0.10-40-gc23c19e0b300

and I don't seem to be able to find out in a few minutes which branch
of bitbake is used with core and meta-yocto whinlatter branches
since the branch is not called "whinlatter" but bitbake version.
Oh bitbake default-registry/configurations/oe-nodistro-whinlatter.conf.json
has it as "2.16" but openembedded-core doesn't seem to know which bitbake
version is correct for whinlatter.

I hope this works for "whinlatter" and other releases in the future
but the tags are a bit messy stil.

Cheers,

-Mikko

> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> ---
>  scripts/send_qa_email.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
> index e3de4b5..8d24af5 100755
> --- a/scripts/send_qa_email.py
> +++ b/scripts/send_qa_email.py
> @@ -265,6 +265,15 @@ def send_qa_email():
>          # Need the finalised revisions (not 'HEAD')
>          targetrepodir = "%s/%s" % (repodir, repo)
>          revision = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=targetrepodir).decode('utf-8').strip()
> +
> +        # Add git describe output if possible
> +        try:
> +            description = subprocess.check_output(["git", "describe", "--match", "yocto-*", "HEAD"],
> +                                                  cwd=targetrepodir, stderr=subprocess.DEVNULL).decode('utf-8').strip()
> +            revision += " (%s)" % description
> +        except subprocess.CalledProcessError:
> +            pass # ignore any error
> +
>          buildhashes += "%s: %s\n" % (repo, revision)
>  
>      web_root = utils.getconfig('WEBPUBLISH_DIR', ourconfig)
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#3077): https://lists.yoctoproject.org/g/yocto-patches/message/3077
> Mute This Topic: https://lists.yoctoproject.org/mt/117465359/7159507
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13178654/7159507/914336139/xyzzy [mikko.rapeli@linaro.org]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
>
Yoann Congal Jan. 26, 2026, 2:19 p.m. UTC | #2
Le lun. 26 janv. 2026 à 10:25, Mikko Rapeli <mikko.rapeli@linaro.org> a
écrit :

> Hi,
>
> On Mon, Jan 26, 2026 at 09:52:53AM +0100, Yoann Congal via
> lists.yoctoproject.org wrote:
> > From: Yoann Congal <yoann.congal@smile.fr>
> >
> > This would allow to quickly identify commits that are not on the right
> > branch.
> >
> > Partial example of output on my whinlatter-nut branch:
> >   bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30
> (yocto-5.3-3-g74f8a927c)
> >   meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07
> (yocto-5.3-1-g6973ca6)
> >   openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a
> (yocto-5.3-73-gb4e7819b99)
> > (It shows that every commits are correctly after yocto-5.3)
>
> The output may or may not work, and may actually confuse users:
>
> bitbake$ git describe --match yocto-* origin/master
> yocto-5.3-52-gcdd79c1768ac
> core$ git describe --match yocto-* origin/master
> yocto-5.1-4541-g6c31c2a73185
> meta-yocto$ git describe --match yocto-* origin/master
> yocto-5.0.10-40-gc23c19e0b300
>
> and I don't seem to be able to find out in a few minutes which branch
> of bitbake is used with core and meta-yocto whinlatter branches
> since the branch is not called "whinlatter" but bitbake version.
> Oh bitbake default-registry/configurations/oe-nodistro-whinlatter.conf.json
> has it as "2.16" but openembedded-core doesn't seem to know which bitbake
> version is correct for whinlatter.
>
> I hope this works for "whinlatter" and other releases in the future
> but the tags are a bit messy stil.
>

Yes, agreed. That works well only for stable branches after the first
release.
Maybe we can only take this patch for those branches?


> Cheers,
>
> -Mikko
>
> > Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> > ---
> >  scripts/send_qa_email.py | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
> > index e3de4b5..8d24af5 100755
> > --- a/scripts/send_qa_email.py
> > +++ b/scripts/send_qa_email.py
> > @@ -265,6 +265,15 @@ def send_qa_email():
> >          # Need the finalised revisions (not 'HEAD')
> >          targetrepodir = "%s/%s" % (repodir, repo)
> >          revision = subprocess.check_output(["git", "rev-parse",
> "HEAD"], cwd=targetrepodir).decode('utf-8').strip()
> > +
> > +        # Add git describe output if possible
> > +        try:
> > +            description = subprocess.check_output(["git", "describe",
> "--match", "yocto-*", "HEAD"],
> > +                                                  cwd=targetrepodir,
> stderr=subprocess.DEVNULL).decode('utf-8').strip()
> > +            revision += " (%s)" % description
> > +        except subprocess.CalledProcessError:
> > +            pass # ignore any error
> > +
> >          buildhashes += "%s: %s\n" % (repo, revision)
> >
> >      web_root = utils.getconfig('WEBPUBLISH_DIR', ourconfig)
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#3077):
> https://lists.yoctoproject.org/g/yocto-patches/message/3077
> > Mute This Topic: https://lists.yoctoproject.org/mt/117465359/7159507
> > Group Owner: yocto-patches+owner@lists.yoctoproject.org
> > Unsubscribe:
> https://lists.yoctoproject.org/g/yocto-patches/leave/13178654/7159507/914336139/xyzzy
> [mikko.rapeli@linaro.org]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
> >
>
Yoann Congal Jan. 27, 2026, 9:40 a.m. UTC | #3
Le lun. 26 janv. 2026 à 15:19, Yoann Congal <yoann.congal@smile.fr> a
écrit :

>
>
> Le lun. 26 janv. 2026 à 10:25, Mikko Rapeli <mikko.rapeli@linaro.org> a
> écrit :
>
>> Hi,
>>
>> On Mon, Jan 26, 2026 at 09:52:53AM +0100, Yoann Congal via
>> lists.yoctoproject.org wrote:
>> > From: Yoann Congal <yoann.congal@smile.fr>
>> >
>> > This would allow to quickly identify commits that are not on the right
>> > branch.
>> >
>> > Partial example of output on my whinlatter-nut branch:
>> >   bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30
>> (yocto-5.3-3-g74f8a927c)
>> >   meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07
>> (yocto-5.3-1-g6973ca6)
>> >   openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a
>> (yocto-5.3-73-gb4e7819b99)
>> > (It shows that every commits are correctly after yocto-5.3)
>>
>> The output may or may not work, and may actually confuse users:
>>
>> bitbake$ git describe --match yocto-* origin/master
>> yocto-5.3-52-gcdd79c1768ac
>> core$ git describe --match yocto-* origin/master
>> yocto-5.1-4541-g6c31c2a73185
>> meta-yocto$ git describe --match yocto-* origin/master
>> yocto-5.0.10-40-gc23c19e0b300
>>
>> and I don't seem to be able to find out in a few minutes which branch
>> of bitbake is used with core and meta-yocto whinlatter branches
>> since the branch is not called "whinlatter" but bitbake version.
>> Oh bitbake
>> default-registry/configurations/oe-nodistro-whinlatter.conf.json
>> has it as "2.16" but openembedded-core doesn't seem to know which bitbake
>> version is correct for whinlatter.
>>
>> I hope this works for "whinlatter" and other releases in the future
>> but the tags are a bit messy stil.
>>
>
> Yes, agreed. That works well only for stable branches after the first
> release.
> Maybe we can only take this patch for those branches?
>

This is something I can check locally before greenlighting a build for QA,
just tried it for 4.0.33-rc3.
=> We can drop this patch.


>
>> Cheers,
>>
>> -Mikko
>>
>> > Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
>> > ---
>> >  scripts/send_qa_email.py | 9 +++++++++
>> >  1 file changed, 9 insertions(+)
>> >
>> > diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
>> > index e3de4b5..8d24af5 100755
>> > --- a/scripts/send_qa_email.py
>> > +++ b/scripts/send_qa_email.py
>> > @@ -265,6 +265,15 @@ def send_qa_email():
>> >          # Need the finalised revisions (not 'HEAD')
>> >          targetrepodir = "%s/%s" % (repodir, repo)
>> >          revision = subprocess.check_output(["git", "rev-parse",
>> "HEAD"], cwd=targetrepodir).decode('utf-8').strip()
>> > +
>> > +        # Add git describe output if possible
>> > +        try:
>> > +            description = subprocess.check_output(["git", "describe",
>> "--match", "yocto-*", "HEAD"],
>> > +                                                  cwd=targetrepodir,
>> stderr=subprocess.DEVNULL).decode('utf-8').strip()
>> > +            revision += " (%s)" % description
>> > +        except subprocess.CalledProcessError:
>> > +            pass # ignore any error
>> > +
>> >          buildhashes += "%s: %s\n" % (repo, revision)
>> >
>> >      web_root = utils.getconfig('WEBPUBLISH_DIR', ourconfig)
>> >
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#3077):
>> https://lists.yoctoproject.org/g/yocto-patches/message/3077
>> > Mute This Topic: https://lists.yoctoproject.org/mt/117465359/7159507
>> > Group Owner: yocto-patches+owner@lists.yoctoproject.org
>> > Unsubscribe:
>> https://lists.yoctoproject.org/g/yocto-patches/leave/13178654/7159507/914336139/xyzzy
>> [mikko.rapeli@linaro.org]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >
>> >
>>
>
>
> --
> Yoann Congal
> Smile ECS
>
Mikko Rapeli Jan. 27, 2026, 9:45 a.m. UTC | #4
Hi,

On Tue, Jan 27, 2026 at 10:40:10AM +0100, Yoann Congal wrote:
> Le lun. 26 janv. 2026 � 15:19, Yoann Congal <yoann.congal@smile.fr> a
> �crit :
> 
> >
> >
> > Le lun. 26 janv. 2026 � 10:25, Mikko Rapeli <mikko.rapeli@linaro.org> a
> > �crit :
> >
> >> Hi,
> >>
> >> On Mon, Jan 26, 2026 at 09:52:53AM +0100, Yoann Congal via
> >> lists.yoctoproject.org wrote:
> >> > From: Yoann Congal <yoann.congal@smile.fr>
> >> >
> >> > This would allow to quickly identify commits that are not on the right
> >> > branch.
> >> >
> >> > Partial example of output on my whinlatter-nut branch:
> >> >   bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30
> >> (yocto-5.3-3-g74f8a927c)
> >> >   meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07
> >> (yocto-5.3-1-g6973ca6)
> >> >   openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a
> >> (yocto-5.3-73-gb4e7819b99)
> >> > (It shows that every commits are correctly after yocto-5.3)
> >>
> >> The output may or may not work, and may actually confuse users:
> >>
> >> bitbake$ git describe --match yocto-* origin/master
> >> yocto-5.3-52-gcdd79c1768ac
> >> core$ git describe --match yocto-* origin/master
> >> yocto-5.1-4541-g6c31c2a73185
> >> meta-yocto$ git describe --match yocto-* origin/master
> >> yocto-5.0.10-40-gc23c19e0b300
> >>
> >> and I don't seem to be able to find out in a few minutes which branch
> >> of bitbake is used with core and meta-yocto whinlatter branches
> >> since the branch is not called "whinlatter" but bitbake version.
> >> Oh bitbake
> >> default-registry/configurations/oe-nodistro-whinlatter.conf.json
> >> has it as "2.16" but openembedded-core doesn't seem to know which bitbake
> >> version is correct for whinlatter.
> >>
> >> I hope this works for "whinlatter" and other releases in the future
> >> but the tags are a bit messy stil.
> >>
> >
> > Yes, agreed. That works well only for stable branches after the first
> > release.
> > Maybe we can only take this patch for those branches?
> >
> 
> This is something I can check locally before greenlighting a build for QA,
> just tried it for 4.0.33-rc3.
> => We can drop this patch.

Is there any possibility to fix this for yocto 6.0, for example that yocto-6.x.y tags
would be aligned on master branches too?

Cheers,

-Mikko
Yoann Congal Jan. 27, 2026, 10:46 a.m. UTC | #5
Le mar. 27 janv. 2026 à 10:45, Mikko Rapeli <mikko.rapeli@linaro.org> a
écrit :

> Hi,
>
> On Tue, Jan 27, 2026 at 10:40:10AM +0100, Yoann Congal wrote:
> > Le lun. 26 janv. 2026 à 15:19, Yoann Congal <yoann.congal@smile.fr> a
> > écrit :
> >
> > >
> > >
> > > Le lun. 26 janv. 2026 à 10:25, Mikko Rapeli <mikko.rapeli@linaro.org>
> a
> > > écrit :
> > >
> > >> Hi,
> > >>
> > >> On Mon, Jan 26, 2026 at 09:52:53AM +0100, Yoann Congal via
> > >> lists.yoctoproject.org wrote:
> > >> > From: Yoann Congal <yoann.congal@smile.fr>
> > >> >
> > >> > This would allow to quickly identify commits that are not on the
> right
> > >> > branch.
> > >> >
> > >> > Partial example of output on my whinlatter-nut branch:
> > >> >   bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30
> > >> (yocto-5.3-3-g74f8a927c)
> > >> >   meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07
> > >> (yocto-5.3-1-g6973ca6)
> > >> >   openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a
> > >> (yocto-5.3-73-gb4e7819b99)
> > >> > (It shows that every commits are correctly after yocto-5.3)
> > >>
> > >> The output may or may not work, and may actually confuse users:
> > >>
> > >> bitbake$ git describe --match yocto-* origin/master
> > >> yocto-5.3-52-gcdd79c1768ac
> > >> core$ git describe --match yocto-* origin/master
> > >> yocto-5.1-4541-g6c31c2a73185
> > >> meta-yocto$ git describe --match yocto-* origin/master
> > >> yocto-5.0.10-40-gc23c19e0b300
> > >>
> > >> and I don't seem to be able to find out in a few minutes which branch
> > >> of bitbake is used with core and meta-yocto whinlatter branches
> > >> since the branch is not called "whinlatter" but bitbake version.
> > >> Oh bitbake
> > >> default-registry/configurations/oe-nodistro-whinlatter.conf.json
> > >> has it as "2.16" but openembedded-core doesn't seem to know which
> bitbake
> > >> version is correct for whinlatter.
> > >>
> > >> I hope this works for "whinlatter" and other releases in the future
> > >> but the tags are a bit messy stil.
> > >>
> > >
> > > Yes, agreed. That works well only for stable branches after the first
> > > release.
> > > Maybe we can only take this patch for those branches?
> > >
> >
> > This is something I can check locally before greenlighting a build for
> QA,
> > just tried it for 4.0.33-rc3.
> > => We can drop this patch.
>
> Is there any possibility to fix this for yocto 6.0, for example that
> yocto-6.x.y tags
> would be aligned on master branches too?
>

I guess not : the releases/tags are usually done after the stable branch
separates from master => the 6.0 tag will most likely *not* be on master.
(Or have I misunderstood your question?)


> Cheers,
>
> -Mikko
>
Mikko Rapeli Jan. 27, 2026, 10:59 a.m. UTC | #6
Hi,

On Tue, Jan 27, 2026 at 11:46:03AM +0100, Yoann Congal wrote:
> Le mar. 27 janv. 2026 � 10:45, Mikko Rapeli <mikko.rapeli@linaro.org> a
> �crit :
> > On Tue, Jan 27, 2026 at 10:40:10AM +0100, Yoann Congal wrote:
> > > Le lun. 26 janv. 2026 � 15:19, Yoann Congal <yoann.congal@smile.fr> a
> > > �crit :
> > >
> > > >
> > > >
> > > > Le lun. 26 janv. 2026 � 10:25, Mikko Rapeli <mikko.rapeli@linaro.org>
> > a
> > > > �crit :
> > > >> On Mon, Jan 26, 2026 at 09:52:53AM +0100, Yoann Congal via
> > > >> lists.yoctoproject.org wrote:
> > > >> > From: Yoann Congal <yoann.congal@smile.fr>
> > > >> >
> > > >> > This would allow to quickly identify commits that are not on the
> > right
> > > >> > branch.
> > > >> >
> > > >> > Partial example of output on my whinlatter-nut branch:
> > > >> >   bitbake: 74f8a927ca6a20342072e5579182aea917b6dc30
> > > >> (yocto-5.3-3-g74f8a927c)
> > > >> >   meta-yocto: 6973ca663aaa9c3ab517ee960ab7985a5bf54c07
> > > >> (yocto-5.3-1-g6973ca6)
> > > >> >   openembedded-core: b4e7819b99d9c1a8995eba87e6f466fd8c77e14a
> > > >> (yocto-5.3-73-gb4e7819b99)
> > > >> > (It shows that every commits are correctly after yocto-5.3)
> > > >>
> > > >> The output may or may not work, and may actually confuse users:
> > > >>
> > > >> bitbake$ git describe --match yocto-* origin/master
> > > >> yocto-5.3-52-gcdd79c1768ac
> > > >> core$ git describe --match yocto-* origin/master
> > > >> yocto-5.1-4541-g6c31c2a73185
> > > >> meta-yocto$ git describe --match yocto-* origin/master
> > > >> yocto-5.0.10-40-gc23c19e0b300
> > > >>
> > > >> and I don't seem to be able to find out in a few minutes which branch
> > > >> of bitbake is used with core and meta-yocto whinlatter branches
> > > >> since the branch is not called "whinlatter" but bitbake version.
> > > >> Oh bitbake
> > > >> default-registry/configurations/oe-nodistro-whinlatter.conf.json
> > > >> has it as "2.16" but openembedded-core doesn't seem to know which
> > bitbake
> > > >> version is correct for whinlatter.
> > > >>
> > > >> I hope this works for "whinlatter" and other releases in the future
> > > >> but the tags are a bit messy stil.
> > > >>
> > > >
> > > > Yes, agreed. That works well only for stable branches after the first
> > > > release.
> > > > Maybe we can only take this patch for those branches?
> > > >
> > >
> > > This is something I can check locally before greenlighting a build for
> > QA,
> > > just tried it for 4.0.33-rc3.
> > > => We can drop this patch.
> >
> > Is there any possibility to fix this for yocto 6.0, for example that
> > yocto-6.x.y tags
> > would be aligned on master branches too?
> >
> 
> I guess not : the releases/tags are usually done after the stable branch
> separates from master => the 6.0 tag will most likely *not* be on master.
> (Or have I misunderstood your question?)

Release tags yes, but pre-release RC tags?

They could be applied to all repo master branches. Now that poky is
gone I think this could be fixed.

Cheers,

-Mikko
diff mbox series

Patch

diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index e3de4b5..8d24af5 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -265,6 +265,15 @@  def send_qa_email():
         # Need the finalised revisions (not 'HEAD')
         targetrepodir = "%s/%s" % (repodir, repo)
         revision = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=targetrepodir).decode('utf-8').strip()
+
+        # Add git describe output if possible
+        try:
+            description = subprocess.check_output(["git", "describe", "--match", "yocto-*", "HEAD"],
+                                                  cwd=targetrepodir, stderr=subprocess.DEVNULL).decode('utf-8').strip()
+            revision += " (%s)" % description
+        except subprocess.CalledProcessError:
+            pass # ignore any error
+
         buildhashes += "%s: %s\n" % (repo, revision)
 
     web_root = utils.getconfig('WEBPUBLISH_DIR', ourconfig)