FrancescoCastaldi commented on PR #45822:
URL: https://github.com/apache/superset/pull/45822#issuecomment-6519288883
### Review Follow-Up & CI Remediation
All review comments and CI checks have been addressed in commit `089c8d37a4`:
1. **Mixed Timezone Comparison Fix**:
- Added `TypeError` to the caught exception tuple across all three
`get_since_until_from_time_range` call sites in `superset/models/helpers.py`.
- When mixed naive and offset-aware datetimes like `"2024-01-01T00:00:00Z
: 2024-01-02"` are parsed, `get_since_until` raises `TypeError: can't compare
offset-naive and offset-aware datetimes`. This is now safely intercepted and
re-raised as `QueryObjectValidationError`, returning a 400 status code instead
of escaping as a 500 error.
- Added dedicated regression unit test in
`tests/unit_tests/models/helpers_test.py`.
2. **Pre-commit Linter / Formatting Fix**:
- Formatted `superset/models/helpers.py` with `ruff-format` (verified
clean and within the 88-column limit) to resolve the `pre-commit (current)` CI
status check.
@sadpandajoe, this is ready for your re-review whenever you have a chance.
Thank you!
--
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]