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/04/16 08:38:31 UTC
[GitHub] [incubator-superset] ktmud opened a new pull request #9555: [Build]
Collect frontend code coverage from Cypress tests
ktmud opened a new pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555
### CATEGORY
- [x] Enhancement (new features, refinement)
- [x] Build / Development Environment
### SUMMARY
Collect frontend code coverage from Cypress tests and simplify flags for coverage reports.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Increased coverage on most JS files:
![Snip20200415_14](https://user-images.githubusercontent.com/335541/79432843-3bdbf100-7f81-11ea-95da-ae04c68ea069.png)
### TEST PLAN
Make sure CI passes and code coverage correctly reported.
### ADDITIONAL INFORMATION
- [x] Has associated issue: tested on https://github.com/ktmud/incubator-superset/pull/31
### REVIEWERS
@craig-rueda @kristw
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7b11b44abe08c131fb9df6ec479ea29c24c784ec&el=desc) will **decrease** coverage by `0.15%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
- Coverage 65.49% 65.34% -0.16%
==========================================
Files 571 571
Lines 29889 29889
Branches 3040 3040
==========================================
- Hits 19577 19532 -45
- Misses 10128 10173 +45
Partials 184 184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #postgres | `?` | |
| #python | `69.99% <ø> (-0.26%)` | :arrow_down: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `58.92% <0.00%> (-21.43%)` | :arrow_down: |
| [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `45.83% <0.00%> (-20.84%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `80.00% <0.00%> (-15.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `78.26% <0.00%> (-13.05%)` | :arrow_down: |
| [superset/views/database/api.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvYXBpLnB5) | `83.90% <0.00%> (-3.45%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `84.47% <0.00%> (-2.39%)` | :arrow_down: |
| [superset/security/manager.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `88.77% <0.00%> (-0.35%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <0.00%> (-0.23%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `86.06% <0.00%> (-0.16%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [7b11b44...e6c7c55](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7b11b44abe08c131fb9df6ec479ea29c24c784ec&el=desc) will **increase** coverage by `4.49%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.49% 69.99% +4.49%
==========================================
Files 571 182 -389
Lines 29889 17519 -12370
Branches 3040 0 -3040
==========================================
- Hits 19577 12262 -7315
+ Misses 10128 5257 -4871
+ Partials 184 0 -184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `?` | |
| #mysql | `?` | |
| #postgres | `?` | |
| #python | `69.99% <ø> (-0.26%)` | :arrow_down: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `58.92% <0.00%> (-21.43%)` | :arrow_down: |
| [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `45.83% <0.00%> (-20.84%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `80.00% <0.00%> (-15.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `78.26% <0.00%> (-13.05%)` | :arrow_down: |
| [superset/views/database/api.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvYXBpLnB5) | `83.90% <0.00%> (-3.45%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `84.47% <0.00%> (-2.39%)` | :arrow_down: |
| [superset/security/manager.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `88.77% <0.00%> (-0.35%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <0.00%> (-0.23%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `86.06% <0.00%> (-0.16%)` | :arrow_down: |
| [superset-frontend/src/explore/controlUtils.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFV0aWxzLmpz) | | |
| ... and [388 more](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [7b11b44...e6c7c55](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7b11b44abe08c131fb9df6ec479ea29c24c784ec&el=desc) will **decrease** coverage by `0.04%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
- Coverage 65.49% 65.45% -0.05%
==========================================
Files 571 571
Lines 29889 29889
Branches 3040 3040
==========================================
- Hits 19577 19565 -12
- Misses 10128 10140 +12
Partials 184 184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #postgres | `?` | |
| #python | `70.18% <ø> (-0.07%)` | :arrow_down: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `78.26% <0.00%> (-13.05%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.97% <0.00%> (-0.90%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <0.00%> (-0.23%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [7b11b44...e6c7c55](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409770394
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/load.js
##########
@@ -31,16 +31,12 @@ export default () =>
cy.get('#app').then(data => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
- const dashboardId = bootstrapData.dashboard_data.id;
const slices = bootstrapData.dashboard_data.slices;
// then define routes and create alias for each requests
slices.forEach(slice => {
const alias = `getJson_${slice.slice_id}`;
const formData = `{"slice_id":${slice.slice_id}}`;
- cy.route(
Review comment:
This test case only interacts with one dashboard. A more relaxed URL pattern makes it more resilient to future unsubstantial change. It also keeps the code simpler.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409387059
##########
File path: .github/workflows/bashlib.sh
##########
@@ -15,10 +15,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+set -e
+
+GITHUB_WORKSPACE=${GITHUB_WORKSPACE:-.}
+ASSETS_MANIFEST="$GITHUB_WORKSPACE/superset/static/assets/manifest.json"
# Echo only when not in parallel mode
say() {
- if [[ ${INPUT_PARALLEL^^} != 'TRUE' ]]; then
+ if [[ $(echo $INPUT_PARALLEL | tr a-z A-Z) != 'TRUE' ]]; then
Review comment:
Previous code works only on Bash 4.0+, which doesn't work on macOS. https://stackoverflow.com/questions/2264428/how-to-convert-a-string-to-lower-case-in-bash
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7b11b44abe08c131fb9df6ec479ea29c24c784ec&el=desc) will **increase** coverage by `4.58%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.49% 70.08% +4.58%
==========================================
Files 571 571
Lines 29889 29889
Branches 3040 3040
==========================================
+ Hits 19577 20948 +1371
+ Misses 10128 8823 -1305
+ Partials 184 118 -66
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `52.71% <ø> (?)` | |
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #postgres | `?` | |
| #python | `70.24% <ø> (ø)` | |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/SqlLab/actions/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `61.13% <0.00%> (+0.65%)` | :arrow_up: |
| [...erset-frontend/src/SqlLab/components/SqlEditor.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci5qc3g=) | `53.84% <0.00%> (+1.28%)` | :arrow_up: |
| [superset-frontend/src/components/EditableTitle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRWRpdGFibGVUaXRsZS5qc3g=) | `81.69% <0.00%> (+1.40%)` | :arrow_up: |
| [...perset-frontend/src/components/CopyToClipboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29weVRvQ2xpcGJvYXJkLmpzeA==) | `36.36% <0.00%> (+1.51%)` | :arrow_up: |
| [...hboard/components/resizable/ResizableContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVDb250YWluZXIuanN4) | `71.87% <0.00%> (+1.56%)` | :arrow_up: |
| [...ashboard/components/gridComponents/ChartHolder.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0SG9sZGVyLmpzeA==) | `81.35% <0.00%> (+1.69%)` | :arrow_up: |
| [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `69.64% <0.00%> (+1.78%)` | :arrow_up: |
| [...src/explore/components/controls/VizTypeControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9WaXpUeXBlQ29udHJvbC5qc3g=) | `78.84% <0.00%> (+1.92%)` | :arrow_up: |
| [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `37.44% <0.00%> (+2.05%)` | :arrow_up: |
| [...rset-frontend/src/explore/components/SaveModal.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9TYXZlTW9kYWwuanN4) | `94.73% <0.00%> (+2.10%)` | :arrow_up: |
| ... and [130 more](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [7b11b44...e6c7c55](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409772574
##########
File path: .github/workflows/bashlib.sh
##########
@@ -131,3 +121,99 @@ setup-mysql() {
EOF
say "::endgroup::"
}
+
+testdata() {
+ cd "$GITHUB_WORKSPACE"
+ say "::group::Load test data"
+ # must specify PYTHONPATH to make `tests.superset_test_config` importable
+ export PYTHONPATH="$GITHUB_WORKSPACE"
+ superset db upgrade
+ superset load_test_users
+ superset load_examples --load-test-data
+ superset init
+ say "::endgroup::"
+}
+
+codecov() {
+ say "::group::Upload code coverage"
+ local codecovScript="${HOME}/codecov.sh"
+ # download bash script if needed
+ if [[ ! -f "$codecovScript" ]]; then
+ curl -s https://codecov.io/bash > "$codecovScript"
+ fi
+ bash "$codecovScript" $@
+ say "::endgroup::"
+}
+
+cypress-install() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ cache-restore cypress
+
+ say "::group::Install Cypress"
+ npm ci
+ say "::endgroup::"
+
+ cache-save cypress
+}
+
+# Run Cypress and upload coverage reports
+cypress-run() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ local page=$1
+ local group=${2:-Default}
+ local cypress="./node_modules/.bin/cypress run"
+
+ say "::group::Run Cypress for [$page]"
+ if [[ -z $CYPRESS_RECORD_KEY ]]; then
+ $cypress --spec "cypress/integration/$page"
+ else
+ # additional flags for Cypress dashboard recording
+ $cypress --spec "cypress/integration/$page" --record \
+ --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}"
Review comment:
Just tried it out and it works great! Previously I was relying on Codacy.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d9ebd32485b15c5cd79bcd354252610a9d33b867&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
- Coverage 65.43% 65.41% -0.03%
==========================================
Files 571 571
Lines 29847 29847
Branches 3040 3040
==========================================
- Hits 19529 19523 -6
- Misses 10134 10140 +6
Partials 184 184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #python | `70.10% <ø> (-0.04%)` | :arrow_down: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `78.26% <0.00%> (-13.05%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.97% <0.00%> (-0.90%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <0.00%> (-0.23%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `95.00% <0.00%> (+15.00%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [d9ebd32...9d1e3a3](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d9ebd32485b15c5cd79bcd354252610a9d33b867&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.43% 65.45% +0.02%
==========================================
Files 571 571
Lines 29847 29847
Branches 3040 3040
==========================================
+ Hits 19529 19535 +6
+ Misses 10134 10128 -6
Partials 184 184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #python | `70.17% <ø> (+0.03%)` | :arrow_up: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `95.00% <0.00%> (+15.00%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [d9ebd32...9d1e3a3](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409438405
##########
File path: superset-frontend/cypress-base/cypress.json
##########
@@ -10,5 +10,5 @@
"videoUploadOnPasses": false,
"viewportWidth": 1280,
"viewportHeight": 1024,
- "projectId": "dk2opw"
+ "projectId": "ukwxzo"
Review comment:
Created a new project to clear up histories from the test runs.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409399455
##########
File path: .github/workflows/caches.js
##########
@@ -31,18 +42,11 @@ module.exports = {
path: [`${homeDirectory}/.npm`],
hashFiles: ['superset-frontend/package-lock.json'],
},
- assets: {
- path: [
- `${workspaceDirectory}/superset/static/assets`,
- ],
- hashFiles: [
- `${workspaceDirectory}/superset-frontend/src/**/*`,
- `${workspaceDirectory}/superset-frontend/*.json`,
- `${workspaceDirectory}/superset-frontend/*.js`,
- ],
- // dont use restore keys as it may give an invalid older build
- restoreKeys: ''
- },
+ assets: assetsConfig,
+ // use separate cache for instrumented JS files and regular assets
+ // one is built with `npm run build`,
+ // another is built with `npm run build-instrumented`
+ 'instrumented-assets': assetsConfig,
Review comment:
Use separate cache keys for regular assets and instrumented JS files that supports code coverage. The regular assets are not currently in use, though. We can potentially add a sanity check in `superset-frontend.yml` just to make sure `npm run build` passes. But I don't think that's necessary.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kristw merged pull request #9555: [Build]
Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
kristw merged pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7b11b44abe08c131fb9df6ec479ea29c24c784ec&el=desc) will **increase** coverage by `4.81%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.49% 70.31% +4.81%
==========================================
Files 571 571
Lines 29889 29889
Branches 3040 3040
==========================================
+ Hits 19577 21016 +1439
+ Misses 10128 8762 -1366
+ Partials 184 111 -73
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `53.61% <ø> (?)` | |
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #postgres | `?` | |
| #python | `70.24% <ø> (ø)` | |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...rontend/src/SqlLab/components/AceEditorWrapper.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL0FjZUVkaXRvcldyYXBwZXIudHN4) | `56.98% <0.00%> (+1.07%)` | :arrow_up: |
| [superset-frontend/src/components/EditableTitle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRWRpdGFibGVUaXRsZS5qc3g=) | `81.69% <0.00%> (+1.40%)` | :arrow_up: |
| [...perset-frontend/src/components/CopyToClipboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29weVRvQ2xpcGJvYXJkLmpzeA==) | `36.36% <0.00%> (+1.51%)` | :arrow_up: |
| [...hboard/components/resizable/ResizableContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVDb250YWluZXIuanN4) | `71.87% <0.00%> (+1.56%)` | :arrow_up: |
| [...ashboard/components/gridComponents/ChartHolder.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0SG9sZGVyLmpzeA==) | `81.35% <0.00%> (+1.69%)` | :arrow_up: |
| [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `69.64% <0.00%> (+1.78%)` | :arrow_up: |
| [...src/explore/components/controls/VizTypeControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9WaXpUeXBlQ29udHJvbC5qc3g=) | `78.84% <0.00%> (+1.92%)` | :arrow_up: |
| [...rset-frontend/src/explore/components/SaveModal.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9TYXZlTW9kYWwuanN4) | `94.73% <0.00%> (+2.10%)` | :arrow_up: |
| [...erset-frontend/src/SqlLab/components/SqlEditor.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci5qc3g=) | `55.12% <0.00%> (+2.56%)` | :arrow_up: |
| [...end/src/dashboard/components/dnd/DragDroppable.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnRHJvcHBhYmxlLmpzeA==) | `97.29% <0.00%> (+2.70%)` | :arrow_up: |
| ... and [133 more](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [7b11b44...e6c7c55](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409388311
##########
File path: .github/workflows/bashlib.sh
##########
@@ -67,41 +71,27 @@ build-assets() {
say "::endgroup::"
}
-npm-build() {
- if [[ $1 = '--no-cache' ]]; then
- build-assets
+build-assets-cached() {
+ cache-restore assets
+ if [[ -f "$ASSETS_MANIFEST" ]]; then
+ echo 'Skip frontend build because static assets already exist.'
else
- cache-restore assets
- if [[ -f $GITHUB_WORKSPACE/superset/static/assets/manifest.json ]]; then
- echo 'Skip frontend build because static assets already exist.'
- else
- build-assets
- cache-save assets
- fi
+ build-assets
+ cache-save assets
fi
}
-cypress-install() {
- cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
-
- cache-restore cypress
-
- say "::group::Install Cypress"
- npm ci
- say "::endgroup::"
-
- cache-save cypress
-}
+build-instrumented-assets() {
+ cd "$GITHUB_WORKSPACE/superset-frontend"
-testdata() {
- cd "$GITHUB_WORKSPACE"
- say "::group::Load test data"
- # must specify PYTHONPATH to make `tests.superset_test_config` importable
- export PYTHONPATH="$GITHUB_WORKSPACE"
- superset db upgrade
- superset load_test_users
- superset load_examples --load-test-data
- superset init
+ say "::group::Build static assets with JS instrumented for test coverage"
+ cache-restore instrumented-assets
+ if [[ -f "$ASSETS_MANIFEST" ]]; then
+ echo 'Skip frontend build because instrumented static assets already exist.'
+ else
+ npm run build-instrumented -- --no-progress
Review comment:
Added a new `build-instrumented` npm script to build instrumented JS for Cypress: https://docs.cypress.io/guides/tooling/code-coverage.html#Instrumenting-code
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409438912
##########
File path: .github/workflows/bashlib.sh
##########
@@ -131,3 +121,99 @@ setup-mysql() {
EOF
say "::endgroup::"
}
+
+testdata() {
+ cd "$GITHUB_WORKSPACE"
+ say "::group::Load test data"
+ # must specify PYTHONPATH to make `tests.superset_test_config` importable
+ export PYTHONPATH="$GITHUB_WORKSPACE"
+ superset db upgrade
+ superset load_test_users
+ superset load_examples --load-test-data
+ superset init
+ say "::endgroup::"
+}
+
+codecov() {
+ say "::group::Upload code coverage"
+ local codecovScript="${HOME}/codecov.sh"
+ # download bash script if needed
+ if [[ ! -f "$codecovScript" ]]; then
+ curl -s https://codecov.io/bash > "$codecovScript"
+ fi
+ bash "$codecovScript" $@
+ say "::endgroup::"
+}
+
+cypress-install() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ cache-restore cypress
+
+ say "::group::Install Cypress"
+ npm ci
+ say "::endgroup::"
+
+ cache-save cypress
+}
+
+# Run Cypress and upload coverage reports
+cypress-run() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ local page=$1
+ local group=${2:-Default}
+ local cypress="./node_modules/.bin/cypress run"
+
+ say "::group::Run Cypress for [$page]"
+ if [[ -z $CYPRESS_RECORD_KEY ]]; then
Review comment:
Now we only record Cypress runs when `CYPRESS_RECORD_KEY` is set in GitHub secretes.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7b11b44abe08c131fb9df6ec479ea29c24c784ec&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
=======================================
Coverage 65.49% 65.49%
=======================================
Files 571 571
Lines 29889 29889
Branches 3040 3040
=======================================
Hits 19577 19577
Misses 10128 10128
Partials 184 184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #postgres | `?` | |
| #python | `70.24% <ø> (ø)` | |
| #sqlite | `?` | |
| #unittest | `?` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [7b11b44...e6c7c55](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409391346
##########
File path: .github/workflows/bashlib.sh
##########
@@ -131,3 +121,99 @@ setup-mysql() {
EOF
say "::endgroup::"
}
+
+testdata() {
+ cd "$GITHUB_WORKSPACE"
+ say "::group::Load test data"
+ # must specify PYTHONPATH to make `tests.superset_test_config` importable
+ export PYTHONPATH="$GITHUB_WORKSPACE"
+ superset db upgrade
+ superset load_test_users
+ superset load_examples --load-test-data
+ superset init
+ say "::endgroup::"
+}
+
+codecov() {
+ say "::group::Upload code coverage"
+ local codecovScript="${HOME}/codecov.sh"
+ # download bash script if needed
+ if [[ ! -f "$codecovScript" ]]; then
+ curl -s https://codecov.io/bash > "$codecovScript"
+ fi
+ bash "$codecovScript" $@
+ say "::endgroup::"
+}
+
+cypress-install() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ cache-restore cypress
+
+ say "::group::Install Cypress"
+ npm ci
+ say "::endgroup::"
+
+ cache-save cypress
+}
+
+# Run Cypress and upload coverage reports
+cypress-run() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ local page=$1
+ local group=${2:-Default}
+ local cypress="./node_modules/.bin/cypress run"
+
+ say "::group::Run Cypress for [$page]"
+ if [[ -z $CYPRESS_RECORD_KEY ]]; then
+ $cypress --spec "cypress/integration/$page"
+ else
+ # additional flags for Cypress dashboard recording
+ $cypress --spec "cypress/integration/$page" --record \
+ --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}"
Review comment:
Must add quotes to allow spaces in parameters.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409444601
##########
File path: .github/workflows/superset-e2e.yml
##########
@@ -40,42 +39,19 @@ jobs:
python-version: '3.6'
- name: Install dependencies
- uses: apache-superset/cached-dependencies@ddf7d7f
+ uses: apache-superset/cached-dependencies@adc6f73
with:
# Run commands in parallel does help initial installation without cache
parallel: true
run: |
- npm-install && npm-build
+ npm-install && build-instrumented-assets
pip-install && setup-postgres && testdata
cypress-install
- - name: Cypress run all
+ - name: Run Cypress
+ uses: apache-superset/cached-dependencies@adc6f73
env:
- CYPRESS_GROUP: Default
- CYPRESS_PATH: 'cypress/integration/*/*'
- run: |
- # Start Flask and run Cypress
-
- # --no-debugger means disable the interactive debugger on the 500 page
- # so errors can print to stderr.
- flask run --no-debugger --with-threads -p 8081 &
-
- sleep 3 # wait for the Flask app to start
-
- cd ${{ github.workspace }}/superset-frontend/cypress-base/
- npm run cypress -- run --browser ${{ matrix.browser }} --spec "${{ env.CYPRESS_PATH }}" --record false
-
- - name: Cypress run SQL Lab (with backend persist)
- env:
- SUPERSET_CONFIG: tests.superset_test_config_sqllab_backend_persist
- CYPRESS_GROUP: Backend persist
- CYPRESS_PATH: 'cypress/integration/sqllab/*'
- run: |
- # Start Flask with alternative config and run Cypress
-
- killall python # exit the running Flask app
- flask run --no-debugger --with-threads -p 8081 &
- sleep 3 # wait for the Flask app to start
-
- cd ${{ github.workspace }}/superset-frontend/cypress-base/
- npm run cypress -- run --browser ${{ matrix.browser }} --spec "${{ env.CYPRESS_PATH }}" --record false
+ CYPRESS_BROWSER: ${{ matrix.browser }}
+ CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
+ with:
+ run: cypress-run-all
Review comment:
Moved to `bashlib.sh`.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] craig-rueda commented on a change in pull
request #9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
craig-rueda commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409613735
##########
File path: .github/workflows/bashlib.sh
##########
@@ -131,3 +121,99 @@ setup-mysql() {
EOF
say "::endgroup::"
}
+
+testdata() {
+ cd "$GITHUB_WORKSPACE"
+ say "::group::Load test data"
+ # must specify PYTHONPATH to make `tests.superset_test_config` importable
+ export PYTHONPATH="$GITHUB_WORKSPACE"
+ superset db upgrade
+ superset load_test_users
+ superset load_examples --load-test-data
+ superset init
+ say "::endgroup::"
+}
+
+codecov() {
+ say "::group::Upload code coverage"
+ local codecovScript="${HOME}/codecov.sh"
+ # download bash script if needed
+ if [[ ! -f "$codecovScript" ]]; then
+ curl -s https://codecov.io/bash > "$codecovScript"
+ fi
+ bash "$codecovScript" $@
+ say "::endgroup::"
+}
+
+cypress-install() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ cache-restore cypress
+
+ say "::group::Install Cypress"
+ npm ci
+ say "::endgroup::"
+
+ cache-save cypress
+}
+
+# Run Cypress and upload coverage reports
+cypress-run() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ local page=$1
+ local group=${2:-Default}
+ local cypress="./node_modules/.bin/cypress run"
+
+ say "::group::Run Cypress for [$page]"
+ if [[ -z $CYPRESS_RECORD_KEY ]]; then
+ $cypress --spec "cypress/integration/$page"
+ else
+ # additional flags for Cypress dashboard recording
+ $cypress --spec "cypress/integration/$page" --record \
+ --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}"
Review comment:
BTW, are you using shellcheck to lint these scripts? I recommend it:
```
brew install shellcheck
shellcheck script.sh
```
You could even add a lint scripts CI step ;)
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409764743
##########
File path: superset-frontend/cypress-base/cypress.json
##########
@@ -10,5 +10,5 @@
"videoUploadOnPasses": false,
"viewportWidth": 1280,
"viewportHeight": 1024,
- "projectId": "dk2opw"
+ "projectId": "ukwxzo"
Review comment:
The current project id in code has already been deleted... Since this is not used by anyone other than me, it's probably OK. I can also just delete this altogether.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409422740
##########
File path: .github/workflows/superset-e2e.yml
##########
@@ -40,42 +35,18 @@ jobs:
python-version: '3.6'
- name: Install dependencies
- uses: apache-superset/cached-dependencies@ddf7d7f
+ uses: apache-superset/cached-dependencies@adc6f73
Review comment:
This upgrade fixes a bug related to cache validation.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d9ebd32485b15c5cd79bcd354252610a9d33b867&el=desc) will **increase** coverage by `4.57%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.43% 70.00% +4.57%
==========================================
Files 571 571
Lines 29847 29847
Branches 3040 3040
==========================================
+ Hits 19529 20894 +1365
+ Misses 10134 8834 -1300
+ Partials 184 119 -65
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `52.58% <ø> (?)` | |
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #python | `70.17% <ø> (+0.03%)` | :arrow_up: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/SqlLab/actions/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `61.13% <0.00%> (+0.65%)` | :arrow_up: |
| [...erset-frontend/src/SqlLab/components/SqlEditor.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci5qc3g=) | `53.84% <0.00%> (+1.28%)` | :arrow_up: |
| [superset-frontend/src/components/EditableTitle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRWRpdGFibGVUaXRsZS5qc3g=) | `81.69% <0.00%> (+1.40%)` | :arrow_up: |
| [...perset-frontend/src/components/CopyToClipboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29weVRvQ2xpcGJvYXJkLmpzeA==) | `36.36% <0.00%> (+1.51%)` | :arrow_up: |
| [...hboard/components/resizable/ResizableContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVDb250YWluZXIuanN4) | `71.87% <0.00%> (+1.56%)` | :arrow_up: |
| [...ashboard/components/gridComponents/ChartHolder.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0SG9sZGVyLmpzeA==) | `81.35% <0.00%> (+1.69%)` | :arrow_up: |
| [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `69.64% <0.00%> (+1.78%)` | :arrow_up: |
| [...src/explore/components/controls/VizTypeControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9WaXpUeXBlQ29udHJvbC5qc3g=) | `78.84% <0.00%> (+1.92%)` | :arrow_up: |
| [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `37.44% <0.00%> (+2.05%)` | :arrow_up: |
| [...rset-frontend/src/explore/components/SaveModal.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9TYXZlTW9kYWwuanN4) | `94.73% <0.00%> (+2.10%)` | :arrow_up: |
| ... and [130 more](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [d9ebd32...9d1e3a3](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] craig-rueda commented on a change in pull
request #9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
craig-rueda commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409620699
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/load.js
##########
@@ -31,16 +31,12 @@ export default () =>
cy.get('#app').then(data => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
- const dashboardId = bootstrapData.dashboard_data.id;
const slices = bootstrapData.dashboard_data.slices;
// then define routes and create alias for each requests
slices.forEach(slice => {
const alias = `getJson_${slice.slice_id}`;
const formData = `{"slice_id":${slice.slice_id}}`;
- cy.route(
Review comment:
why are you removing dashboardId here?
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555: [Build]
Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d9ebd32485b15c5cd79bcd354252610a9d33b867&el=desc) will **increase** coverage by `4.49%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.43% 69.92% +4.49%
==========================================
Files 571 182 -389
Lines 29847 17477 -12370
Branches 3040 0 -3040
==========================================
- Hits 19529 12220 -7309
+ Misses 10134 5257 -4877
+ Partials 184 0 -184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `?` | |
| #mysql | `?` | |
| #python | `69.92% <ø> (-0.23%)` | :arrow_down: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `58.92% <0.00%> (-21.43%)` | :arrow_down: |
| [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `45.83% <0.00%> (-20.84%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `78.26% <0.00%> (-13.05%)` | :arrow_down: |
| [superset/views/database/api.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvYXBpLnB5) | `83.90% <0.00%> (-3.45%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `84.47% <0.00%> (-2.39%)` | :arrow_down: |
| [superset/security/manager.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `88.77% <0.00%> (-0.35%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <0.00%> (-0.23%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `86.06% <0.00%> (-0.16%)` | :arrow_down: |
| [...set-frontend/src/dashboard/util/getLocationHash.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldExvY2F0aW9uSGFzaC5qcw==) | | |
| [...uperset-frontend/src/components/PopoverSection.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvUG9wb3ZlclNlY3Rpb24uanN4) | | |
| ... and [387 more](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [d9ebd32...9d1e3a3](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409437427
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/filter.js
##########
@@ -33,41 +36,36 @@ export default () =>
cy.get('#app').then(data => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const dashboard = bootstrapData.dashboard_data;
- dashboardId = dashboard.id;
- sliceIds = dashboard.slices.map(slice => slice.slice_id);
+ const sliceIds = dashboard.slices.map(slice => slice.slice_id);
filterId = dashboard.slices.find(
slice => slice.form_data.viz_type === 'filter_box',
).slice_id;
+ aliases = sliceIds.map(id => {
+ const alias = getAlias(id);
+ const url = `/superset/explore_json/?*{"slice_id":${id}}*`;
+ cy.route('POST', url).as(alias.slice(1));
+ return alias;
+ });
+
+ // wait the initial page load requests
+ cy.wait(aliases);
});
});
it('should apply filter', () => {
- const aliases = [];
-
- const formData = `{"slice_id":${filterId}}`;
- const filterRoute = `/superset/explore_json/?form_data=${formData}&dashboard_id=${dashboardId}`;
- cy.route('POST', filterRoute).as('fetchFilter');
- cy.wait('@fetchFilter');
- sliceIds
- .filter(id => parseInt(id, 10) !== filterId)
- .forEach(id => {
- const alias = `getJson_${id}`;
- aliases.push(`@${alias}`);
-
- cy.route(
- 'POST',
- `/superset/explore_json/?form_data={"slice_id":${id}}&dashboard_id=${dashboardId}`,
- ).as(alias);
- });
-
- // select filter_box and apply
- cy.get('.Select-control')
- .first()
+ // make sure select has appeared
+ cy.get('.Select-placeholder').contains('Select [region]');
+ // select again to make sure it still exists in DOM
+ // (because of Cypress's weird bug with fixed headers)
+ cy.get('.Select-placeholder')
+ .contains('Select [region]')
+ .click()
+ .next()
Review comment:
Somehow Cypress keeps randomly failing at this test (i.e. some runs will be successful, some will not, can never reproduce locally): https://dashboard.cypress.io/projects/ukwxzo/runs/15/specs
Spent 3 hours on this and still couldn't find a workaround. Had to skip it for now.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] craig-rueda commented on a change in pull
request #9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
craig-rueda commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409618784
##########
File path: superset-frontend/cypress-base/cypress.json
##########
@@ -10,5 +10,5 @@
"videoUploadOnPasses": false,
"viewportWidth": 1280,
"viewportHeight": 1024,
- "projectId": "dk2opw"
+ "projectId": "ukwxzo"
Review comment:
We should prob leave this for now..
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d9ebd32485b15c5cd79bcd354252610a9d33b867&el=desc) will **increase** coverage by `4.79%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
+ Coverage 65.43% 70.22% +4.79%
==========================================
Files 571 571
Lines 29847 29847
Branches 3040 3040
==========================================
+ Hits 19529 20959 +1430
+ Misses 10134 8776 -1358
+ Partials 184 112 -72
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `53.41% <ø> (?)` | |
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #python | `70.17% <ø> (+0.03%)` | :arrow_up: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...rontend/src/SqlLab/components/AceEditorWrapper.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL0FjZUVkaXRvcldyYXBwZXIudHN4) | `56.98% <0.00%> (+1.07%)` | :arrow_up: |
| [superset-frontend/src/components/EditableTitle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRWRpdGFibGVUaXRsZS5qc3g=) | `81.69% <0.00%> (+1.40%)` | :arrow_up: |
| [...perset-frontend/src/components/CopyToClipboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29weVRvQ2xpcGJvYXJkLmpzeA==) | `36.36% <0.00%> (+1.51%)` | :arrow_up: |
| [...hboard/components/resizable/ResizableContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVDb250YWluZXIuanN4) | `71.87% <0.00%> (+1.56%)` | :arrow_up: |
| [...ashboard/components/gridComponents/ChartHolder.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0SG9sZGVyLmpzeA==) | `81.35% <0.00%> (+1.69%)` | :arrow_up: |
| [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `69.64% <0.00%> (+1.78%)` | :arrow_up: |
| [...src/explore/components/controls/VizTypeControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9WaXpUeXBlQ29udHJvbC5qc3g=) | `78.84% <0.00%> (+1.92%)` | :arrow_up: |
| [...rset-frontend/src/explore/components/SaveModal.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9TYXZlTW9kYWwuanN4) | `94.73% <0.00%> (+2.10%)` | :arrow_up: |
| [...erset-frontend/src/SqlLab/components/SqlEditor.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci5qc3g=) | `55.12% <0.00%> (+2.56%)` | :arrow_up: |
| [...end/src/dashboard/components/dnd/DragDroppable.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnRHJvcHBhYmxlLmpzeA==) | `97.29% <0.00%> (+2.70%)` | :arrow_up: |
| ... and [132 more](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [d9ebd32...9d1e3a3](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #9555:
[Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#issuecomment-614505409
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=h1) Report
> Merging [#9555](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d9ebd32485b15c5cd79bcd354252610a9d33b867&el=desc) will **decrease** coverage by `0.13%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9555/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9555 +/- ##
==========================================
- Coverage 65.43% 65.29% -0.14%
==========================================
Files 571 571
Lines 29847 29847
Branches 3040 3040
==========================================
- Hits 19529 19490 -39
- Misses 10134 10173 +39
Partials 184 184
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `58.77% <ø> (ø)` | |
| #mysql | `?` | |
| #python | `69.92% <ø> (-0.23%)` | :arrow_down: |
| #sqlite | `?` | |
| #unittest | `?` | |
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9555?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `58.92% <0.00%> (-21.43%)` | :arrow_down: |
| [superset/utils/cache.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | `45.83% <0.00%> (-20.84%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `78.26% <0.00%> (-13.05%)` | :arrow_down: |
| [superset/views/database/api.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvYXBpLnB5) | `83.90% <0.00%> (-3.45%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `84.47% <0.00%> (-2.39%)` | :arrow_down: |
| [superset/security/manager.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `88.77% <0.00%> (-0.35%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <0.00%> (-0.23%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/9555/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `86.06% <0.00%> (-0.16%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9555?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/9555?src=pr&el=footer). Last update [d9ebd32...9d1e3a3](https://codecov.io/gh/apache/incubator-superset/pull/9555?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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409438912
##########
File path: .github/workflows/bashlib.sh
##########
@@ -131,3 +121,99 @@ setup-mysql() {
EOF
say "::endgroup::"
}
+
+testdata() {
+ cd "$GITHUB_WORKSPACE"
+ say "::group::Load test data"
+ # must specify PYTHONPATH to make `tests.superset_test_config` importable
+ export PYTHONPATH="$GITHUB_WORKSPACE"
+ superset db upgrade
+ superset load_test_users
+ superset load_examples --load-test-data
+ superset init
+ say "::endgroup::"
+}
+
+codecov() {
+ say "::group::Upload code coverage"
+ local codecovScript="${HOME}/codecov.sh"
+ # download bash script if needed
+ if [[ ! -f "$codecovScript" ]]; then
+ curl -s https://codecov.io/bash > "$codecovScript"
+ fi
+ bash "$codecovScript" $@
+ say "::endgroup::"
+}
+
+cypress-install() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ cache-restore cypress
+
+ say "::group::Install Cypress"
+ npm ci
+ say "::endgroup::"
+
+ cache-save cypress
+}
+
+# Run Cypress and upload coverage reports
+cypress-run() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ local page=$1
+ local group=${2:-Default}
+ local cypress="./node_modules/.bin/cypress run"
+
+ say "::group::Run Cypress for [$page]"
+ if [[ -z $CYPRESS_RECORD_KEY ]]; then
Review comment:
Now we only record Cypress runs when `CYPRESS_RECORD_KEY` is set.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409806883
##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/filter.js
##########
@@ -33,41 +36,36 @@ export default () =>
cy.get('#app').then(data => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const dashboard = bootstrapData.dashboard_data;
- dashboardId = dashboard.id;
- sliceIds = dashboard.slices.map(slice => slice.slice_id);
+ const sliceIds = dashboard.slices.map(slice => slice.slice_id);
filterId = dashboard.slices.find(
slice => slice.form_data.viz_type === 'filter_box',
).slice_id;
+ aliases = sliceIds.map(id => {
+ const alias = getAlias(id);
+ const url = `/superset/explore_json/?*{"slice_id":${id}}*`;
+ cy.route('POST', url).as(alias.slice(1));
+ return alias;
+ });
+
+ // wait the initial page load requests
+ cy.wait(aliases);
});
});
it('should apply filter', () => {
- const aliases = [];
-
- const formData = `{"slice_id":${filterId}}`;
- const filterRoute = `/superset/explore_json/?form_data=${formData}&dashboard_id=${dashboardId}`;
- cy.route('POST', filterRoute).as('fetchFilter');
- cy.wait('@fetchFilter');
- sliceIds
- .filter(id => parseInt(id, 10) !== filterId)
- .forEach(id => {
- const alias = `getJson_${id}`;
- aliases.push(`@${alias}`);
-
- cy.route(
- 'POST',
- `/superset/explore_json/?form_data={"slice_id":${id}}&dashboard_id=${dashboardId}`,
- ).as(alias);
- });
-
- // select filter_box and apply
- cy.get('.Select-control')
- .first()
+ // make sure select has appeared
+ cy.get('.Select-placeholder').contains('Select [region]');
+ // select again to make sure it still exists in DOM
+ // (because of Cypress's weird bug with fixed headers)
+ cy.get('.Select-placeholder')
+ .contains('Select [region]')
+ .click()
+ .next()
Review comment:
Pretty sure this has something to do with Cypress 4.4.0. Reverted it to v4.3.0 and never raw the same error again.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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
#9555: [Build] Collect frontend code coverage from Cypress tests
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #9555: [Build] Collect frontend code coverage from Cypress tests
URL: https://github.com/apache/incubator-superset/pull/9555#discussion_r409392594
##########
File path: .github/workflows/bashlib.sh
##########
@@ -131,3 +121,99 @@ setup-mysql() {
EOF
say "::endgroup::"
}
+
+testdata() {
+ cd "$GITHUB_WORKSPACE"
+ say "::group::Load test data"
+ # must specify PYTHONPATH to make `tests.superset_test_config` importable
+ export PYTHONPATH="$GITHUB_WORKSPACE"
+ superset db upgrade
+ superset load_test_users
+ superset load_examples --load-test-data
+ superset init
+ say "::endgroup::"
+}
+
+codecov() {
+ say "::group::Upload code coverage"
+ local codecovScript="${HOME}/codecov.sh"
+ # download bash script if needed
+ if [[ ! -f "$codecovScript" ]]; then
+ curl -s https://codecov.io/bash > "$codecovScript"
+ fi
+ bash "$codecovScript" $@
+ say "::endgroup::"
+}
+
+cypress-install() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ cache-restore cypress
+
+ say "::group::Install Cypress"
+ npm ci
+ say "::endgroup::"
+
+ cache-save cypress
+}
+
+# Run Cypress and upload coverage reports
+cypress-run() {
+ cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
+
+ local page=$1
+ local group=${2:-Default}
+ local cypress="./node_modules/.bin/cypress run"
+
+ say "::group::Run Cypress for [$page]"
+ if [[ -z $CYPRESS_RECORD_KEY ]]; then
+ $cypress --spec "cypress/integration/$page"
+ else
+ # additional flags for Cypress dashboard recording
+ $cypress --spec "cypress/integration/$page" --record \
+ --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}"
+ fi
+
+ # don't add quotes to $record because we do want word splitting
+ say "::endgroup::"
+}
+
+cypress-run-all() {
+ # Start Flask and run it in background
+ # --no-debugger means disable the interactive debugger on the 500 page
+ # so errors can print to stderr.
+ local flasklog="${HOME}/flask.log"
+ local port=8081
+
+ nohup flask run --no-debugger -p $port > $flasklog 2>&1 < /dev/null &
+ local flaskProcessId=$!
Review comment:
Pipe Flask logs to background, so the outputs can be nicely grouped:
![image](https://user-images.githubusercontent.com/335541/79436039-3bddf000-7f85-11ea-84de-611c2d86d577.png)
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org