Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix garbled output in image changes reports #1201

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Conversation

krnowak
Copy link
Member

@krnowak krnowak commented Sep 29, 2023

2 issues needed fixing:

  • truncated leading output stemming from redirecting standard output to /dev/stdout, which is no-worky on Jenkins, apparently.
  • a bug in show-changes resulting in no changelog differences being printed

Fix tested in http://jenkins.infra.kinvolk.io:8080/job/container/job/image_changes/2999/console

First issue is that on Jenkins, the beginning of the output seems to
be eaten, leaving us only the final part of the reports. This looks
like an issue stemming from redirecting stdout to stdout with
">/dev/stdout". Special case the stdout by not redirecting anything in
such case.

Second issue is that errors printed by the tools we use for generating
the reports go to stderr, so they don't show in the report. So
redirect their stderr to stdout, so the possible errors are visible in
the report file too. We do not want to redirect the stderr of the
print_image_reports function, because that would also capture
debugging stuff from "set -x" that GitHub Actions are using.
There's a bug in show-changes script where it defaults to values with
single quotes in them. So the default scripts directory is not
"scripts" but "'scripts'". This will be fixed in show-scripts, but for
now work it around here by explicitly defining the directories.
@krnowak krnowak requested a review from a team September 29, 2023 11:52
@krnowak krnowak added the main label Sep 29, 2023
@krnowak krnowak merged commit 1f5658e into main Sep 29, 2023
1 check failed
@krnowak krnowak deleted the krnowak/fix-image-changes branch September 29, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants