Repository navigation
Conversation
|
Hi @chennaji9. Thanks for your PR. I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
printUpgradeList added the +2 column padding inside the per-item loop, so each extra package widened the ID and Installed columns by 2 regardless of content (100 identical 14-char ids produced a 214-char column); compute the maxima in the loop and add the padding once afterwards; add a unit test asserting the column offset is independent of the item count. Signed-off-by: 陈那几 <2078634206@qq.com>
3a32862 to
f2251d0
Compare
What does this PR do?
CLIPrinter::printUpgradeListcomputed its column widths with the padding added inside the per-item loop:The
+ 2column padding accumulates once per package: 100 packages whose ids are all 14 characters produce a 214-character ID column instead of 16. The upgrade table bloats with the number of upgradable apps, wraps in normal terminals, and the column position depends on the item count.Compute the maxima inside the loop and apply the padding once afterwards.
Validation
CLIPrinter.PrintUpgradeListColumnWidthIndependentOfItemCount: 100 entries with identical 14-char ids and a single-entry list both placeoldVersionat offset 16 (id.size() + 2); on the old code the 100-entry offset would be 214, so the test fails without the fix.ctest -R CLIPrinter→ 20/20 Passed (including the pre-existingPrintUpgradeListandPrintUpgradeListEmpty).ll-teststarget builds cleanly.🤖 Generated with Claude Code