<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15933</bug_id>
          
          <creation_ts>2025-07-14 19:05:18 +0000</creation_ts>
          <short_desc>Improving logs in CI builds</short_desc>
          <delta_ts>2025-07-31 14:53:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marc Ferland">marc.ferland</reporter>
          <assigned_to name="Marc Ferland">marc.ferland</assigned_to>
          <cc>JPEWhacker</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102459</commentid>
    <comment_count>0</comment_count>
    <who name="Marc Ferland">marc.ferland</who>
    <bug_when>2025-07-14 19:05:18 +0000</bug_when>
    <thetext>Hi,

I&apos;m currently working with the scarthgap release and running Yocto builds in a GitLab CI environment. One issue I&apos;m encountering is that the runners occasionally truncate the build output logs when they exceed a certain size (around 4 MB, from what I can tell). Note: I&apos;m talking about the &quot;realtime&quot; output log viewer from the gitlab web interface.

To mitigate this, I&apos;ve started using the --quiet option with bitbake, which significantly reduces the volume of output. However, the downside is that it also removes all progress feedback, making it difficult to monitor build status or diagnose issues when builds take a long time.

It would be extremely helpful to have a CI-friendly quiet mode, something like --quiet, but that still gives a clue about the build progress.

Happy to discuss!

Regards,

Marc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102478</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2025-07-17 14:43:45 +0000</bug_when>
    <thetext>What sort of output are your seeing? If it&apos;s a bunch of &apos;#&apos; characters from the progress bars, it&apos;s usually because bitbake thinks your terminal is interactive. The usual way to work around that if you can&apos;t change your CI terminal is to do `bitbake ... | cat` to force stdout to be a pipe instead of a terminal.

Otherwise, when bitbake is running in a non-interactive terminal, it already prints a &quot;start&quot; and &quot;end&quot; message when each task is run. If this is what you are seeing, I&apos;m not sure there is much we can do that would be a level between print the progress as we do now and not printing it at all.

Can you please clarify what you are seeing and what sort of output you would expect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102486</commentid>
    <comment_count>2</comment_count>
    <who name="Marc Ferland">marc.ferland</who>
    <bug_when>2025-07-18 13:07:45 +0000</bug_when>
    <thetext>Sure!

I&apos;m currently starting my builds like this:

    $ kas build ${KAS_JOB}:${KAS_COMMON} -- --quiet

The GitLab console is non-interactive (I’ve confirmed this), and
here&apos;s the kind of output I see:

    $ kas build ${KAS_JOB}:${KAS_COMMON} -- --quiet
    2025-07-17 19:08:54 - INFO     - kas 4.7 started
    2025-07-17 19:08:55 - INFO     - Running on GitLab CI
    &lt;KAS LAYER CLONING OUTPUT REMOVED FOR BREVITY&gt;
    2025-07-17 19:09:24 - INFO     - Loading cache...done.
    2025-07-17 19:09:31 - INFO     - Parsing recipes...done.
    2025-07-17 19:10:47 - INFO     - Initialising tasks...done.
    &lt;NO OUTPUT FOR A LONG TIME...&gt;
    Uploading artifacts for successful job 01:36
    Uploading artifacts...

As expected, once the build starts (right after the “Initialising
tasks” line), there’s no further output until the end, since --quiet
suppresses progress messages.

What I think would be useful in CI environments like this is an
alternative to --quiet, something like a --non-interactive-progress
option. It would keep output minimal to avoid log truncation but still
print occasional progress updates. For example:

    2025-07-17 19:10:47 - INFO     - Running tasks 10% (58/584)
    2025-07-17 19:12:27 - INFO     - Running tasks 20% (116/584)
    2025-07-17 19:13:13 - INFO     - Running tasks 30% (175/584)
    2025-07-17 19:15:33 - INFO     - Running tasks 40% (233/584)

Basically, it would behave like a non-interactive version of the
progress bar shown in TTYs, giving just enough feedback for humans to
know the build is alive without overwhelming the log.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102535</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2025-07-31 14:51:14 +0000</bug_when>
    <thetext>I&apos;m pretty sure this is because you are running in a kas container, which is configured to make bitbake think it is running in an interactive terminal (this can be a common problem with containers). As such, please take this up with the kas project instead.

If you can reproduce outside of kas, feel free to reopen this bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102536</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2025-07-31 14:53:44 +0000</bug_when>
    <thetext>For reference, Pyrex (another container system for bitbake) does this: https://github.com/garmin/pyrex/blob/87910c0db40e19a5cd2ca34361eebcf70bea0551/pyrex.py#L545 which helps to prevent these sorts for problems.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>