Page MenuHomePhabricator

welcome -simulate returns 1 when timeout occures
Closed, ResolvedPublic

Description

ar.wikt has only recently been added as a travis build host, and welcome -simulate is returning 1 unexpectedly in many of the initial builds

Occurs in all builds in https://travis-ci.org/wikimedia/pywikibot-core/builds/57584855

Occurs twice in https://travis-ci.org/wikimedia/pywikibot-core/builds/57574308 - py3.3 and py2.6

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added projects: Pywikibot-tests, Pywikibot.
jayvdb added subscribers: Unknown Object (MLST), jayvdb, Aklapper.
jayvdb renamed this task from Unexpected success in welcome on ar.wikt to ar.wikt welcome -simulate returns 1.Apr 8 2015, 3:16 AM
jayvdb updated the task description. (Show Details)
jayvdb set Security to None.
jayvdb triaged this task as Unbreak Now! priority.Apr 8 2015, 5:27 AM

It seems to be much more commonly happening on py3

Change 179456 had a related patch set uploaded (by John Vandenberg):
Allow any autorun script to fail

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

As this has "Unbreak now" priority, could @jayvdb 's patch in https://gerrit.wikimedia.org/r/179456 please get reviewed/merged?

Change 207112 had a related patch set uploaded (by XZise):
nosetests does not honour PYWIKIBOT2_TEST_AUTORUN

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

Change 207112 merged by jenkins-bot:
nosetests does not honour PYWIKIBOT2_TEST_AUTORUN

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

Change 179456 abandoned by John Vandenberg:
nosetests does not honour PYWIKIBOT2_TEST_AUTORUN

Reason:
another approach has landed to do the job.

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

@jayvdb , @XZise: One patch merged, another abandoned - what is left to do here? Can this be closed as resolved or is more work needed?
(Asking as this has "Unbreak now" priority.)

XZise lowered the priority of this task from Unbreak Now! to Needs Triage.May 31 2015, 10:29 PM

I don't know where @jayvdb wants to go with this. The original problem has been “solved” by just not executing the tests. But others could comment that it should be handled properly.

jayvdb triaged this task as Low priority.Jun 1 2015, 2:40 AM
jayvdb removed a project: Patch-For-Review.

The problem still exists, but doesnt have an impact on the builds, or a large impact on users as there are no complaints and we cant seem to spot the problematic code.

This comment was removed by Xqt.

The related problem is given with Python 2:

 auto-run script unresponsive after 5 seconds FAIL

======================================================================
FAIL: test_welcome (tests.script_tests.TestScriptSimulate)
Test running welcome -simulate.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\pwb\GIT\core\tests\script_tests.py", line 310, in testScript
    self.assertIn(result['exit_code'], exit_codes)
AssertionError: 1 not found in [0, -9]

----------------------------------------------------------------------
Ran 4 tests in 9.647s

FAILED (failures=1)

Unfortunately the test fails with TimeoutExpired with Python 3(.8)

======================================================================
ERROR: test_welcome (tests.script_tests.TestScriptSimulate)
Test running welcome -simulate.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\pwb\GIT\core\tests\script_tests.py", line 243, in testScript
    result = execute_pwb(cmd, data_in, timeout=timeout,
  File "C:\pwb\GIT\core\tests\utils.py", line 699, in execute_pwb
    return execute(command=command + args,
  File "C:\pwb\GIT\core\tests\utils.py", line 672, in execute
    stdout_data, stderr_data = p.communicate(timeout=timeout)
  File "C:\Python38\lib\subprocess.py", line 1024, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "C:\Python38\lib\subprocess.py", line 1397, in _communicate
    raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '['C:\\Python38\\python.exe', 'C:\\pwb\\GIT\\core\\pwb.py', 'welcome', '-simulate']' timed out after 5 seconds

----------------------------------------------------------------------
Ran 4 tests in 9.090s

Change 588001 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Fix subprocess results in Python 3

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

Xqt renamed this task from ar.wikt welcome -simulate returns 1 to welcome -simulate returns 1 when timeout occures.Apr 10 2020, 4:55 PM

Change 588001 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Fix subprocess results in Python 3

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