[SERVER-38395] Python global logger is polluted when importing certain resmokelib modules Created: 04/Dec/18  Updated: 29/Oct/23  Resolved: 13/Dec/18

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

Type: Task Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Jonathan Abrahams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: DAG 2018-12-31
Participants:
Story Points: 1

 Description   

It was discovered that the global logging in buildscripts/update_test_lifecycle.py gets overriden by buildscripts/mobile/adb_monitor.py because of the resmokelib imports.

The file buildscripts/mobile/benchrun_embedded_setup_android.py also has similar issue.

The logging setting should not be done in the global scope but in the main function:

logging.basicConfig(format="%(asctime)s %(levelname)s %(message)s", level=logging.INFO)



 Comments   
Comment by Githook User [ 01/Aug/19 ]

Author:

{'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com', 'username': 'hptabster'}

Message: SERVER-38395 Python global logger is polluted when importing certain resmokelib modules

(cherry picked from commit acefbb86080b63c847700c764d08c5d8bcd9c58f)
Branch: v4.0
https://github.com/mongodb/mongo/commit/74f9c3bbd17e2e057f2def58adf341628a94f83a

Comment by Githook User [ 13/Dec/18 ]

Author:

{'username': 'hptabster', 'email': 'jonathan@mongodb.com', 'name': 'Jonathan Abrahams'}

Message: SERVER-38395 Python global logger is polluted when importing certain resmokelib modules
Branch: master
https://github.com/mongodb/mongo/commit/acefbb86080b63c847700c764d08c5d8bcd9c58f

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