rusackas opened a new pull request, #40144:
URL: https://github.com/apache/superset/pull/40144

   ### SUMMARY
   
   This is a **test-only PR** opened as a TDD-style validation of issue #33365.
   
   #33365 (filed 2025-05) reports that ``parsedatetime:eval now with context - 
False, False`` floods the logs in regular Superset usage. The reporter notes 
this appears in dozens of unrelated issue threads, suggesting it's hitting a 
wide range of deployments.
   
   The library logs at DEBUG, but production deployments running at DEBUG level 
(or with default Flask/gunicorn dev configs) surface every call. The fix is a 
one-liner at module load in ``superset/utils/date_parser.py``: silence the 
third-party ``parsedatetime`` logger.
   
   This PR adds one regression test on ``datetime_eval``:
   
   - **\`test_datetime_eval_does_not_emit_parsedatetime_debug_logs\`** — 
captures all log records at DEBUG level during a single 
\`datetime_eval(\"datetime('now')\")\` call and asserts none come from the 
\`parsedatetime\` logger.
   
   ### How to interpret CI
   
   - **CI green** → suppression is in place; merging closes #33365 and locks in 
the regression guard.
   - **CI red** → no suppression. Likely fix at the top of 
\`superset/utils/date_parser.py\`:
     \`\`\`python
     logging.getLogger("parsedatetime").setLevel(logging.WARNING)
     \`\`\`
   
   ### TESTING INSTRUCTIONS
   
   \`\`\`bash
   pytest 
tests/unit_tests/utils/date_parser_tests.py::test_datetime_eval_does_not_emit_parsedatetime_debug_logs
 -v
   \`\`\`
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue: closes #33365
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to