public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Moessbauer, Felix" <felix.moessbauer@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>,
	"Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	Baurzhan Ismagulov <ibr@ilbers.de>,
	"henning.schild@siemens.com" <henning.schild@siemens.com>
Subject: RE: [PATCH v4 0/2] Improve handling of ISAR_RELEASE_CMD
Date: Fri, 3 Dec 2021 09:51:23 +0000	[thread overview]
Message-ID: <AM9PR10MB48698D815CA80AEEDBA7A3F9896A9@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <7da5c746-3b80-e08b-441d-d46b627a046c@ilbers.de>

> From: Anton Mikanovich <amikan@ilbers.de>
> Sent: Thursday, December 2, 2021 3:55 PM
> To: Moessbauer, Felix (T RDA IOT SES-DE) <felix.moessbauer@siemens.com>;
> Schild, Henning (T RDA IOT SES-DE) <henning.schild@siemens.com>
> Cc: Schmidt, Adriaan (T RDA IOT SES-DE) <adriaan.schmidt@siemens.com>; isar-
> users@googlegroups.com; Baurzhan Ismagulov <ibr@ilbers.de>
> Subject: Re: [PATCH v4 0/2] Improve handling of ISAR_RELEASE_CMD
> 
> 30.11.2021 13:03, Moessbauer, Felix wrote:
> > That is what we expect. However something changes the git state during a
> build.
> > The state must ONLY be changed between builds (two bitbake invocations).
> > In case multiple tests are run in parallel in the same build-tree, this will break.
> > Even if the patches have not been fully tested in the CI, that's what we use in
> our daily business (it works).
> >
> > Unfortunately I have a really hard time to run the CI in the Siemens
> environment, as it often fails due to proxy issues or network timeouts.
> > Also running just the repro target itself does not work due to other issues.
> > I tried with: avocado run
> > testsuite/build_test/build_test.py:RebuildTest.test_rebuild
> >
> > [stdout] E: Unable to find a source package for
> > [stdlog] 2021-11-30 10:58:04,196 cibuilder        L0100 ERROR| E: Unable to
> find a source package for
> > [stdout] + bb_exit_handler
> > [stdlog] 2021-11-30 10:58:04,196 cibuilder        L0100 ERROR| +
> bb_exit_handler
> >
> > Anyways, if there are more issues to be ruled out for this patch series, I
> actually prefer to merge the SState series first.
> > Currently, a lot of patches are waiting for SState, as Henning mentioned.
> >
> > Felix
> 
> Ok, there are easy steps to reproduce the issue with kas:
> 
> $ cat isar.yml
> header:
>    version: 10
> 
> distro: debian-bullseye
> machine: qemuamd64
> target: mc:qemuamd64-bullseye:isar-image-base
> repos:
>    isar:
>      url: "git@github.com:/ilbers/isar"
>      refspec: "4dc41fba8d664fbc00ec56640fec066c9e57b19d"
>      layers:
>        meta:
>        meta-isar:
> 
> bblayers_conf_header:
>    standard: |
>      BBPATH = "${TOPDIR}"
>      BBFILES ?= ""
> 
> $ time ~/kas/kas-docker --isar build isar.yml $ echo -e "do_fetch_append()
> {\n\n}" >> isar/meta/classes/dpkg-base.bbclass
> $ time ~/kas/kas-docker --isar build isar.yml
> 
> On the first obtain of IMAGE_BUILD_ID it gets correct 'dirty' value, but compare
> it with old hash from the previous build at fails.

Ok thanks for the reproducer. By that I was able to navigate bitbake into the error.

Unfortunately this problem is not easy to solve, as it is simply not allowed to modify the metadata on the fly.
By that, we cannot use an anonymous python function to taint a task depending on a condition.
If we want up-to-date versioning information, we would have to use a "nostamp" task (but that makes rootfs caching irrelevant)...

A better solution would be to reorder the tasks to make sure that the sstate caches the rootfs without /etc/os-release information.
This at least restores the previous behavior (re-building without change does not re-run ISAR_RELEASE_CMD).
Without these changes, probably a lot of CI generated images that use a persistent sstate will end up with outdated version information.
@Adriaan: What's your opinion?

> 
> Even if the patchset is working for upstream it should not introduce such a
> regression.

Agreed!

Patch 2 of this series should be fine (just a bugfix).

Felix

> 
> --
> Anton Mikanovich
> Promwad Ltd.
> External service provider of ilbers GmbH Maria-Merian-Str. 8
> 85521 Ottobrunn, Germany
> +49 (89) 122 67 24-0
> Commercial register Munich, HRB 214197
> General Manager: Baurzhan Ismagulov


  reply	other threads:[~2021-12-03  9:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 11:05 Felix Moessbauer
2021-11-04 11:05 ` [PATCH v4 1/2] always invoke ISAR_RELEASE_CMD to invalidate downstream tasks on change Felix Moessbauer
2021-11-04 11:05 ` [PATCH v4 2/2] Ensure generation of /etc/os-release is idempotent Felix Moessbauer
2021-11-04 13:12 ` [PATCH v4 0/2] Improve handling of ISAR_RELEASE_CMD Henning Schild
2021-11-16 18:09 ` Anton Mikanovich
2021-11-17 10:45   ` Moessbauer, Felix
2021-11-17 13:05     ` Anton Mikanovich
2021-11-17 15:57       ` Moessbauer, Felix
2021-11-17 16:39         ` Baurzhan Ismagulov
2021-11-22 15:28         ` Anton Mikanovich
2021-11-24  9:30           ` Schmidt, Adriaan
2021-11-24 10:15             ` Moessbauer, Felix
2021-11-24 11:25               ` Jan Kiszka
2021-11-24 11:54                 ` Anton Mikanovich
2021-11-24 12:11               ` Henning Schild
2021-11-29  9:09                 ` Anton Mikanovich
2021-11-29  9:50                   ` Henning Schild
2021-11-29  9:55                     ` Anton Mikanovich
2021-11-29 13:04                   ` Anton Mikanovich
2021-11-29 13:18                     ` Henning Schild
2021-11-29 14:20                       ` Anton Mikanovich
2021-11-30 10:03                         ` Moessbauer, Felix
2021-12-01 10:39                           ` Anton Mikanovich
2021-12-02 14:55                           ` Anton Mikanovich
2021-12-03  9:51                             ` Moessbauer, Felix [this message]
2021-11-24 11:53             ` Anton Mikanovich
2021-11-24 12:35             ` Henning Schild
2021-11-24 12:52               ` Anton Mikanovich
2021-11-17 16:54       ` Henning Schild
2021-11-18  8:36         ` Moessbauer, Felix

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=AM9PR10MB48698D815CA80AEEDBA7A3F9896A9@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM \
    --to=felix.moessbauer@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=henning.schild@siemens.com \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /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