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: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button #20363

Merged

Conversation

diegomedina248
Copy link
Contributor

@diegomedina248 diegomedina248 commented Jun 13, 2022

SUMMARY

The RightMenu currently uses the useQueryParam hook that needs a Provider to wrap it (much like the redux store provider, theme provider, etc).

Currently, we have more that one entry point (App.tsx/js) and they don't have the same structure.
Long term solution is to unify these into a single entry point, or at least, have the same provider structure for commonly used tools.

This PR enables the useQueryParam in said component if the router is available, and otherwise ignores it.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

--

TESTING INSTRUCTIONS

Ensure that, adding a database from the + menu works.
Ensure the explore loads correctly.

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

…if user connected database using the 'plus' button
@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #20363 (3e906bf) into master (cb2ffa5) will decrease coverage by 0.10%.
The diff coverage is 86.95%.

❗ Current head 3e906bf differs from pull request most recent head 86e5b19. Consider uploading reports for the commit 86e5b19 to get more accurate results

@@            Coverage Diff             @@
##           master   #20363      +/-   ##
==========================================
- Coverage   66.63%   66.53%   -0.11%     
==========================================
  Files        1738     1739       +1     
  Lines       65078    65151      +73     
  Branches     6885     6901      +16     
==========================================
- Hits        43367    43346      -21     
- Misses      19963    20052      +89     
- Partials     1748     1753       +5     
Flag Coverage Δ
hive ?
javascript 51.73% <86.56%> (+0.05%) ⬆️
presto ?

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

Impacted Files Coverage Δ
superset-frontend/src/components/Icons/index.tsx 100.00% <ø> (ø)
superset-frontend/src/components/Timer/index.tsx 78.94% <ø> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 79.80% <ø> (ø)
...et-frontend/src/explore/controlPanels/sections.tsx 100.00% <ø> (ø)
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 57.14% <0.00%> (-0.96%) ⬇️
...ontend/src/views/CRUD/data/dataset/DatasetList.tsx 54.60% <0.00%> (-0.71%) ⬇️
superset/reports/commands/alert.py 96.55% <ø> (ø)
superset/connectors/sqla/utils.py 88.63% <62.50%> (-2.62%) ⬇️
...plore/components/controls/VizTypeControl/index.tsx 73.07% <66.66%> (-6.93%) ⬇️
...onents/controls/VizTypeControl/FastVizSwitcher.tsx 89.58% <89.58%> (ø)
... and 22 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 cb2ffa5...86e5b19. Read the comment docs.

Copy link
Member

@AAfghahi AAfghahi left a comment

Choose a reason for hiding this comment

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

This is good! But I think that we should include a test with the plus button to make sure that it is working.

@AAfghahi AAfghahi added the need:qa-review Requires QA review label Jun 13, 2022
@AAfghahi
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

@prosdev0107
Copy link
Contributor

LGTM!

return <RightMenu setQuery={setQuery} {...props} />;
};

class RightMenuErrorWrapper extends React.PureComponent<RightMenuProps> {
Copy link
Member

Choose a reason for hiding this comment

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

Can we add some comments here? Others may be curious as to why an additional error wrapper is needed.

@rusackas rusackas merged commit ead1040 into apache:master Jun 14, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@rusackas rusackas mentioned this pull request Jun 14, 2022
3 tasks
@mistercrunch mistercrunch added 🏷️ 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 need:qa-review Requires QA review Preset-Patch size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants