You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "spyoungtech (via GitHub)" <gi...@apache.org> on 2023/06/22 20:10:20 UTC

[GitHub] [superset] spyoungtech opened a new issue, #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

spyoungtech opened a new issue, #24487:
URL: https://github.com/apache/superset/issues/24487

   SQLLab utilizes the `/api/v1/query/updated_since` endpoint to retrieve updated queries in order to ultimately display results.
   
   #### How to reproduce the bug
   
   1. Start superset and superset workers with caching and a result backend (redis) configured
   2. Configure asynchronous results for your database connection (database connections -> edit -> advanced -> performance)
   3. Open SQLLab
   4. (with browser network inspector open) Select database and schema and run a simple query
   5. Observe this (may) succeed, populating the query result data in the UI and:  
       - The call to `/api/v1/query/updated_since` returned a non-empty array containing the relevant query result key
       - There is a subsequent network call to retrieve the result data using the result key from the previous response
   6. (With browser inspector still open) Run another query -- this can be the same query or a different one
   7. Observe that the query results are unexpectedly not displayed with the message "Run a query to display results" shown and:  
       - The call to `/api/v1/query/updated_since` returned an empty array
       - No subsequent network calls are made
   8. Check the superset worker logs to confirm there are no errors in processing the query or storing results
   9. Obtain the result key from the superset worker logs and confirm results actually exist
   
   ### Expected results
   
   It is expected that whenever a query is run in the SQL Lab that results will populate in the UI and will not show the message "Run a query to display results" -- or perhaps specifically that the `/api/v1/query/updated_since` does not return an empty array 
   
   ### Actual results
   
   No updated queries are returned by the call to `/api/v1/query/updated_since` and hence the UI never populates any result data, despite the fact the query indeed runs and has results
   
   #### Screenshots
   
   Here are a couple videos showing the problem as described 
   
   <details>
   <summary>full video</summary>
   
   
   [full version](https://github.com/apache/superset/assets/15212758/77bb2c50-d795-4497-a5ba-6a0dd4f86726)
   
   </details>
   
   <details>
   <summary>short video</summary>
   
   [short version](https://github.com/apache/superset/assets/15212758/9357b64c-5096-4ebd-8059-449544d73f30)
   
   </details>
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: firefox 114.0.1 on MacOS
   - superset version: docker latest (`apache/superset:45901dafbb1258f57dd314a03e211fd81b258a58`)
   - python version: 3.9.16 (from docker image)
   - node.js version: (not sure? N/A)
   - any feature flags active: None
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh closed issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "hughhhh (via GitHub)" <gi...@apache.org>.
hughhhh closed issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array
URL: https://github.com/apache/superset/issues/24487


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1604405560

   This must be a regression from #24422. I think I know how this should be changed to work correctly, but I'm unfortunately tied up right now and can't work on it until Monday next week. If this is a critical blocker I suggest reverting it until a proper fix is put in place. Ping @yousoph @hughhhh 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] spyoungtech commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "spyoungtech (via GitHub)" <gi...@apache.org>.
spyoungtech commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1603385470

   Our current understanding is [this value for `last_updated_ms` is generated by](https://github.com/apache/superset/blob/2a4ef5cccf3d3f8f2f7ccfc8c590f8f2fde31ab0/superset-frontend/src/SqlLab/reducers/sqlLab.js#L617) calling `Date.parse` on the `changed_on` attribute returned from the call to the `/sqllab/execute` endpoint. For example, one such value returned was (accurately) `"changed_on": "2023-06-22T21:52:29.488110"`. However, then this value is run through `Date.parse` the returned value is not quite expected:
   
   ```javascript
   Date.parse("2023-06-22T21:52:29.488110")
   1687495949488  // in ISO format: 2023-06-23T04:52:29.488000
   ```
   
   This appears to be the source of the bug. My estimation is that either the parsing method in javascript or format of data returned by the `/sqllab/execute` endpoint needs to be changed to fix this.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] spyoungtech commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "spyoungtech (via GitHub)" <gi...@apache.org>.
spyoungtech commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1608267983

   @villebro  Confirmed -- the issue is resolved on the latest build including this change. Thanks for the speedy fix. 🎉 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] spyoungtech commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "spyoungtech (via GitHub)" <gi...@apache.org>.
spyoungtech commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1607744035

   Thanks for the speedy response. #24513 looks good to me -- happy to test and confirm fixed once a docker image with this change is published.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1608096204

   @spyoungtech it would be very much appreciated if you can give the latest master branch cut a test ride and report back your findings!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] yousoph commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "yousoph (via GitHub)" <gi...@apache.org>.
yousoph commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1603726738

   cc @villebro @hughhhh 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #24487: SQL Lab UI does not populate results - query/updated_since endpoint unexpectedly returns empty array

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on issue #24487:
URL: https://github.com/apache/superset/issues/24487#issuecomment-1606953846

   @spyoungtech thanks for the detailed analysis. Please take a look at #24513 which should resolve the issue. cc: @yousoph @hughhhh 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org