You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/04/27 19:38:54 UTC

[GitHub] [superset] john-bodley opened a new pull request, #23856: fix(tests): Ensure deterministic zip file ordering for CSV uploads

john-bodley opened a new pull request, #23856:
URL: https://github.com/apache/superset/pull/23856

   <!---
   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] john-bodley commented on pull request #23856: fix(tests): Ensure deterministic zip file ordering for CSV uploads

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on PR #23856:
URL: https://github.com/apache/superset/pull/23856#issuecomment-1526338241

   @hughhhh this _should_ fix the issue you were trying to resolve in https://github.com/apache/superset/pull/23829/commits/cc23d5d22ffeda8b1a24dc74d30b94fe4adc8217. I realize that @betodealmeida's recommendation was to sort the output, but it seems like the row ordering likely matters, i.e., should be deterministic.


-- 
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] betodealmeida commented on a diff in pull request #23856: fix(tests): Ensure deterministic zip file ordering for CSV uploads

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on code in PR #23856:
URL: https://github.com/apache/superset/pull/23856#discussion_r1179629913


##########
tests/integration_tests/csv_upload_tests.py:
##########
@@ -556,4 +561,4 @@ def test_import_parquet(mock_event_logger):
 
     with test_db.get_sqla_engine_with_context() as engine:
         data = engine.execute(f"SELECT * from {PARQUET_UPLOAD_TABLE}").fetchall()
-        assert data == [("max", 3), ("bob", 4), ("john", 1), ("paul", 2)]
+        assert data == [("john", 1), ("paul", 2), ("max", 3), ("bob", 4)]

Review Comment:
   A `SELECT` does not guarantee order without an `ORDER BY`; if we don't want to use `sorted()` here we need to add an explicit `ORDER BY` to the query.



-- 
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] john-bodley commented on a diff in pull request #23856: fix(tests): Ensure deterministic CSV select

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23856:
URL: https://github.com/apache/superset/pull/23856#discussion_r1179639389


##########
tests/integration_tests/csv_upload_tests.py:
##########
@@ -556,4 +561,4 @@ def test_import_parquet(mock_event_logger):
 
     with test_db.get_sqla_engine_with_context() as engine:
         data = engine.execute(f"SELECT * from {PARQUET_UPLOAD_TABLE}").fetchall()
-        assert data == [("max", 3), ("bob", 4), ("john", 1), ("paul", 2)]
+        assert data == [("john", 1), ("paul", 2), ("max", 3), ("bob", 4)]

Review Comment:
   @betodealmeida I've re-authored the PR based on your comment.



-- 
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 #23856: fix(tests): Ensure deterministic zip file ordering for CSV uploads

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23856:
URL: https://github.com/apache/superset/pull/23856#issuecomment-1526289808

   ## [Codecov](https://codecov.io/gh/apache/superset/pull/23856?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 [#23856](https://codecov.io/gh/apache/superset/pull/23856?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d891924) into [master](https://codecov.io/gh/apache/superset/commit/0bf8907f2f6d7a17a1e3efa1c03a5af06daa8190?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0bf8907) will **increase** coverage by `3.04%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #23856      +/-   ##
   ==========================================
   + Coverage   53.58%   56.63%   +3.04%     
   ==========================================
     Files        1938     1938              
     Lines       74957    74957              
     Branches     8140     8140              
   ==========================================
   + Hits        40167    42453    +2286     
   + Misses      32706    30420    -2286     
     Partials     2084     2084              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | presto | `52.92% <ø> (?)` | |
   | python | `59.12% <ø> (+6.30%)` | :arrow_up: |
   | unit | `52.81% <ø> (ø)` | |
   
   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.
   
   [see 82 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23856/indirect-changes?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] john-bodley merged pull request #23856: fix(tests): Ensure deterministic SELECT ordering for CSV upload tests

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley merged PR #23856:
URL: https://github.com/apache/superset/pull/23856


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