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 2022/09/01 20:30:18 UTC

[GitHub] [superset] hughhhh opened a new pull request, #21303: chore: add test for SPA explore endpoints around missing datasets

hughhhh opened a new pull request, #21303:
URL: https://github.com/apache/superset/pull/21303

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh merged pull request #21303: chore: add test for SPA explore endpoints around missing datasets

Posted by GitBox <gi...@apache.org>.
hughhhh merged PR #21303:
URL: https://github.com/apache/superset/pull/21303


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #21303: chore: add test for SPA explore endpoints around missing datasets

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #21303:
URL: https://github.com/apache/superset/pull/21303#issuecomment-1234748451

   # [Codecov](https://codecov.io/gh/apache/superset/pull/21303?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#21303](https://codecov.io/gh/apache/superset/pull/21303?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa3ad30) into [master](https://codecov.io/gh/apache/superset/commit/1aeb8fd6b78d5b53501d277f54b46a02f7067163?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1aeb8fd) will **decrease** coverage by `0.72%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head fa3ad30 differs from pull request most recent head fd3de01. Consider uploading reports for the commit fd3de01 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #21303      +/-   ##
   ==========================================
   - Coverage   66.43%   65.70%   -0.73%     
   ==========================================
     Files        1786     1786              
     Lines       68267    68267              
     Branches     7264     7264              
   ==========================================
   - Hits        45352    44857     -495     
   - Misses      21045    21540     +495     
     Partials     1870     1870              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `53.02% <ø> (ø)` | |
   | postgres | `?` | |
   | presto | `52.92% <ø> (ø)` | |
   | python | `79.82% <ø> (-1.50%)` | :arrow_down: |
   | sqlite | `79.44% <ø> (+<0.01%)` | :arrow_up: |
   | unit | `50.94% <ø> (+0.16%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/21303?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/datasets/commands/update.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvdXBkYXRlLnB5) | `25.00% <0.00%> (-69.05%)` | :arrow_down: |
   | [superset/datasets/commands/create.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvY3JlYXRlLnB5) | `31.25% <0.00%> (-68.75%)` | :arrow_down: |
   | [superset/datasets/commands/bulk\_delete.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvYnVsa19kZWxldGUucHk=) | `33.33% <0.00%> (-53.34%)` | :arrow_down: |
   | [superset/datasets/columns/commands/delete.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29sdW1ucy9jb21tYW5kcy9kZWxldGUucHk=) | `44.11% <0.00%> (-52.95%)` | :arrow_down: |
   | [superset/datasets/metrics/commands/delete.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvbWV0cmljcy9jb21tYW5kcy9kZWxldGUucHk=) | `44.11% <0.00%> (-52.95%)` | :arrow_down: |
   | [superset/datasets/dao.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvZGFvLnB5) | `44.21% <0.00%> (-50.35%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/datasets/commands/delete.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvZGVsZXRlLnB5) | `48.57% <0.00%> (-48.58%)` | :arrow_down: |
   | [superset/datasets/commands/refresh.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvcmVmcmVzaC5weQ==) | `43.75% <0.00%> (-43.75%)` | :arrow_down: |
   | [superset/datasets/commands/duplicate.py](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvZHVwbGljYXRlLnB5) | `54.43% <0.00%> (-36.71%)` | :arrow_down: |
   | ... and [24 more](https://codecov.io/gh/apache/superset/pull/21303/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] AAfghahi commented on a diff in pull request #21303: chore: add test for SPA explore endpoints around missing datasets

Posted by GitBox <gi...@apache.org>.
AAfghahi commented on code in PR #21303:
URL: https://github.com/apache/superset/pull/21303#discussion_r966353792


##########
tests/unit_tests/explore/api_test.py:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from typing import Any
+
+import pytest
+
+
+def test_explore_datasource_not_found(client: Any, full_api_access: None) -> None:
+    # validating the payload for a dataset that doesn't exist
+    # user should be expecting missing_datasource view
+    response = client.get(
+        "/api/v1/explore/?dataset_id=50000&dataset_type=table",
+    )
+    response.json["result"]["dataset"]["name"] == "[Missing Dataset]"
+    assert response.status_code == 200

Review Comment:
   Yeah same question. 



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #21303: chore: add test for SPA explore endpoints around missing datasets

Posted by GitBox <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #21303:
URL: https://github.com/apache/superset/pull/21303#discussion_r966329302


##########
tests/unit_tests/explore/api_test.py:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from typing import Any
+
+import pytest
+
+
+def test_explore_datasource_not_found(client: Any, full_api_access: None) -> None:
+    # validating the payload for a dataset that doesn't exist
+    # user should be expecting missing_datasource view
+    response = client.get(
+        "/api/v1/explore/?dataset_id=50000&dataset_type=table",
+    )
+    response.json["result"]["dataset"]["name"] == "[Missing Dataset]"
+    assert response.status_code == 200

Review Comment:
   Does this mean we are expecting a `200` when no dataset was found?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] hughhhh commented on a diff in pull request #21303: chore: add test for SPA explore endpoints around missing datasets

Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #21303:
URL: https://github.com/apache/superset/pull/21303#discussion_r967336934


##########
tests/unit_tests/explore/api_test.py:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from typing import Any
+
+import pytest
+
+
+def test_explore_datasource_not_found(client: Any, full_api_access: None) -> None:
+    # validating the payload for a dataset that doesn't exist
+    # user should be expecting missing_datasource view
+    response = client.get(
+        "/api/v1/explore/?dataset_id=50000&dataset_type=table",
+    )
+    response.json["result"]["dataset"]["name"] == "[Missing Dataset]"
+    assert response.status_code == 200

Review Comment:
   yea this is the expected results whenever we hit explore with a unknown dataset, assuming product is okay with this for now but if this needs to change atleast we have a test to warrant expected result



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org