Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SQL Lab cancel query in Redshift database connection does not wo… #16326

Merged
merged 5 commits into from
Jun 29, 2022

Conversation

yourssvk
Copy link
Contributor

@yourssvk yourssvk commented Aug 18, 2021

…rk #16325

SUMMARY

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

@yourssvk
Copy link
Contributor Author

The changes are similar to the corresponding option in Postgres's cancel SQL option in SQL Lab

@codecov
Copy link

codecov bot commented Aug 18, 2021

Codecov Report

Merging #16326 (14d3916) into master (2c595b0) will decrease coverage by 9.92%.
The diff coverage is n/a.

❗ Current head 14d3916 differs from pull request most recent head 66d3dce. Consider uploading reports for the commit 66d3dce to get more accurate results

@@            Coverage Diff             @@
##           master   #16326      +/-   ##
==========================================
- Coverage   76.63%   66.71%   -9.93%     
==========================================
  Files        1000     1750     +750     
  Lines       53426    65431   +12005     
  Branches     6819     6906      +87     
==========================================
+ Hits        40945    43653    +2708     
- Misses      12244    20028    +7784     
- Partials      237     1750    +1513     
Flag Coverage Δ
hive 53.77% <ø> (-27.61%) ⬇️
mysql ?
postgres ?
presto 53.63% <ø> (-27.86%) ⬇️
python 82.61% <ø> (+0.44%) ⬆️
sqlite 82.24% <ø> (+0.94%) ⬆️
unit 50.66% <ø> (?)

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

Impacted Files Coverage Δ
...ntend/src/dashboard/util/replaceUndefinedByNull.ts 0.00% <0.00%> (-100.00%) ⬇️
...oard/components/gridComponents/new/NewMarkdown.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset/tasks/slack_util.py 0.00% <0.00%> (-86.96%) ⬇️
...d/src/filters/components/Time/TimeFilterPlugin.tsx 0.00% <0.00%> (-86.67%) ⬇️
...ts/nativeFilters/FilterBar/FilterControls/state.ts 0.00% <0.00%> (-78.58%) ⬇️
superset-frontend/src/components/Slider/index.tsx 0.00% <0.00%> (-75.00%) ⬇️
...Filters/FilterBar/FilterControls/FilterControl.tsx 29.03% <0.00%> (-70.97%) ⬇️
...ntend/src/filters/components/GroupBy/buildQuery.ts 0.00% <0.00%> (-66.67%) ⬇️
...tend/src/filters/components/Time/transformProps.ts 0.00% <0.00%> (-66.67%) ⬇️
...end/src/filters/components/TimeGrain/buildQuery.ts 0.00% <0.00%> (-66.67%) ⬇️
... and 1796 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c595b0...66d3dce. Read the comment docs.

@eschutho
Copy link
Member

Thank you @yourssvk, this looks great. I'm closing and reopening this PR to rerun some E2E tests that have failed and are likely flaky.

@eschutho eschutho closed this Oct 15, 2021
@eschutho eschutho reopened this Oct 15, 2021
@yourssvk
Copy link
Contributor Author

Hi @eschutho Can this be Merged? Any issues?

@eschutho eschutho closed this Apr 19, 2022
@eschutho eschutho reopened this Apr 19, 2022
@eschutho
Copy link
Member

@yourssvk sorry for the delay. It looks like there's just one linting error that's failing the tests. Can you try running pre-commit locally to fix it? There are instructions isn https://github.com/apache/superset/blob/master/CONTRIBUTING.md how to get pre-commit running.

@eschutho eschutho merged commit 90d486a into apache:master Jun 29, 2022
michael-s-molina pushed a commit that referenced this pull request Jul 6, 2022
#16326)

* fix: SQL Lab cancel query in Redshift database connection does not work #16325

Co-authored-by: Venkata Krishnan Somasundaram <venkata_cred@Venkatas-MacBook-Pro.local>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
(cherry picked from commit 90d486a)
@gaurav7261
Copy link
Contributor

@yourssvk I'm getting empty query id while superset code calling cancel_query_id = db_engine_spec.get_cancel_query_id(cursor, query) in sql_lab.py with engine ReshiftSpec, while for postgres spec,I get queryid, so stop query is working fine in case of postgres but not in redshift, did some logging to verify, here is the log
for postgres

2023-10-31 08:48:29,251:INFO:superset.sql_lab:15965
<class 'superset.db_engine_specs.postgres.PostgresEngineSpec'>```
where 15965 is postgres query id but for redshift sql lab
```None
2023-10-31 08:44:28,331:INFO:superset.sql_lab:None
<class 'superset.db_engine_specs.redshift-bak.RedshiftEngineSpec'>```
it is returning null, my version is 2.1.1, is it known issue 

@mistercrunch mistercrunch added the 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v2.0 🍒 2.0.0 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants