spurious failure in test_web.Web.test_welcome* with Nevow 0.12.0/Twisted 15.5.0 #2663
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#2663
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?
These tests:
are failing with Nevow 0.12.0 and/or Twisted 15.5.0 (at least I think that's why), because a test is looking for:
but actually seeing
https://travis-ci.org/tahoe-lafs/tahoe-lafs/jobs/98205053
failure in test_web.Web.test_welcome* with Nevow 0.12.0/Twisted 15.5.0to spurious failure in test_web.Web.test_welcome* with Nevow 0.12.0/Twisted 15.5.0Actually it appears that 9 tests are failing.
This is a release blocker because it prevents us from being able to tell whether the remainder of those tests would pass.
This is caused by this change in Nevow; https://github.com/twisted/nevow/commit/f88939ac957d6c2bfdcf5e91edd2baf1c4ae3c5d
Attributes are now sorted. How should we fix this? Since pip-install users (which is what Travis CI does) will get 0.12, but Debian and Ubuntu users get 0.10 or 0.11, we probably want to support both.
An easy fix would be to require Nevow 0.11, but this is obviously not a long-term solution.
Another option would be to change all of the tests to actually parse the rendered HTML. This could require minimal changes to the tests themselves; simply replacing
failUnlessIn
with (the as-yet unwritten but easy to write)failUnlessXmlIn
. I don't think we currently have an HTML parser in our dependencies, though.I think we can fix this with minimal changes, by making sure that the order in which we present attributes to Nevow is already sorted. Then the tests can continue to just check for a single order (the sorted one).
Unfortunately I don't think that will work.
I think there are two ways attributes get there: via
<n:attr>
tags in templates (like this) and via named arguments in the call to Nevow'sT
function (like this). I'm pretty sure that in both cases the old Nevow does not let us control the order either: at least in theT
case the attributes are rendered in dictionary order (viaiteritems()
) and from the Nevow commit in my previous comment I suspect attributes from<n:attr>
tags are too.I actually tried the crazy idea of passing a subclass of
dict
which sorts itsiteritems
to see if a function likeT
with**
in its signature would actually receive my special dictionary... but (unsurprisingly) when I callf(**d)
the dictionaryf
receives is not an instance of my class.I think the tests are being too picky.. we can get most of the same coverage by looking for shorter strings. Also, is the output split into separate lines in a useful way? We could have the test look for the line that shows the expected nickname, then grep just that line for the other attributes.
Worst case we
res.split("</div>")
and then find the section we want in the resulting list. Full HTML parsing is hard, but I don't think we need it to check what we need from this test.OK, I'm working on this now and expect to have a ,,ZA̡͊͠͝LGΌ,, ^is not rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆^ regexp-based fix soon.
(https://github.com/tahoe-lafs/tahoe-lafs/pull/232)
In 55fdbaa/trunk:
Milestone renamed