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(gsheets): bug fix for private sheets #17019

Merged

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Oct 7, 2021

SUMMARY

We weren't passing in impersonate_user as a payload in the front end so it was not allowing users to add private gsheets to datasets or to query them.

This also has a fix for a small 500 error that was occurring when editing a private gsheet. It was occurring because encrypted_extra is sometimes a string and sometimes a dict. I'm just running a simple check to make sure.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

Create a new private gsheet and add a service key.
Go to sql lab
Query it

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

@AAfghahi AAfghahi force-pushed the ch26823_gsheetsPrivateDataset branch 2 times, most recently from b581655 to acb8ed8 Compare October 7, 2021 17:07
@pull-request-size pull-request-size bot added size/XS and removed size/S labels Oct 7, 2021
@AAfghahi AAfghahi force-pushed the ch26823_gsheetsPrivateDataset branch from acb8ed8 to 3268727 Compare October 7, 2021 17:14
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Oct 7, 2021
@AAfghahi AAfghahi force-pushed the ch26823_gsheetsPrivateDataset branch from 3268727 to 0901e66 Compare October 7, 2021 17:19
@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #17019 (ff5581c) into master (03cdbac) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

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

@@            Coverage Diff             @@
##           master   #17019      +/-   ##
==========================================
- Coverage   76.72%   76.71%   -0.01%     
==========================================
  Files        1030     1030              
  Lines       55088    55090       +2     
  Branches     7480     7481       +1     
==========================================
  Hits        42264    42264              
- Misses      12573    12575       +2     
  Partials      251      251              
Flag Coverage Δ
javascript 70.89% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...c/views/CRUD/data/database/DatabaseModal/index.tsx 43.57% <0.00%> (-0.23%) ⬇️
superset/db_engine_specs/gsheets.py 75.00% <100.00%> (ø)

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 03cdbac...fc58b0d. Read the comment docs.

@AAfghahi AAfghahi force-pushed the ch26823_gsheetsPrivateDataset branch 2 times, most recently from 6019bdf to 2667ee2 Compare October 7, 2021 20:29
@AAfghahi AAfghahi force-pushed the ch26823_gsheetsPrivateDataset branch from 2667ee2 to fc58b0d Compare October 7, 2021 20:30
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.

@yousoph let's discuss user impersonation when we have the chance, and see if we should enable this by default for DBs that support it.

@betodealmeida betodealmeida merged commit e32a12f into apache:master Oct 8, 2021
@rosemarie-chiu
Copy link
Contributor

🏷 2021.40

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Oct 11, 2021
(cherry picked from commit e32a12f)
@eschutho eschutho added the v1.4 label Oct 26, 2021
eschutho pushed a commit to preset-io/superset that referenced this pull request Oct 27, 2021
(cherry picked from commit e32a12f)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels 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 preset:2021.40 size/S v1.4 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants