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

chore!: turn on Versioned Export in config.py #19142

Merged
merged 4 commits into from
Mar 17, 2022

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Mar 14, 2022

SUMMARY

This PR turns the Versioned Export flag to true, this is a breaking change for superset 2.0

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

@superset-github-bot superset-github-bot bot added the Superset-Community-Partners Preset community partner program participants label Mar 14, 2022
@AAfghahi AAfghahi force-pushed the ch37714_versionedExport branch 2 times, most recently from fd95ab3 to 1f6804e Compare March 14, 2022 20:37
@AAfghahi AAfghahi removed the Superset-Community-Partners Preset community partner program participants label Mar 14, 2022
UPDATING.md Outdated
@@ -37,6 +37,7 @@ assists people when migrating to a new version.
- [18970](https://github.com/apache/superset/pull/18970): Changes feature
flag for the legacy datasource editor (DISABLE_LEGACY_DATASOURCE_EDITOR) in config.py to True, thus disabling the feature from being shown in the client.
- [19017](https://github.com/apache/superset/pull/19017): Removes Python 3.7 support.
- [19142](https://github.com/apache/superset/pull/19142): Changes feature flag for versioned export(VERSIONED_EXPORT) to be true, depreciating older api endpoints.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- [19142](https://github.com/apache/superset/pull/19142): Changes feature flag for versioned export(VERSIONED_EXPORT) to be true, depreciating older api endpoints.
- [19142](https://github.com/apache/superset/pull/19142): Changes feature flag for versioned export (VERSIONED_EXPORT) to be true, deprecating older api endpoints.

Copy link
Member

Choose a reason for hiding this comment

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

This is still unresolved. :)

@@ -407,7 +407,7 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]:
"DASHBOARD_NATIVE_FILTERS_SET": False,
"DASHBOARD_FILTERS_EXPERIMENTAL": False,
"GLOBAL_ASYNC_QUERIES": False,
"VERSIONED_EXPORT": False,
"VERSIONED_EXPORT": True,
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@eschutho eschutho added v2.0 risk:breaking-change Issues or PRs that will introduce breaking changes labels Mar 15, 2022
@eschutho eschutho changed the title chore: turn on Versioned Export in config.py chore!: turn on Versioned Export in config.py Mar 15, 2022
@@ -335,111 +283,6 @@ def test_import_datasets_versioned_export(import_datasets_command, app_context,
import_datasets_command.assert_called_with(expected_contents, overwrite=True)


@mock.patch.dict(
"superset.config.DEFAULT_FEATURE_FLAGS", {"VERSIONED_EXPORT": False}, clear=True
Copy link
Member

Choose a reason for hiding this comment

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

Try superset.cli.lib.feature_flag instead of superset.config.DEFAULT_FEATURE_FLAGS

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.

Talked offline, let's keep the unit tests.

@pull-request-size pull-request-size bot added size/S and removed size/L labels Mar 15, 2022
@AAfghahi AAfghahi force-pushed the ch37714_versionedExport branch 4 times, most recently from c6e73fb to 8e5aa9a Compare March 15, 2022 20:31
@AAfghahi AAfghahi force-pushed the ch37714_versionedExport branch 3 times, most recently from 89bd40b to 49cfe3b Compare March 16, 2022 18:59
@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #19142 (62a9e60) into master (e3e03d2) will increase coverage by 0.01%.
The diff coverage is 82.33%.

❗ Current head 62a9e60 differs from pull request most recent head 59bc37d. Consider uploading reports for the commit 59bc37d to get more accurate results

@@            Coverage Diff             @@
##           master   #19142      +/-   ##
==========================================
+ Coverage   66.55%   66.56%   +0.01%     
==========================================
  Files        1646     1668      +22     
  Lines       63617    64280     +663     
  Branches     6471     6496      +25     
==========================================
+ Hits        42339    42790     +451     
- Misses      19600    19808     +208     
- Partials     1678     1682       +4     
Flag Coverage Δ
hive ?
mysql 81.95% <89.33%> (+0.08%) ⬆️
postgres 82.00% <89.33%> (+0.07%) ⬆️
presto ?
python 82.08% <89.33%> (-0.27%) ⬇️
sqlite 81.75% <89.33%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
...d/src/SqlLab/components/AceEditorWrapper/index.tsx 44.82% <0.00%> (-8.75%) ⬇️
...frontend/src/SqlLab/components/SqlEditor/index.jsx 50.84% <ø> (ø)
...erset-frontend/src/components/AnchorLink/index.jsx 80.00% <ø> (ø)
...frontend/src/components/TimezoneSelector/index.tsx 96.87% <ø> (-0.10%) ⬇️
.../components/Header/HeaderActionsDropdown/index.jsx 71.42% <ø> (-0.51%) ⬇️
...dashboard/components/SliceHeaderControls/index.tsx 66.66% <ø> (ø)
...nd/src/dashboard/components/gridComponents/Tab.jsx 80.48% <ø> (ø)
...rontend/src/dashboard/containers/DashboardPage.tsx 5.68% <0.00%> (-0.35%) ⬇️
.../explore/components/ExploreViewContainer/index.jsx 56.99% <0.00%> (ø)
...mponents/controls/AnnotationLayerControl/index.jsx 10.16% <0.00%> (ø)
... and 154 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 e3e03d2...59bc37d. Read the comment docs.

@@ -1346,7 +1346,9 @@ def test_export(self):
# freeze time to ensure filename is deterministic
with freeze_time("2020-01-01T00:00:00Z"):
rv = self.get_assert_metric(uri, "export")
headers = generate_download_headers("json")["Content-Disposition"]
headers = generate_download_headers(
Copy link
Member

Choose a reason for hiding this comment

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

Can you leave this test unmodified and make it run with the feature flag off?

    @patch.dict(
        "superset.extensions.feature_flag_manager._feature_flags",
        {"VERSIONED_EXPORT": False},
        clear=True,
)

And maybe remove the feature flag patch from the test_export_bundle test below on line 1406.

Copy link
Member Author

Choose a reason for hiding this comment

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

Went through and removed this feature flag patch when set to true for a couple of tests.

UPDATING.md Outdated
@@ -37,6 +37,7 @@ assists people when migrating to a new version.
- [18970](https://github.com/apache/superset/pull/18970): Changes feature
flag for the legacy datasource editor (DISABLE_LEGACY_DATASOURCE_EDITOR) in config.py to True, thus disabling the feature from being shown in the client.
- [19017](https://github.com/apache/superset/pull/19017): Removes Python 3.7 support.
- [19142](https://github.com/apache/superset/pull/19142): Changes feature flag for versioned export(VERSIONED_EXPORT) to be true, depreciating older api endpoints.
Copy link
Member

Choose a reason for hiding this comment

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

This is still unresolved. :)

@AAfghahi AAfghahi merged commit c345029 into apache:master Mar 17, 2022
@sfirke sfirke mentioned this pull request Sep 1, 2023
9 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 risk:breaking-change Issues or PRs that will introduce breaking changes size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants