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

feat: support disabling domain sharding with a query param #17177

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Oct 21, 2021

SUMMARY

This is helpful to enable some iframing of dashboard use cases. Depending on your domain sharding setup, it may not work across origins, so this is a convenient workaround

TESTING INSTRUCTIONS

CI, manual verification

Note that no unit test was added because this function already is tightly integrated with the document and pulling data from it. This would require quite a large refactor to properly test the existing behavior, much less my newly added behavior

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

to: @kgabryje @graceguo-supercat @michael-s-molina @ktmud

@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #17177 (adf7795) into master (f580f6b) will increase coverage by 0.10%.
The diff coverage is 95.00%.

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

@@            Coverage Diff             @@
##           master   #17177      +/-   ##
==========================================
+ Coverage   76.83%   76.93%   +0.10%     
==========================================
  Files        1039     1039              
  Lines       55561    55583      +22     
  Branches     7570     7577       +7     
==========================================
+ Hits        42690    42764      +74     
+ Misses      12621    12569      -52     
  Partials      250      250              
Flag Coverage Δ
javascript 70.98% <92.30%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...nativeFilters/FiltersConfigModal/Footer/Footer.tsx 90.90% <0.00%> (-9.10%) ⬇️
superset/views/core.py 76.94% <ø> (ø)
superset-frontend/src/utils/hostNamesConfig.js 61.90% <75.00%> (+0.79%) ⬆️
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 87.71% <100.00%> (+0.81%) ⬆️
...d/src/dashboard/util/getLeafComponentIdFromPath.js 100.00% <100.00%> (ø)
.../src/explore/components/DataTableControl/index.tsx 98.18% <100.00%> (+0.18%) ⬆️
...nd/src/explore/components/DataTablesPane/index.tsx 85.71% <100.00%> (+10.22%) ⬆️
superset/config.py 91.50% <100.00%> (+0.02%) ⬆️
superset/connectors/base/models.py 88.25% <100.00%> (ø)
superset/connectors/druid/models.py 82.99% <100.00%> (ø)
... and 8 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 f580f6b...8e51ea8. Read the comment docs.

@etr2460
Copy link
Member Author

etr2460 commented Oct 21, 2021

/testenv up

@github-actions
Copy link
Contributor

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

@etr2460
Copy link
Member Author

etr2460 commented Oct 21, 2021

This is tested in our internal environment and we can verify that domain sharding is disabled when the query param is set

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

LGTM with one minor suggestion.

// don't do domain sharding if a certain query param is set
const disableDomainSharding =
new URLSearchParams(window.location.search).get('disableDomainSharding') ===
'1';
Copy link
Member

Choose a reason for hiding this comment

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

Why not just return even earlier so you don't even have to parse the bootstrapData?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@etr2460 etr2460 force-pushed the erik-ritter--disable-domain-sharding branch from 2e7067d to 8e51ea8 Compare October 21, 2021 18:26
@etr2460 etr2460 merged commit 80a459f into apache:master Oct 21, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
@mistercrunch mistercrunch added 🏷️ 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 size/S 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants