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: properly keep state on queryEditorSetSql on tabstateview PUT #14579

Merged
merged 4 commits into from
May 12, 2021

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented May 11, 2021

SUMMARY

Pass latestQueryId when user updates SQL. Anytime we call the put the update the sql for the current tab, the clientid/latestQueryId changes which cause the sql_json endpoint to fail since we can’t the proper id

The following error is thrown whenever the query id is overwritten and cannot be found.

Screen Shot 2021-05-10 at 3 54 51 PM

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #14579 (bc540ac) into master (0fe2bf1) will decrease coverage by 0.23%.
The diff coverage is 100.00%.

❗ Current head bc540ac differs from pull request most recent head 4e44fab. Consider uploading reports for the commit 4e44fab to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14579      +/-   ##
==========================================
- Coverage   77.40%   77.16%   -0.24%     
==========================================
  Files         958      958              
  Lines       48326    48327       +1     
  Branches     5677     5677              
==========================================
- Hits        37405    37291     -114     
- Misses      10721    10836     +115     
  Partials      200      200              
Flag Coverage Δ
hive ?
javascript 72.47% <100.00%> (+<0.01%) ⬆️
presto ?

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

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/actions/sqlLab.js 58.97% <ø> (ø)
...rontend/src/explore/components/optionRenderers.tsx 100.00% <ø> (ø)
superset/examples/country_map.py 26.31% <ø> (ø)
superset-frontend/src/components/Badge/index.tsx 100.00% <100.00%> (ø)
.../components/Header/HeaderActionsDropdown/index.jsx 68.42% <100.00%> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 70.32% <0.00%> (-17.08%) ⬇️
superset/db_engine_specs/presto.py 83.36% <0.00%> (-6.53%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 88.37% <0.00%> (-1.70%) ⬇️
... and 4 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 0fe2bf1...4e44fab. Read the comment docs.

@hughhhh hughhhh changed the title bug: properly keep state on queryEditorSetSql on tabstateview PUT fix: properly keep state on queryEditorSetSql on tabstateview PUT May 12, 2021
@hughhhh hughhhh marked this pull request as ready for review May 12, 2021 01:06
@hughhhh
Copy link
Member Author

hughhhh commented May 12, 2021

/testenv up

1 similar comment
@hughhhh
Copy link
Member Author

hughhhh commented May 12, 2021

/testenv up

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hughhhh hughhhh merged commit 0d240c3 into master May 12, 2021
@github-actions
Copy link
Contributor

@hughhhh Ephemeral environment spinning up at http://54.201.154.143:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@github-actions
Copy link
Contributor

@hughhhh Ephemeral environment spinning up at http://35.167.148.245:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…ache#14579)

* send queryid up with setSQL

* pass latest query id

* update

* cleanup
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…ache#14579)

* send queryid up with setSQL

* pass latest query id

* update

* cleanup
@rusackas rusackas deleted the hugh/fix-set-query branch January 30, 2023 19:21
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…ache#14579)

* send queryid up with setSQL

* pass latest query id

* update

* cleanup
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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/XS 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants