The change in lib/lp/registry/tests/test_process_job_sources_cronjob.py reflects the change from logger.debug() in the original BaseJobRunner.runJob() method to logger.info() in lazr.jobrunner.
The second change: I added the method Job._doOops() again to BasJobRunner. The reason:
The implementation of _doOops() in lazr.jobrunner calls oops_report.publish(). The makes sense because the module does not make any asssumptions about a setup for some sort automatic OOPS generation: It simply publishes the OOPS report and the logs an error message.
This conflicts with the way how Launchpad generates an OOPS in scripts: lp.services.scripts.logger has a class OopsHandler(logging.Handler), which automatically generates an OOPS report, when logger.error() is called. So, a call of _doOops() from lazr.jobrunner first publishes an OOPS, then logs the error -- and a log handler publishes the same OPS report again.
Some additional changes are necessary to use lazr.jobrunner (see also https:/ /code.launchpad .net/~adeuring/ lazr.jobrunner/ use_job_ repr_in_ logging/ +merge/ 98821):
The change in lib/lp/ registry/ tests/test_ process_ job_sources_ cronjob. py reflects the change from logger.debug() in the original BaseJobRunner. runJob( ) method to logger.info() in lazr.jobrunner.
The second change: I added the method Job._doOops() again to BasJobRunner. The reason:
The implementation of _doOops() in lazr.jobrunner calls oops_report. publish( ). The makes sense because the module does not make any asssumptions about a setup for some sort automatic OOPS generation: It simply publishes the OOPS report and the logs an error message.
This conflicts with the way how Launchpad generates an OOPS in scripts: lp.services. scripts. logger has a class OopsHandler( logging. Handler) , which automatically generates an OOPS report, when logger.error() is called. So, a call of _doOops() from lazr.jobrunner first publishes an OOPS, then logs the error -- and a log handler publishes the same OPS report again.
tests:
bin/test -vv \ tests.test_ process_ job_sources_ cronjob. ProcessJobSourc eGroupsTest. test_processed \ tests.test_ process_ job_sources_ cronjob. ProcessJobSourc eTest.test_ processed \ scripts. tests.test_ create_ merge_proposals .TestCreateMerg eProposals. test_oops \ scripts. tests.test_ reclaim_ branch_ space.TestRecla imBranchSpaceSc ript.test_ reclaimbranchsp ace_script_ logs_oops \ scripts. tests.test_ sendbranchmail. TestSendbranchm ail.test_ sendbranchmail_ handles_ oops \ .tests. test_rosetta_ branches_ script. TestRosettaBran chesScript. test_rosetta_ branches_ script_ oops \ tests.test_ membership_ notification_ job.MembershipN otificationJobT est.test_ smoke_admining_ team
-t lp.registry.
-t lp.registry.
-t lp.code.
-t lp.code.
-t lp.code.
-t lp.translations
-t lp.registry.
no lint