superset icon indicating copy to clipboard operation
superset copied to clipboard

Fixing Date Time issue as seen in v3.1.0

Open dfoley84 opened this issue 2 years ago • 2 comments

SUMMARY

Fix was Merged #25318, but issue is still reproducible on Superset version 3.0.0 & 3.1.0

:ERROR:superset.views.base:Excel does not support datetimes with timezones. Please ensure that datetimes are timezone unaware before writing to Excel. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps return f(self, *args, **kwargs) File "/app/superset/views/base_api.py", line 127, in wraps raise ex File "/app/superset/views/base_api.py", line 121, in wraps duration, response = time_function(f, self, *args, **kwargs) File "/app/superset/utils/core.py", line 1454, in time_function response = func(*args, **kwargs) File "/app/superset/utils/log.py", line 255, in wrapper value = f(*args, **kwargs) File "/app/superset/charts/data/api.py", line 256, in data return self._get_data_response( File "/app/superset/charts/data/api.py", line 412, in _get_data_response result = command.run(force_cached=force_cached) File "/app/superset/commands/chart/data/get_data_command.py", line 45, in run payload = self._query_context.get_payload( File "/app/superset/common/query_context.py", line 101, in get_payload return self._processor.get_payload(cache_query_context, force_cached) File "/app/superset/common/query_context_processor.py", line 600, in get_payload query_results = [ File "/app/superset/common/query_context_processor.py", line 601, in <listcomp> get_query_results( File "/app/superset/common/query_actions.py", line 224, in get_query_results return result_func(query_context, query_obj, force_cached) File "/app/superset/common/query_actions.py", line 186, in _get_results payload = _get_full(query_context, query_obj, force_cached) File

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • [ ] Has associated issue:
  • [ ] Required feature flags:
  • [ ] Changes UI
  • [ ] Includes DB Migration (follow approval process in SIP-59)
    • [ ] Migration is atomic, supports rollback & is backwards-compatible
    • [ ] Confirm DB migration upgrade and downgrade tested
    • [ ] Runtime estimates and downtime expectations provided
  • [ ] Introduces new feature or API
  • [ ] Removes existing feature or API

dfoley84 avatar Feb 10 '24 17:02 dfoley84

@betodealmeida could you review this PR given that you added the # timezones are not supported comment?

michael-s-molina avatar Feb 12 '24 17:02 michael-s-molina

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (faaf14b) 67.22% compared to head (b2aaaf4) 67.35%. Report is 5 commits behind head on master.

Files Patch % Lines
superset/utils/excel.py 0.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #27076      +/-   ##
==========================================
+ Coverage   67.22%   67.35%   +0.13%     
==========================================
  Files        1899     1899              
  Lines       74387    74389       +2     
  Branches     8276     8276              
==========================================
+ Hits        50006    50107     +101     
+ Misses      22326    22227      -99     
  Partials     2055     2055              
Flag Coverage Δ
hive 53.81% <0.00%> (?)
mysql 78.03% <0.00%> (+0.02%) :arrow_up:
postgres 78.13% <0.00%> (-0.01%) :arrow_down:
presto 53.76% <0.00%> (?)
python 78.55% <0.00%> (+0.27%) :arrow_up:
sqlite 77.65% <0.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 12 '24 18:02 codecov[bot]