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: ensure validation for db modal for googlesheets #19018

Merged
merged 2 commits into from Mar 9, 2022

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Mar 3, 2022

SUMMARY

This pr fixes possibly fixes an issue where the validation for name or googlesheet api could be negated as truthy when trying to connect a gsheet. This is because the two of the same set state methods not separated by async method creating a race condition being returned from the hook.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

after

Screen.Recording.2022-03-03.at.3.39.31.PM.mov

TESTING INSTRUCTIONS

Go to gsheets database modal and try to connect a gsheet without name or url. It should not proceed to the next step without both being valid.

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

@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #19018 (d87934c) into master (150fd0d) will decrease coverage by 0.04%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19018      +/-   ##
==========================================
- Coverage   66.58%   66.54%   -0.05%     
==========================================
  Files        1641     1641              
  Lines       63524    63500      -24     
  Branches     6421     6441      +20     
==========================================
- Hits        42299    42255      -44     
- Misses      19548    19582      +34     
+ Partials     1677     1663      -14     
Flag Coverage Δ
javascript 51.28% <33.33%> (-0.10%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/views/CRUD/hooks.ts 47.15% <33.33%> (ø)
...ts/nativeFilters/FilterBar/FilterControls/utils.ts 25.00% <0.00%> (-45.00%) ⬇️
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 64.67% <0.00%> (-14.73%) ⬇️
...d/components/nativeFilters/FilterCard/ScopeRow.tsx 58.82% <0.00%> (-13.91%) ⬇️
...Filters/FilterBar/FilterControls/FilterControl.tsx 70.96% <0.00%> (-11.18%) ⬇️
...d/src/filters/components/Time/TimeFilterPlugin.tsx 47.05% <0.00%> (-9.20%) ⬇️
...tend/src/filters/components/Time/transformProps.ts 50.00% <0.00%> (-7.15%) ⬇️
...oard/components/nativeFilters/FilterCard/Styles.ts 80.00% <0.00%> (-4.62%) ⬇️
...mponents/nativeFilters/FiltersConfigModal/utils.ts 46.96% <0.00%> (-4.27%) ⬇️
...rset-frontend/src/explore/components/SaveModal.tsx 63.63% <0.00%> (-2.50%) ⬇️
... and 49 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 150fd0d...d87934c. Read the comment docs.

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Mar 4, 2022
@michael-s-molina
Copy link
Member

michael-s-molina commented Mar 7, 2022

@pkdotson Why is the whole screen re-rendering when you click on Connect and get a validation error? It's blinking and showing the loading indicator. Is it possible to improve this behavior?

@pkdotson
Copy link
Member Author

pkdotson commented Mar 8, 2022

@pkdotson Why is the whole screen re-rendering when you click on Connect and get a validation error? It's blinking and showing the loading indicator. Is it possible to improve this behavior?

Hi Michael I think this is just a combination of the connection being fast on my local and how it was originally designed. I'll bring this up to the team to see if this can be looked into.

@pkdotson
Copy link
Member Author

pkdotson commented Mar 8, 2022

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2022

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

@pkdotson pkdotson merged commit bb17dec into apache:master Mar 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2022

Ephemeral environment shutdown and build artifacts deleted.

villebro pushed a commit that referenced this pull request Apr 3, 2022
* fix: ensure validation for db modal for googlesheets

* chain async function

(cherry picked from commit bb17dec)
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 lts-v1 preset-io size/S 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants