dmwm / WMCore

Core workflow management components for CMS.
Apache License 2.0
46 stars 107 forks source link

Add python 3.9 suport for Watchdog.isAlive() #12110

Closed khurtado closed 1 month ago

khurtado commented 1 month ago

Fixes #12109

Status

ready

Description

Define Watchdog.isAlive() so it supports python 3.7 and 3.9

Is it backward compatible (if not, which system it affects?)

<YES | NO | MAYBE>

Related issue: https://github.com/dmwm/WMCore/issues/11978

khurtado commented 1 month ago

For more context, the following unit test fails with:

https://cmssdt.cern.ch/dmwm-jenkins/view/WMCore%20Docker/job/WMCore-Unittest-Baseline-khurtado2/37/testReport/junit/Runtime_t/RuntimeTest/testB_EmulatorTest/

  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/cmsbld/WMCore/test/python/WMCore_t/Misc_t/Runtime_t.py", line 412, in testB_EmulatorTest
    self.runJobs(workload=workload)
  File "/home/cmsbld/WMCore/test/python/WMCore_t/Misc_t/Runtime_t.py", line 317, in runJobs
    miniStartup(thisDir=taskDir)
  File "/home/cmsbld/WMCore/test/python/WMCore_t/Misc_t/Runtime_t.py", line 76, in miniStartup
    if monitor.isAlive():
'Watchdog' object has no attribute 'isAlive'

This PR should fix this issue

cmsdmwmbot commented 1 month ago

Jenkins results:

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15229/artifact/artifacts/PullRequestReport.html

cmsdmwmbot commented 1 month ago

Jenkins results:

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15230/artifact/artifacts/PullRequestReport.html