"tahoe --version" shouldn't show scary diagnostic warnings #2436
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#2436
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It is very common for
tahoe --version
to report diagnostics warnings about the difference between whatpkg_resources
claims to provide, and what the actual imported modules (and their*version*
) reports. These warnings have convinced several users that their tahoe installation has failed, when in fact everything will would work normally apart from those warnings.Zooko and I agreed on IRC to change
tahoe --version
to report the versions of Tahoe itself and its dependencies (foolscap, pycryptopp, etc), but to remove the import-vs-pkg_resources warnings. We'll add a separatetahoe debug versions
command that emits complete diagnostics.For reference, this is what the problematic output looks like:
The output is large enough that, depending upon the size of your screen, you may wind up with the scary "Warning:... not found by import" lines at the top of the screen, which sounds an awful lot like an ImportError.
On IRC Daira said that she thinks all of the warnings shown in the user-supplied output above have been fixed in trunk. I'll ask the user to try the 10.1a1post9 tarball.
(https://twitter.com/olabini/status/604300869832597504)
"the printing of sys.path REALLY looks like a stack trace btw."
I think a lesson here is never to show output to a user that looks like a stack trace, i.e. has a list of lines where the beginning of each line is a filename/pathname. I've seen this before: if a user sees something that looks like a stack trace, they immediately avert their gaze and assume that the software is malfunctioning.
What if
tahoe --version
emitted just the versions and a single line that said "warning: not all dependency versions matched expectations. Run 'tahoe debug versions' for more info." ? And then we move all that other (scary) stuff to the other command?Moving this out of 1.10.1, insufficient consensus to make a last-minute change.
The issue I have with not displaying a warning is that the printed versions may not be correct. However, I'm okay with printing a short warning on the line that displays each offending version (in the "comment" field), and suppressing the long debugging information in cases where that is the only problem.
So in the example in the description, for instance, the output would be:
That sounds like a good compromise to me. I think I'll use
()
instead of[]
.[]
is already used for comments;()
is used for paths when--version-and-path
is given. I want the output to remain consistently parsable.Review needed for https://github.com/tahoe-lafs/tahoe-lafs/pull/176.
In /tahoe-lafs/trac-2024-07-25/commit/431728f8f854e02d9ab2f731675f12ce18cda122:
Oops, I just spotted a bug.
get_package_versions_string
extends_vers_and_locs_list
each time it is called (assumingnot hasattr(sys, 'frozen')
), but it may be called more than once.I will fix it.
In /tahoe-lafs/trac-2024-07-25/commit/2c99294a4faa0e0f94fdb53ed60954e1e0724955:
Landed in 28399b6.