Repository navigation
mgr/dashboard: skip the table when an nvmeof cli result has no columns - #69659
Conversation
The dashboard leaves prettytable unpinned. prettytable commit 2574492 ("Apply
some Pylint rules (PLR)", ceph#436) rewrote _stringify_row()'s row_height as
`max(_get_size(c)[1] for c in row)`, which raises ValueError("max() iterable
argument is empty") on a row with no cells. The change is undocumented and
shipped in 3.18.0; get_string() trips on it when a table has a row but no
columns.
AnnotatedDataTextOutputFormatter builds such a table for an empty result, or
one whose only field is status or error_message, so NvmeofCLICommand.call()
returns -EINVAL and the command fails. This broke run-tox-mgr-dashboard-py3
once the tox virtualenv picked up prettytable 3.18.0.
Return an empty string when there are no columns instead of formatting a
degenerate table.
Fixes: https://tracker.ceph.com/issues/77589
Signed-off-by: Kefu Chai <[email protected]>
87808d0 to
9dd7fd0
Compare
|
changelog
@nizamial09 and @afreen23 could you take another look? |
Hezko
left a comment
There was a problem hiding this comment.
Im currently working on a PR which will show a empty message like "no listeners" text instead of the empty table, I hope you will like it when its ready :)
that's probably a better UX. but i am wondering if we should treat this message as errors and send them to stderr, or.. probably not -- i am not sure. |
|
jenkins test make check arm64 |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
idryomov
left a comment
There was a problem hiding this comment.
The dashboard leaves prettytable unpinned.
Does that mean that this PR should be backported? At least to the umbrella branch, but I think ceph nvmeof CLI is there in tentacle as well?
both. updated https://tracker.ceph.com/issues/77589. |
@tchaikov Will you be creating backport PRs? |
i will try to get to it tomorrow. if it's super urgent, please feel free to take them. |
should be ready. please let me know if i am missing anything. |
The dashboard leaves prettytable unpinned. prettytable commit prettytable/prettytable@2574492 ("Apply some Pylint rules (PLR)", #436) rewrote _stringify_row()'s row_height as
max(_get_size(c)[1] for c in row), which raisesValueError("max() iterable argument is empty")on a row with no cells. The change is undocumented and shipped in 3.18.0; get_string() trips on it when a table has a row but no columns.AnnotatedDataTextOutputFormatterbuilds such a table for an empty result, or one whose only field is status or error_message, soNvmeofCLICommand.call()returns-EINVALand the command fails. This brokerun-tox-mgr-dashboard-py3once the tox virtualenv picked up prettytable 3.18.0.Return an empty string when there are no columns instead of formatting a degenerate table.
Fixes: https://tracker.ceph.com/issues/77589
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.