[SERVER-32474] resmoke.py logging output from data consistency hooks twice to logkeeper Created: 28/Dec/17  Updated: 30/Oct/23  Resolved: 10/Jan/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.6.4, 3.7.1

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-32581 Validation hook prints extra timestam... Closed
Problem/Incident
is caused by SERVER-31556 Fix ContinuousStepdown logger Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: TIG 2018-1-15
Participants:

 Description   

The changes from SERVER-31556 made it so any logs written by resmoke.py hooks go to logkeeper's "global logs". This ensured that we wouldn't miss output from the hook when it logs a message either before or without starting a new test case. However, by changing the parent in the logging hierarchy of the logger used by the data consistency hooks, we've inadvertently changed resmoke.py to write the log output to logkeeper's "global logs" once and then again to logkeeper's "test logs" after starting the test case.

We should instead start the hook's test case with the TestsRootLogger instance as the parent.



 Comments   
Comment by Githook User [ 10/Mar/18 ]

Author:

{'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}

Message: SERVER-32474 Fix double logging when using --log=buildlogger.

Exposes an additional logger that uses the test's root logger as the
parent for any TestCase instances constructor by the hook. The fixture
logger still continues to be the parent of the hook logger.

Also changes the CleanEveryN hook to explicitly get marked as a failure
if a ServerFailure exception is thrown, rather than relying on
TestReport.combine() to do so implicitly.

(cherry picked from commit 2c451638c2456a3ebc6de87a3d2fcfecbb8d92e3)
Branch: v3.6
https://github.com/mongodb/mongo/commit/71a387bed83ba8566c48d032fbf8aab3f1cca4d6

Comment by Githook User [ 10/Jan/18 ]

Author:

{'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}

Message: SERVER-32474 Fix double logging when using --log=buildlogger.

Exposes an additional logger that uses the test's root logger as the
parent for any TestCase instances constructor by the hook. The fixture
logger still continues to be the parent of the hook logger.

Also changes the CleanEveryN hook to explicitly get marked as a failure
if a ServerFailure exception is thrown, rather than relying on
TestReport.combine() to do so implicitly.
Branch: master
https://github.com/mongodb/mongo/commit/2c451638c2456a3ebc6de87a3d2fcfecbb8d92e3

Generated at Thu Feb 08 04:30:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.