konflux-ci / rpm-lockfile-prototype

GNU General Public License v3.0
3 stars 10 forks source link

Route INFO log messages to stdout instead of stderr #53

Open lmilbaum opened 1 month ago

lmilbaum commented 1 month ago

Today, all log messages are routed to stderr. Renovate is configured to invoke the script and output its output to renovate logs. What happens is that the script output is routed to the stderr section instead of the stdout one. See example:

      "dep": "osbuild",
       "cmd": "make lockfile CI=CI",
       "stderr": "INFO:root:Running solver for aarch64\nINFO:root:$ skopeo --override-arch=arm64 copy docker://registry.stage.redhat.io/ubi9/ubi:9.5-1725875087 dir:/tmp/tmp6jua2jfr\nINFO:root:Extracting rpmdb from layer sha256:7faf233399c7106252b657b45786a2c086f2efe87a24acb665951efb84eb79af\nINFO:root:Extracting rpmdb from layer sha256:f92c1928c714c518f33ae6346026a31b29032d7ad70b96fb277fa0a245de39e3\nINFO:dnf:Added baseos repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/BaseOS/$basearch/os/\nINFO:dnf:Added appstream repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/AppStream/$basearch/os/\nINFO:dnf:Added baseos-sources repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/BaseOS/source/tree\nINFO:dnf:Added appstream-sources repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/AppStream/source/tree\nINFO:dnf:Added ubi-9-codeready-builder repo from https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/codeready-builder/os/\nINFO:dnf:Package python3-libdnf-0.69.0-12.el9.aarch64 is already installed.\nINFO:root:Running solver for x86_64\nINFO:root:$ skopeo --override-arch=amd64 copy docker://registry.stage.redhat.io/ubi9/ubi:9.5-1725875087 dir:/tmp/tmpkf43pjw9\nINFO:root:Extracting rpmdb from layer sha256:56b8b3ded23a271128c5666371fd9a41d1cd9771d77b259f6e46a54adc30c29f\nINFO:root:Extracting rpmdb from layer sha256:13a94c0a04fd1389fe13224f455074fb419fae0e49fc2cadd17fb988ab959dbf\nINFO:dnf:Added baseos repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/BaseOS/$basearch/os/\nINFO:dnf:Added appstream repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/AppStream/$basearch/os/\nINFO:dnf:Added baseos-sources repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/BaseOS/source/tree\nINFO:dnf:Added appstream-sources repo from https://download.hosts.prod.upshift.rdu2.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.5.0-20240916.2/compose/AppStream/source/tree\nINFO:dnf:Added ubi-9-codeready-builder repo from https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/codeready-builder/os/\nINFO:dnf:Package python3-libdnf-0.69.0-12.el9.x86_64 is already installed.\n",
       "stdout": "git submodule update --init --recursive\nSubmodule path 'osbuild': checked out 'ed95178b80c3aeca836312bf0093ac070c67bf7c'\ngit submodule update --remote --merge\nUpdating ed95178b..d67fa48c\nFast-forward\n stages/org.osbuild.btrfs.subvol  |  2 +-\n stages/test/test_btrfs_subvol.py | 46 ++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 47 insertions(+), 1 deletion(-)\n create mode 100644 stages/test/test_btrfs_subvol.py\nSubmodule path 'osbuild': merged in 'd67fa48c170a0093807b12d674f13b175ba9d59b'\nskopeo login -u **redacted** -p **redacted** registry.stage.redhat.io\nLogin Succeeded!\nrpm-lockfile-prototype rpms.in.yaml\nGetting image source signatures\nCopying blob sha256:f92c1928c714c518f33ae6346026a31b29032d7ad70b96fb277fa0a245de39e3\nCopying blob sha256:7faf233399c7106252b657b45786a2c086f2efe87a24acb665951efb84eb79af\nCopying config sha256:92c120ea5015093bc325896ecb469c322a5637ec7ef2593db3d70558324ef3b8\nWriting manifest to image destination\nGetting image source signatures\nCopying blob sha256:13a94c0a04fd1389fe13224f455074fb419fae0e49fc2cadd17fb988ab959dbf\nCopying blob sha256:56b8b3ded23a271128c5666371fd9a41d1cd9771d77b259f6e46a54adc30c29f\nCopying config sha256:7c812694d2fa273a7707e9d34ddedcf1727af75d880ede6ae7762b84c910f162\nWriting manifest to image destination\n"
DEBUG: Post-upgrade file saved (repository=redhat/rhel/bifrost/bootc-image-builder, baseBranch=rhel-9.5, branch=renovate/rhel-9.5-all)
       "dep": "osbuild",
       "file": "rpms.lock.yaml",
       "pattern": "rpms.lock.yaml"