Commit 2a2c132
committed
pkg/cli/admin/upgrade/recommend: Add a blank line after --version conditional risk
When I added the:
Update to 4.18.6 Recommended=False:
...
block in c1ef328 (pkg/cli/admin/upgrade/recommend: Add --version
option for specific releases, 2024-10-14, #1897), there was no
subsequent output in this "--version has conditional risks" case, so
the earlier lack-of-blank-line made sense.
But then 2d7e004 (pkg/cli/admin/upgrade/recommend: New,
feature-gated --accept, 2025-05-06, #2023) gave the option for a
subsequent:
error: issues that apply to this cluster but which were not included in --accept: ...
or:
Update to %s has no known issues relevant...
This commit adds a new line to standard output, to offset those
summaries from the possibly-long Message:
...
Update to 4.18.6 Recommended=False:
Image: quay.io/openshift-release-dev/ocp-release@sha256:61fdad894f035a8b192647c224faf565279518255bdbf60a91db4ee0479adaa6
Release URL: https://access.redhat.com/errata/RHSA-2025:3066
Reason: CRIOLayerCompressionPulls
Message: The CRI-O container runtime may fail to pull images with certain layer compression characteristics https://issues.redhat.com/browse/OCPNODE-3074
error: issues that apply to this cluster but which were not included in --accept: ConditionalUpdateRisk,KubeContainerWaiting
instead of cramming that 'error: ...' or '... has no known issues...'
right onto the end of the output. Although the error is getting
written to standard error instead of the standard output, so in that
case, the newline will only matter for terminal users and others who
are flattening those two streams together.
And now that we have the additional newline handling in recommend.go,
I can drop the newline I'd been manually injecting in examples_test.go
to make the test fixtures more readable. I should have noticed that
test-specific injection as a sign that the better recommend.go newline
handling was useful. Oh well, better late than never.1 parent 9b2ae28 commit 2a2c132
File tree
2 files changed
+5
-2
lines changed- pkg/cli/admin/upgrade/recommend
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
346 | 349 | | |
347 | 350 | | |
348 | | - | |
| 351 | + | |
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
| |||
0 commit comments