Page MenuHomePhabricator

LiveRCPageGenerator socketIO_client upstream issues
Closed, ResolvedPublic

Description

There is an open pull request for a py3 problem, but our unit tests must not hit this section of code, or something

https://github.com/invisibleroads/socketIO-client/pull/60

And on py 2.6 there is a deprecation warning emitted

https://travis-ci.org/wikimedia/pywikibot-core/jobs/45687549

test_RC_pagegenerator_result (tests.pagegenerators_tests.LiveRCPageGeneratorTestCase) ... /home/travis/build/wikimedia/pywikibot-core/websocket_client-0.23.0-py2.6.egg/websocket/_core.py:223: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  message = getattr(exception, 'message', '')

There are also issues which stall the builds, but that is covered in T85717:

No handlers could be found for logger "socketIO_client"
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated

However that also appears on a py2.7 build; the only common factor so far is it occurs on ar.wp
https://travis-ci.org/wikimedia/pywikibot-core/jobs/45743553

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb subscribed.
jayvdb renamed this task from LiveRCPageGenerator fails on py 2.6 to LiveRCPageGenerator upstream issues.Jan 3 2015, 4:06 AM
jayvdb renamed this task from LiveRCPageGenerator upstream issues to LiveRCPageGenerator socketIO_client upstream issues.
jayvdb updated the task description. (Show Details)
jayvdb set Security to None.
jayvdb moved this task from Backlog to Upstream issues on the Pywikibot board.

@jayvdb obviously the only common factor is that it fails on ar.wp because otherwise that isn't tested (because socketIO_client is not installed).

The only obvious reason I can think of is a lack of changes, but that's not very likely. The warning 'No handlers could be found for logger "socketIO_client"' should not be related (it's juts a message when something gets logged with socketIO_client as logger).

Is there a way to run tests with -debug, and to view the debug log?

It seems that on Python 3, pagegenerator_tests are not run at all: T86455: Pagegenerator_tests not run on Python 3

Okay, never mind. It's just skipped:

skipped 'socketIO_client not available'

https://travis-ci.org/wikimedia/pywikibot-core/jobs/45743556#L1031

@valhallasw: Afaik there were tests for Travis but because of security reasons that was removed again.

Would be interested if someone has that problem locally. I never had a stalled test because of it (although I test a lot on Python 3 where that test is skipped so I'm probably not testing it enough).

But it happens quite often on Travis so it should've affected others locally already (at least a few times). Isn't it multithreading? Maybe a deadlock?

@jayvdb obviously the only common factor is that it fails on ar.wp because otherwise that isn't tested (because socketIO_client is not installed).

I think this test is also run on all setup.py tests (i.e. enwp and arwp.) It isnt using same flags as the script tests. It is just:

test_deps.extend(extra_deps['rcstream'])

Ah right I confused the script_deps as them because those are only installed on arwp.

Note that T85717 is about our undiagnosed test stalling problem; T85716 is about any diagnosed upstream bugs.

py3 builds skip this test because the released version doesnt import in py3

$ python3.4
Python 3.4.0 (default, Apr 11 2014, 13:05:18) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socketIO_client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/socketIO_client/__init__.py", line 6, in <module>
    from urlparse import urlparse
ImportError: No module named 'urlparse'

The fix has been pulled three days ago:

https://github.com/invisibleroads/socketIO-client/pull/60

But that fix hasnt been released onto pypi:

https://pypi.python.org/pypi/socketIO-client

I believe they are gearing up to release a new version on pypi.

I couldnt see any open ticket about the remaining issue which hasnt disappeared, being that it is not yielding the expected number of items. e.g.
https://travis-ci.org/jayvdb/pywikibot-core/jobs/50748333
It has been doing that intermittently since T85717 was fixed.

gerritbot subscribed.

Change 190719 had a related patch set uploaded (by Merlijn van Deen):
RCStream: Ignore changes after total is reached

https://gerrit.wikimedia.org/r/190719

Patch-For-Review

Change 190719 merged by jenkins-bot:
RCStream: Ignore changes after total is reached

https://gerrit.wikimedia.org/r/190719

It is sort of an upstream issue but with the requests dependency T91394. There is also another problem because since socketIO_client version 0.6.1 it (apparently) only supports socket.io protocol 1.0 while stream.wikimedia.org is using 0.9. That causes the 404 errors in the recent builds. When you install 0.5.5 (the version before that) it works. See also T91393.

Change 195537 had a related patch set uploaded (by XZise):
[FIX] socketIO: Use older version to support WMF

https://gerrit.wikimedia.org/r/195537

Change 195537 merged by jenkins-bot:
[FIX] socketIO: Use older version to support WMF

https://gerrit.wikimedia.org/r/195537

Change 203625 had a related patch set uploaded (by John Vandenberg):
test: skip test if socketIO-version >= 0.6.1

https://gerrit.wikimedia.org/r/203625

Change 203625 merged by jenkins-bot:
test: skip test if socketIO-version >= 0.6.1

https://gerrit.wikimedia.org/r/203625

This initial batch of upstream issues have all been merged upstream. No assignee, as there were many patches by various people, some patches sent upstream and some local. \o/

T91393 is still an outstanding issue.