Overview
Following recent updates and environment modernizations, running the test suite on master generates unnecessary log noise (~65 warnings) and causes certain tests to silently skip themselves instead of verifying logic.
We conducted a deep-dive analysis of the test execution and identified two quick-win code fixes that drastically reduce test noise and restore test coverage with zero risk of regression.
Detailed Findings & Implementation Plan
1. Eliminate 50+ MongoEngine Deprecation Warnings
- The Issue: The logs are flooded with ~50
DeprecationWarning messages coming from deep within mongoengine (specifically around connection initialization and .to_json() calls), complaining about missing explicit UUID representations in modern environments.
- The Fix: Inject a single configuration parameter into the central MongoDB connection gate. In
hera/datalayer/document/__init__.py, update the connect() call to explicitly enforce standard UUID behavior:
uuidRepresentation='standard'
Overview
Following recent updates and environment modernizations, running the test suite on
mastergenerates unnecessary log noise (~65 warnings) and causes certain tests to silently skip themselves instead of verifying logic.We conducted a deep-dive analysis of the test execution and identified two quick-win code fixes that drastically reduce test noise and restore test coverage with zero risk of regression.
Detailed Findings & Implementation Plan
1. Eliminate 50+ MongoEngine Deprecation Warnings
DeprecationWarningmessages coming from deep withinmongoengine(specifically around connection initialization and.to_json()calls), complaining about missing explicit UUID representations in modern environments.hera/datalayer/document/__init__.py, update theconnect()call to explicitly enforce standard UUID behavior: