You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/11/24 23:24:35 UTC
[GitHub] [incubator-superset] betodealmeida opened a new pull request #11803: feat: handle new export in CLI
betodealmeida opened a new pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
This PR adds the new export functionality to the `superset` CLI, when the `VERSIONED_EXPORT` feature flag is enabled.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
N/A
### TEST PLAN
<!--- What steps should be taken to verify the changes -->
In progress
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543898622
##########
File path: superset/cli.py
##########
@@ -40,6 +41,14 @@
logger = logging.getLogger(__name__)
+feature_flags = config.DEFAULT_FEATURE_FLAGS.copy()
+feature_flags.update(config.FEATURE_FLAGS)
+feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
+if feature_flags_func:
+ # pylint: disable=not-callable
+ feature_flags = feature_flags_func(feature_flags)
Review comment:
This breaks the CLI when `feature_flags_func` uses `g.user` or any other app context based variables.
```
RuntimeError: Working outside of application context.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
betodealmeida commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r544756228
##########
File path: superset/cli.py
##########
@@ -40,6 +41,14 @@
logger = logging.getLogger(__name__)
+feature_flags = config.DEFAULT_FEATURE_FLAGS.copy()
+feature_flags.update(config.FEATURE_FLAGS)
+feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
+if feature_flags_func:
+ # pylint: disable=not-callable
+ feature_flags = feature_flags_func(feature_flags)
Review comment:
I added a quick workaround in #12088.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (88d9c9d) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.54%`.
> The diff coverage is `25.17%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.67% -2.55%
==========================================
Files 937 952 +15
Lines 45325 46751 +1426
Branches 4341 4578 +237
==========================================
- Hits 30016 29769 -247
- Misses 15177 16798 +1621
- Partials 132 184 +52
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `62.69% <ø> (-0.30%)` | :arrow_down: |
| python | `64.26% <25.17%> (+0.07%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.26% <25.17%> (-5.27%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [229 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...88d9c9d](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543901618
##########
File path: superset/cli.py
##########
@@ -40,6 +41,14 @@
logger = logging.getLogger(__name__)
+feature_flags = config.DEFAULT_FEATURE_FLAGS.copy()
+feature_flags.update(config.FEATURE_FLAGS)
+feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
+if feature_flags_func:
+ # pylint: disable=not-callable
+ feature_flags = feature_flags_func(feature_flags)
Review comment:
I think we can just always add the command but do nothing or throw a warning is a feature is not turned on, then we can use the default `feature_flag_manager` as normal.
The part where you initialize feature flags differently is probably not needed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (4911039) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `13.10%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
===========================================
- Coverage 66.22% 53.11% -13.11%
===========================================
Files 937 438 -499
Lines 45325 15714 -29611
Branches 4341 4060 -281
===========================================
- Hits 30016 8347 -21669
+ Misses 15177 7367 -7810
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `53.11% <ø> (+8.75%)` | :arrow_up: |
| javascript | `?` | |
| python | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...ontend/src/dashboard/util/getDashboardFilterKey.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZEZpbHRlcktleS50cw==) | `14.28% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9xdWVyeS9RdWVyeVByZXZpZXdNb2RhbC50c3g=) | `14.70% <0.00%> (-82.97%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/welcome/EmptyState.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9FbXB0eVN0YXRlLnRzeA==) | `5.71% <0.00%> (-82.10%)` | :arrow_down: |
| [...et-frontend/src/SqlLab/components/TableElement.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1RhYmxlRWxlbWVudC5qc3g=) | `4.70% <0.00%> (-81.35%)` | :arrow_down: |
| ... and [833 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...4911039](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (88d9c9d) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.45%`.
> The diff coverage is `25.17%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.76% -2.46%
==========================================
Files 937 952 +15
Lines 45325 46751 +1426
Branches 4341 4578 +237
==========================================
- Hits 30016 29812 -204
- Misses 15177 16755 +1578
- Partials 132 184 +52
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `62.69% <ø> (-0.30%)` | :arrow_down: |
| python | `64.41% <25.17%> (+0.21%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.26% <25.17%> (-5.27%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [227 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...88d9c9d](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] betodealmeida merged pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
betodealmeida merged pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r531570891
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
Review comment:
```python
[dashboard.id for dashboard in db.session.query(Dashboard.id).all()]
```
is clearer, but no strong opinions about it
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
betodealmeida commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r531738405
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
Review comment:
@dpgaspar do you mean?
```python
[dashboard.id for dashboard in db.session.query(Dashboard).all()]
```
That's a more expensive query (`SELECT * FROM dbs` instead of `SELECT id FROM dbs`), no?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io commented on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (49b2c3a) into [master](https://codecov.io/gh/apache/incubator-superset/commit/9b68b65568d24a0812ce35f949b0b026b3466864?el=desc) (9b68b65) will **decrease** coverage by `0.93%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.64% 62.70% -0.94%
==========================================
Files 448 448
Lines 27567 27592 +25
==========================================
- Hits 17544 17302 -242
- Misses 10023 10290 +267
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `62.70% <15.15%> (-0.94%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `84.33% <0.00%> (-6.43%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.59% <0.00%> (-3.27%)` | :arrow_down: |
| ... and [12 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [9b68b65...49b2c3a](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (88d9c9d) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.68%`.
> The diff coverage is `25.17%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.53% -2.69%
==========================================
Files 937 471 -466
Lines 45325 29075 -16250
Branches 4341 0 -4341
==========================================
- Hits 30016 18474 -11542
+ Misses 15177 10601 -4576
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.53% <25.17%> (-0.66%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.26% <25.17%> (-5.27%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/examples/energy.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvZW5lcmd5LnB5) | `27.50% <0.00%> (-72.50%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `32.65% <0.00%> (-59.19%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `59.64% <0.00%> (-22.81%)` | :arrow_down: |
| [superset/dashboards/commands/export.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9leHBvcnQucHk=) | `78.00% <0.00%> (-13.18%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.95% <0.00%> (-12.45%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| ... and [548 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...88d9c9d](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
betodealmeida commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r530109641
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dashboard_export_{timestamp}"
+ dashboard_file = dashboard_file or f"{root}.zip"
Review comment:
I played with click trying to have options depend on the feature flag, but couldn't get it to work since it depends on the app context. Let me give it another try.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (4911039) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `13.58%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
===========================================
- Coverage 66.22% 52.64% -13.59%
===========================================
Files 937 438 -499
Lines 45325 15714 -29611
Branches 4341 4060 -281
===========================================
- Hits 30016 8272 -21744
+ Misses 15177 7442 -7735
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `52.64% <ø> (+8.27%)` | :arrow_up: |
| javascript | `?` | |
| python | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...ontend/src/dashboard/util/getDashboardFilterKey.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZEZpbHRlcktleS50cw==) | `14.28% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9xdWVyeS9RdWVyeVByZXZpZXdNb2RhbC50c3g=) | `14.70% <0.00%> (-82.97%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/welcome/EmptyState.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9FbXB0eVN0YXRlLnRzeA==) | `5.71% <0.00%> (-82.10%)` | :arrow_down: |
| [...et-frontend/src/SqlLab/components/TableElement.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1RhYmxlRWxlbWVudC5qc3g=) | `4.70% <0.00%> (-81.35%)` | :arrow_down: |
| ... and [834 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...4911039](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (ca172f7) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.78%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.43% -2.79%
==========================================
Files 937 465 -472
Lines 45325 28604 -16721
Branches 4341 0 -4341
==========================================
- Hits 30016 18145 -11871
+ Misses 15177 10459 -4718
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.43% <24.65%> (-0.77%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.95% <0.00%> (-12.45%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.22% <0.00%> (-1.64%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.24% <0.00%> (-0.47%)` | :arrow_down: |
| ... and [473 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...ca172f7](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (0a0d446) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `3.01%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.21% -3.02%
==========================================
Files 937 465 -472
Lines 45325 28602 -16723
Branches 4341 0 -4341
==========================================
- Hits 30016 18080 -11936
+ Misses 15177 10522 -4655
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.21% <24.65%> (-0.99%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `84.35% <0.00%> (-6.42%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| ... and [484 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...0a0d446](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
betodealmeida commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r530109277
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
Review comment:
I think without the `()` it's easy to overlook what's happening:
```python
dashboard_ids = [id_ for id_, in db.session.query(Dashboard.id).all()]
```
Adding parentheses make the intent more clear, IMHO.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (f93056e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `0.03%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 63.38% -0.04%
==========================================
Files 906 906
Lines 43988 44015 +27
Branches 4221 4221
==========================================
+ Hits 27897 27898 +1
- Misses 15912 15938 +26
Partials 179 179
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `62.95% <ø> (ø)` | |
| python | `63.63% <15.15%> (-0.06%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...f93056e](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543898622
##########
File path: superset/cli.py
##########
@@ -40,6 +41,14 @@
logger = logging.getLogger(__name__)
+feature_flags = config.DEFAULT_FEATURE_FLAGS.copy()
+feature_flags.update(config.FEATURE_FLAGS)
+feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
+if feature_flags_func:
+ # pylint: disable=not-callable
+ feature_flags = feature_flags_func(feature_flags)
Review comment:
This breaks the CLI when `feature_flags_func` uses `g.user` or any other app context based variables, which seems to be the original intention of `GET_FEATURE_FLAGS_FUNC`.
```
RuntimeError: Working outside of application context.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (6f69ffc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `8.88%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 54.53% -8.89%
==========================================
Files 906 411 -495
Lines 43988 14576 -29412
Branches 4221 3747 -474
==========================================
- Hits 27897 7949 -19948
+ Misses 15912 6627 -9285
+ Partials 179 0 -179
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `54.53% <ø> (?)` | |
| javascript | `?` | |
| python | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...ontend/src/dashboard/util/getDashboardFilterKey.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZEZpbHRlcktleS50cw==) | `14.28% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9xdWVyeS9RdWVyeVByZXZpZXdNb2RhbC50c3g=) | `14.70% <0.00%> (-82.97%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/welcome/EmptyState.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9FbXB0eVN0YXRlLnRzeA==) | `5.71% <0.00%> (-82.10%)` | :arrow_down: |
| [...et-frontend/src/components/ListView/ActionsBar.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvQWN0aW9uc0Jhci50c3g=) | `11.11% <0.00%> (-81.20%)` | :arrow_down: |
| ... and [818 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...6f69ffc](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (ca172f7) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.95%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.27% -2.96%
==========================================
Files 937 937
Lines 45325 45377 +52
Branches 4341 4341
==========================================
- Hits 30016 28711 -1305
- Misses 15177 16489 +1312
- Partials 132 177 +45
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `62.99% <ø> (ø)` | |
| python | `63.43% <24.65%> (-0.77%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [140 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...ca172f7](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (f93056e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `0.15%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 63.26% -0.16%
==========================================
Files 906 449 -457
Lines 43988 27660 -16328
Branches 4221 0 -4221
==========================================
- Hits 27897 17498 -10399
+ Misses 15912 10162 -5750
+ Partials 179 0 -179
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `?` | |
| python | `63.26% <15.15%> (-0.44%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
| [superset/views/base\_api.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.61% <0.00%> (-0.48%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
| [...t-frontend/src/dashboard/util/setPeriodicRunner.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL3NldFBlcmlvZGljUnVubmVyLnRz) | | |
| [.../src/dashboard/components/menu/PopoverDropdown.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL21lbnUvUG9wb3ZlckRyb3Bkb3duLmpzeA==) | | |
| [...hboard/components/filterscope/FilterScopeModal.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2ZpbHRlcnNjb3BlL0ZpbHRlclNjb3BlTW9kYWwuanN4) | | |
| [superset-frontend/src/modules/utils.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL21vZHVsZXMvdXRpbHMuanM=) | | |
| [superset-frontend/src/profile/App.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Byb2ZpbGUvQXBwLnRzeA==) | | |
| ... and [452 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...f93056e](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (88d9c9d) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.42%`.
> The diff coverage is `25.17%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.79% -2.43%
==========================================
Files 937 952 +15
Lines 45325 46751 +1426
Branches 4341 4578 +237
==========================================
- Hits 30016 29827 -189
- Misses 15177 16740 +1563
- Partials 132 184 +52
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `62.69% <ø> (-0.30%)` | :arrow_down: |
| python | `64.46% <25.17%> (+0.27%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.26% <25.17%> (-5.27%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [226 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...88d9c9d](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543191578
##########
File path: superset/cli.py
##########
@@ -212,180 +221,305 @@ def refresh_druid(datasource: str, merge: bool) -> None:
session.commit()
-@superset.command()
-@with_appcontext
-@click.option(
- "--path",
- "-p",
- help="Path to a single JSON file or path containing multiple JSON "
- "files to import (*.json)",
-)
-@click.option(
- "--recursive",
- "-r",
- is_flag=True,
- default=False,
- help="recursively search the path for json files",
-)
-@click.option(
- "--username",
- "-u",
- default=None,
- help="Specify the user name to assign dashboards to",
-)
-def import_dashboards(path: str, recursive: bool, username: str) -> None:
- """Import dashboards from JSON"""
- from superset.dashboards.commands.importers.dispatcher import (
- ImportDashboardsCommand,
- )
-
- path_object = Path(path)
- files: List[Path] = []
- if path_object.is_file():
- files.append(path_object)
- elif path_object.exists() and not recursive:
- files.extend(path_object.glob("*.json"))
- elif path_object.exists() and recursive:
- files.extend(path_object.rglob("*.json"))
- if username is not None:
- g.user = security_manager.find_user(username=username)
- contents = {path.name: open(path).read() for path in files}
- try:
- ImportDashboardsCommand(contents).run()
- except Exception: # pylint: disable=broad-except
- logger.exception("Error when importing dashboard")
+if feature_flags.get("VERSIONED_EXPORT"):
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--dashboard-file",
+ "-f",
+ default="dashboard_export_YYYYMMDDTHHMMSS",
+ help="Specify the the file to export to",
+ )
+ def export_dashboards(dashboard_file: Optional[str]) -> None:
+ """Export dashboards to ZIP file"""
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dashboard_export_{timestamp}"
+ dashboard_file = dashboard_file or f"{root}.zip"
+
+ with ZipFile(dashboard_file, "w") as bundle:
+ for file_name, file_content in ExportDashboardsCommand(dashboard_ids).run():
+ with bundle.open(f"{root}/{file_name}", "w") as fp:
+ fp.write(file_content.encode())
+
+ # pylint: disable=too-many-locals
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--datasource-file",
+ "-f",
+ default="dataset_export_YYYYMMDDTHHMMSS",
+ help="Specify the the file to export to",
+ )
+ def export_datasources(datasource_file: Optional[str]) -> None:
+ """Export datasources to ZIP file"""
+ from superset.connectors.sqla.models import SqlaTable
+ from superset.datasets.commands.export import ExportDatasetsCommand
+
+ g.user = security_manager.find_user(username="admin")
+
+ dataset_ids = [id_ for (id_,) in db.session.query(SqlaTable.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dataset_export_{timestamp}"
+ datasource_file = datasource_file or f"{root}.zip"
+
+ with ZipFile(datasource_file, "w") as bundle:
+ for file_name, file_content in ExportDatasetsCommand(dataset_ids).run():
+ with bundle.open(f"{root}/{file_name}", "w") as fp:
+ fp.write(file_content.encode())
Review comment:
We could try except and surface a prettier message to the user's in case somethings goes wrong
##########
File path: superset/cli.py
##########
@@ -212,180 +221,305 @@ def refresh_druid(datasource: str, merge: bool) -> None:
session.commit()
-@superset.command()
-@with_appcontext
-@click.option(
- "--path",
- "-p",
- help="Path to a single JSON file or path containing multiple JSON "
- "files to import (*.json)",
-)
-@click.option(
- "--recursive",
- "-r",
- is_flag=True,
- default=False,
- help="recursively search the path for json files",
-)
-@click.option(
- "--username",
- "-u",
- default=None,
- help="Specify the user name to assign dashboards to",
-)
-def import_dashboards(path: str, recursive: bool, username: str) -> None:
- """Import dashboards from JSON"""
- from superset.dashboards.commands.importers.dispatcher import (
- ImportDashboardsCommand,
- )
-
- path_object = Path(path)
- files: List[Path] = []
- if path_object.is_file():
- files.append(path_object)
- elif path_object.exists() and not recursive:
- files.extend(path_object.glob("*.json"))
- elif path_object.exists() and recursive:
- files.extend(path_object.rglob("*.json"))
- if username is not None:
- g.user = security_manager.find_user(username=username)
- contents = {path.name: open(path).read() for path in files}
- try:
- ImportDashboardsCommand(contents).run()
- except Exception: # pylint: disable=broad-except
- logger.exception("Error when importing dashboard")
+if feature_flags.get("VERSIONED_EXPORT"):
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--dashboard-file",
+ "-f",
+ default="dashboard_export_YYYYMMDDTHHMMSS",
+ help="Specify the the file to export to",
+ )
+ def export_dashboards(dashboard_file: Optional[str]) -> None:
+ """Export dashboards to ZIP file"""
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dashboard_export_{timestamp}"
+ dashboard_file = dashboard_file or f"{root}.zip"
+
+ with ZipFile(dashboard_file, "w") as bundle:
+ for file_name, file_content in ExportDashboardsCommand(dashboard_ids).run():
+ with bundle.open(f"{root}/{file_name}", "w") as fp:
+ fp.write(file_content.encode())
+
+ # pylint: disable=too-many-locals
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--datasource-file",
+ "-f",
+ default="dataset_export_YYYYMMDDTHHMMSS",
+ help="Specify the the file to export to",
+ )
+ def export_datasources(datasource_file: Optional[str]) -> None:
+ """Export datasources to ZIP file"""
+ from superset.connectors.sqla.models import SqlaTable
+ from superset.datasets.commands.export import ExportDatasetsCommand
+
+ g.user = security_manager.find_user(username="admin")
+
+ dataset_ids = [id_ for (id_,) in db.session.query(SqlaTable.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dataset_export_{timestamp}"
+ datasource_file = datasource_file or f"{root}.zip"
+
+ with ZipFile(datasource_file, "w") as bundle:
+ for file_name, file_content in ExportDatasetsCommand(dataset_ids).run():
+ with bundle.open(f"{root}/{file_name}", "w") as fp:
+ fp.write(file_content.encode())
+
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--path", "-p", help="Path to a single ZIP file",
+ )
+ @click.option(
+ "--username",
+ "-u",
+ default=None,
+ help="Specify the user name to assign dashboards to",
+ )
+ def import_dashboards(path: str, username: Optional[str]) -> None:
+ """Import dashboards from ZIP file"""
+ from superset.dashboards.commands.importers.dispatcher import (
+ ImportDashboardsCommand,
+ )
-@superset.command()
-@with_appcontext
-@click.option(
- "--dashboard-file", "-f", default=None, help="Specify the the file to export to"
-)
-@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
-)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
- """Export dashboards to JSON"""
- from superset.utils import dashboard_import_export
-
- data = dashboard_import_export.export_dashboards(db.session)
- if print_stdout or not dashboard_file:
- print(data)
- if dashboard_file:
- logger.info("Exporting dashboards to %s", dashboard_file)
- with open(dashboard_file, "w") as data_stream:
- data_stream.write(data)
+ if username is not None:
+ g.user = security_manager.find_user(username=username)
+ contents = {path: open(path).read()}
+ try:
+ ImportDashboardsCommand(contents).run()
+ except Exception: # pylint: disable=broad-except
+ logger.exception("Error when importing dashboard")
Review comment:
since this is a cli, could be better to print a nicer message to the user
##########
File path: superset/cli.py
##########
@@ -212,180 +221,305 @@ def refresh_druid(datasource: str, merge: bool) -> None:
session.commit()
-@superset.command()
-@with_appcontext
-@click.option(
- "--path",
- "-p",
- help="Path to a single JSON file or path containing multiple JSON "
- "files to import (*.json)",
-)
-@click.option(
- "--recursive",
- "-r",
- is_flag=True,
- default=False,
- help="recursively search the path for json files",
-)
-@click.option(
- "--username",
- "-u",
- default=None,
- help="Specify the user name to assign dashboards to",
-)
-def import_dashboards(path: str, recursive: bool, username: str) -> None:
- """Import dashboards from JSON"""
- from superset.dashboards.commands.importers.dispatcher import (
- ImportDashboardsCommand,
- )
-
- path_object = Path(path)
- files: List[Path] = []
- if path_object.is_file():
- files.append(path_object)
- elif path_object.exists() and not recursive:
- files.extend(path_object.glob("*.json"))
- elif path_object.exists() and recursive:
- files.extend(path_object.rglob("*.json"))
- if username is not None:
- g.user = security_manager.find_user(username=username)
- contents = {path.name: open(path).read() for path in files}
- try:
- ImportDashboardsCommand(contents).run()
- except Exception: # pylint: disable=broad-except
- logger.exception("Error when importing dashboard")
+if feature_flags.get("VERSIONED_EXPORT"):
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--dashboard-file",
+ "-f",
+ default="dashboard_export_YYYYMMDDTHHMMSS",
+ help="Specify the the file to export to",
+ )
+ def export_dashboards(dashboard_file: Optional[str]) -> None:
+ """Export dashboards to ZIP file"""
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dashboard_export_{timestamp}"
+ dashboard_file = dashboard_file or f"{root}.zip"
+
+ with ZipFile(dashboard_file, "w") as bundle:
+ for file_name, file_content in ExportDashboardsCommand(dashboard_ids).run():
+ with bundle.open(f"{root}/{file_name}", "w") as fp:
+ fp.write(file_content.encode())
+
+ # pylint: disable=too-many-locals
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--datasource-file",
+ "-f",
+ default="dataset_export_YYYYMMDDTHHMMSS",
+ help="Specify the the file to export to",
+ )
+ def export_datasources(datasource_file: Optional[str]) -> None:
+ """Export datasources to ZIP file"""
+ from superset.connectors.sqla.models import SqlaTable
+ from superset.datasets.commands.export import ExportDatasetsCommand
+
+ g.user = security_manager.find_user(username="admin")
+
+ dataset_ids = [id_ for (id_,) in db.session.query(SqlaTable.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dataset_export_{timestamp}"
+ datasource_file = datasource_file or f"{root}.zip"
+
+ with ZipFile(datasource_file, "w") as bundle:
+ for file_name, file_content in ExportDatasetsCommand(dataset_ids).run():
+ with bundle.open(f"{root}/{file_name}", "w") as fp:
+ fp.write(file_content.encode())
+
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--path", "-p", help="Path to a single ZIP file",
+ )
+ @click.option(
+ "--username",
+ "-u",
+ default=None,
+ help="Specify the user name to assign dashboards to",
+ )
+ def import_dashboards(path: str, username: Optional[str]) -> None:
+ """Import dashboards from ZIP file"""
+ from superset.dashboards.commands.importers.dispatcher import (
+ ImportDashboardsCommand,
+ )
-@superset.command()
-@with_appcontext
-@click.option(
- "--dashboard-file", "-f", default=None, help="Specify the the file to export to"
-)
-@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
-)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
- """Export dashboards to JSON"""
- from superset.utils import dashboard_import_export
-
- data = dashboard_import_export.export_dashboards(db.session)
- if print_stdout or not dashboard_file:
- print(data)
- if dashboard_file:
- logger.info("Exporting dashboards to %s", dashboard_file)
- with open(dashboard_file, "w") as data_stream:
- data_stream.write(data)
+ if username is not None:
+ g.user = security_manager.find_user(username=username)
+ contents = {path: open(path).read()}
+ try:
+ ImportDashboardsCommand(contents).run()
+ except Exception: # pylint: disable=broad-except
+ logger.exception("Error when importing dashboard")
+
+ @superset.command()
+ @with_appcontext
+ @click.option(
+ "--path",
+ "-p",
+ help="Path to a single YAML file or path containing multiple YAML "
+ "files to import (*.yaml or *.yml)",
+ )
+ @click.option(
+ "--sync",
+ "-s",
+ "sync",
+ default="",
+ help="comma seperated list of element types to synchronize "
+ 'e.g. "metrics,columns" deletes metrics and columns in the DB '
+ "that are not specified in the YAML file",
+ )
+ @click.option(
+ "--recursive",
+ "-r",
+ is_flag=True,
+ default=False,
+ help="recursively search the path for yaml files",
+ )
+ def import_datasources(path: str) -> None:
+ """Import datasources from ZIP file"""
+ from superset.datasets.commands.importers.dispatcher import (
+ ImportDatasetsCommand,
+ )
+ contents = {path: open(path).read()}
+ try:
+ ImportDatasetsCommand(contents).run()
+ except Exception: # pylint: disable=broad-except
+ logger.exception("Error when importing dataset")
Review comment:
same here, prettier message?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543190094
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
Review comment:
yes, but no, I mean the way I wrote it that would generate a `SELECT id from dbs` but it's just a detail, if you feel more comfortable unpacking the tuples the way you wrote got ahead.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (f93056e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `0.27%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 63.14% -0.28%
==========================================
Files 906 906
Lines 43988 44015 +27
Branches 4221 4221
==========================================
- Hits 27897 27795 -102
- Misses 15912 16041 +129
Partials 179 179
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `62.95% <ø> (ø)` | |
| python | `63.26% <15.15%> (-0.44%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
| [superset/views/base\_api.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.61% <0.00%> (-0.48%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...f93056e](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (ca172f7) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `3.10%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.12% -3.11%
==========================================
Files 937 465 -472
Lines 45325 28589 -16736
Branches 4341 0 -4341
==========================================
- Hits 30016 18046 -11970
+ Misses 15177 10543 -4634
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.12% <24.65%> (-1.08%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `32.65% <0.00%> (-59.19%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `59.64% <0.00%> (-22.81%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.95% <0.00%> (-12.45%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/dao.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `94.11% <0.00%> (-5.89%)` | :arrow_down: |
| ... and [494 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...ca172f7](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (ca172f7) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.91%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.30% -2.92%
==========================================
Files 937 937
Lines 45325 45377 +52
Branches 4341 4341
==========================================
- Hits 30016 28727 -1289
- Misses 15177 16473 +1296
- Partials 132 177 +45
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `62.99% <ø> (ø)` | |
| python | `63.49% <24.65%> (-0.71%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [138 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...ca172f7](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (6f69ffc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `8.28%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 55.13% -8.29%
==========================================
Files 906 411 -495
Lines 43988 14576 -29412
Branches 4221 3747 -474
==========================================
- Hits 27897 8036 -19861
+ Misses 15912 6540 -9372
+ Partials 179 0 -179
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `55.13% <ø> (?)` | |
| javascript | `?` | |
| python | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...ontend/src/dashboard/util/getDashboardFilterKey.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZEZpbHRlcktleS50cw==) | `14.28% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9xdWVyeS9RdWVyeVByZXZpZXdNb2RhbC50c3g=) | `14.70% <0.00%> (-82.97%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/welcome/EmptyState.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9FbXB0eVN0YXRlLnRzeA==) | `5.71% <0.00%> (-82.10%)` | :arrow_down: |
| [...et-frontend/src/components/ListView/ActionsBar.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvQWN0aW9uc0Jhci50c3g=) | `11.11% <0.00%> (-81.20%)` | :arrow_down: |
| ... and [819 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...6f69ffc](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (88d9c9d) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `1.95%`.
> The diff coverage is `25.17%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 64.26% -1.96%
==========================================
Files 937 471 -466
Lines 45325 29090 -16235
Branches 4341 0 -4341
==========================================
- Hits 30016 18696 -11320
+ Misses 15177 10394 -4783
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `64.26% <25.17%> (+0.07%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.26% <25.17%> (-5.27%)` | :arrow_down: |
| [superset/examples/energy.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvZW5lcmd5LnB5) | `27.50% <0.00%> (-72.50%)` | :arrow_down: |
| [superset/dashboards/commands/export.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9leHBvcnQucHk=) | `78.00% <0.00%> (-13.18%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `73.81% <0.00%> (-8.59%)` | :arrow_down: |
| [superset/views/alerts.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYWxlcnRzLnB5) | `75.00% <0.00%> (-4.42%)` | :arrow_down: |
| [superset/reports/commands/execute.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9leGVjdXRlLnB5) | `92.50% <0.00%> (-3.80%)` | :arrow_down: |
| [superset/exceptions.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhjZXB0aW9ucy5weQ==) | `92.00% <0.00%> (-3.35%)` | :arrow_down: |
| [superset/reports/commands/alert.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9hbGVydC5weQ==) | `88.67% <0.00%> (-3.33%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| ... and [529 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...88d9c9d](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (0a0d446) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `5.43%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 60.78% -5.44%
==========================================
Files 937 890 -47
Lines 45325 43473 -1852
Branches 4341 3825 -516
==========================================
- Hits 30016 26425 -3591
- Misses 15177 17048 +1871
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `55.10% <ø> (+10.73%)` | :arrow_up: |
| javascript | `?` | |
| python | `63.74% <24.65%> (-0.46%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...ontend/src/dashboard/util/getDashboardFilterKey.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZEZpbHRlcktleS50cw==) | `14.28% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9xdWVyeS9RdWVyeVByZXZpZXdNb2RhbC50c3g=) | `14.70% <0.00%> (-82.97%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/welcome/EmptyState.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9FbXB0eVN0YXRlLnRzeA==) | `5.71% <0.00%> (-82.10%)` | :arrow_down: |
| ... and [367 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...0a0d446](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (88d9c9d) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `1.95%`.
> The diff coverage is `25.17%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 64.26% -1.96%
==========================================
Files 937 471 -466
Lines 45325 29090 -16235
Branches 4341 0 -4341
==========================================
- Hits 30016 18695 -11321
+ Misses 15177 10395 -4782
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `64.26% <25.17%> (+0.06%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.26% <25.17%> (-5.27%)` | :arrow_down: |
| [superset/examples/energy.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvZW5lcmd5LnB5) | `27.50% <0.00%> (-72.50%)` | :arrow_down: |
| [superset/dashboards/commands/export.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9leHBvcnQucHk=) | `78.00% <0.00%> (-13.18%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `73.81% <0.00%> (-8.59%)` | :arrow_down: |
| [superset/views/alerts.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYWxlcnRzLnB5) | `75.00% <0.00%> (-4.42%)` | :arrow_down: |
| [superset/reports/commands/execute.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9leGVjdXRlLnB5) | `92.50% <0.00%> (-3.80%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/exceptions.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhjZXB0aW9ucy5weQ==) | `92.00% <0.00%> (-3.35%)` | :arrow_down: |
| [superset/reports/commands/alert.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9hbGVydC5weQ==) | `88.67% <0.00%> (-3.33%)` | :arrow_down: |
| ... and [530 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...88d9c9d](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (f93056e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `0.03%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 63.38% -0.04%
==========================================
Files 906 906
Lines 43988 44015 +27
Branches 4221 4221
==========================================
Hits 27897 27897
- Misses 15912 15939 +27
Partials 179 179
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `62.95% <ø> (ø)` | |
| python | `63.62% <15.15%> (-0.07%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
| [superset/views/base\_api.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.61% <0.00%> (-0.48%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...f93056e](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (0a0d446) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.48%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.74% -2.49%
==========================================
Files 937 465 -472
Lines 45325 28602 -16723
Branches 4341 0 -4341
==========================================
- Hits 30016 18231 -11785
+ Misses 15177 10371 -4806
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.74% <24.65%> (-0.46%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.86% <0.00%> (-2.99%)` | :arrow_down: |
| [superset/datasets/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YXNldHMvYXBpLnB5) | `89.25% <0.00%> (-2.81%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `72.14% <0.00%> (-2.57%)` | :arrow_down: |
| ... and [481 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...0a0d446](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543898622
##########
File path: superset/cli.py
##########
@@ -40,6 +41,14 @@
logger = logging.getLogger(__name__)
+feature_flags = config.DEFAULT_FEATURE_FLAGS.copy()
+feature_flags.update(config.FEATURE_FLAGS)
+feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
+if feature_flags_func:
+ # pylint: disable=not-callable
+ feature_flags = feature_flags_func(feature_flags)
Review comment:
This breaks the CLI when `feature_flags_func` uses `g.user` or any other app context based variables, which seems to be the original intention of `GET_FEATURE_FLAGS_FUNC`.
```
RuntimeError: Working outside of application context.
```
cc @betodealmeida @dpgaspar
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r543901618
##########
File path: superset/cli.py
##########
@@ -40,6 +41,14 @@
logger = logging.getLogger(__name__)
+feature_flags = config.DEFAULT_FEATURE_FLAGS.copy()
+feature_flags.update(config.FEATURE_FLAGS)
+feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
+if feature_flags_func:
+ # pylint: disable=not-callable
+ feature_flags = feature_flags_func(feature_flags)
Review comment:
I think we can just always add the command but do nothing or throw a warning is a feature is not turned on, then we can use the default `feature_flag_manager` as normal.
The part where you initialize feature flags differently is probably not needed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (f93056e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `0.38%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 63.03% -0.39%
==========================================
Files 906 449 -457
Lines 43988 27649 -16339
Branches 4221 0 -4221
==========================================
- Hits 27897 17428 -10469
+ Misses 15912 10221 -5691
+ Partials 179 0 -179
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `?` | |
| python | `63.03% <15.15%> (-0.66%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-12.53%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.56% <0.00%> (-2.44%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.04% <0.00%> (-0.82%)` | :arrow_down: |
| [superset/views/base\_api.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.61% <0.00%> (-0.48%)` | :arrow_down: |
| ... and [462 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...f93056e](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] john-bodley commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r530086949
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
+ timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
+ root = f"dashboard_export_{timestamp}"
+ dashboard_file = dashboard_file or f"{root}.zip"
Review comment:
Should the default (fallback) be expressed as a click option?
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
Review comment:
You can drop the `()` if you want.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (0a0d446) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `5.63%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 60.58% -5.64%
==========================================
Files 937 890 -47
Lines 45325 43473 -1852
Branches 4341 3825 -516
==========================================
- Hits 30016 26338 -3678
- Misses 15177 17135 +1958
+ Partials 132 0 -132
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `54.51% <ø> (+10.15%)` | :arrow_up: |
| javascript | `?` | |
| python | `63.74% <24.65%> (-0.46%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...ontend/src/dashboard/util/getDashboardFilterKey.ts](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZEZpbHRlcktleS50cw==) | `14.28% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9xdWVyeS9RdWVyeVByZXZpZXdNb2RhbC50c3g=) | `14.70% <0.00%> (-82.97%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/welcome/EmptyState.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9FbXB0eVN0YXRlLnRzeA==) | `5.71% <0.00%> (-82.10%)` | :arrow_down: |
| ... and [368 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...0a0d446](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (f93056e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/501b9d47c5bce926d6a0de833e7345ee74cc34bf?el=desc) (501b9d4) will **decrease** coverage by `0.44%`.
> The diff coverage is `15.15%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 63.41% 62.97% -0.45%
==========================================
Files 906 449 -457
Lines 43988 27649 -16339
Branches 4221 0 -4221
==========================================
- Hits 27897 17413 -10484
+ Misses 15912 10236 -5676
+ Partials 179 0 -179
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `?` | |
| python | `62.97% <15.15%> (-0.72%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `37.50% <15.15%> (-3.04%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-12.53%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.56% <0.00%> (-2.44%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
| ... and [466 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [501b9d4...f93056e](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#issuecomment-733386753
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=h1) Report
> Merging [#11803](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=desc) (4315a6e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/14ea444e58dd88f01c54be6a8a3e0936d317d5da?el=desc) (14ea444) will **decrease** coverage by `2.64%`.
> The diff coverage is `24.65%`.
[](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11803 +/- ##
==========================================
- Coverage 66.22% 63.57% -2.65%
==========================================
Files 937 937
Lines 45325 45377 +52
Branches 4341 4341
==========================================
- Hits 30016 28849 -1167
- Misses 15177 16351 +1174
- Partials 132 177 +45
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `62.99% <ø> (ø)` | |
| python | `63.91% <24.65%> (-0.29%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/cli.py](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2xpLnB5) | `35.08% <24.65%> (-5.45%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [135 more](https://codecov.io/gh/apache/incubator-superset/pull/11803/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=footer). Last update [14ea444...0a0d446](https://codecov.io/gh/apache/incubator-superset/pull/11803?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #11803: feat: handle new export in CLI
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #11803:
URL: https://github.com/apache/incubator-superset/pull/11803#discussion_r531570891
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool, username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in db.session.query(Dashboard.id).all()]
Review comment:
```
[dashboard.id for dashboard in db.session.query(Dashboard.id).all()]
```
is clearer, but no strong opinions about it
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org