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/10/25 23:50:28 UTC

[GitHub] [superset] john-bodley opened a new pull request, #21938: chore: Refactor ownership

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   
   A follow up to https://github.com/apache/superset/pull/20499 where the `actor` field was deprecated given this is simply the current logged in user.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   
   CI.
   
   ### 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 merged pull request #21938: chore: Refactor ownership

Posted by GitBox <gi...@apache.org>.
john-bodley merged PR #21938:
URL: https://github.com/apache/superset/pull/21938


-- 
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 #21938: chore: Refactor ownership

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/21938?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 [#21938](https://codecov.io/gh/apache/superset/pull/21938?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (62a662e) into [master](https://codecov.io/gh/apache/superset/commit/9a063abb3b28e32b1107950942571d564bb283f8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9a063ab) will **decrease** coverage by `0.15%`.
   > The diff coverage is `60.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #21938      +/-   ##
   ==========================================
   - Coverage   55.55%   55.39%   -0.16%     
   ==========================================
     Files        1806     1806              
     Lines       69140    69157      +17     
     Branches     7393     7393              
   ==========================================
   - Hits        38409    38308     -101     
   - Misses      28822    28940     +118     
     Partials     1909     1909              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | presto | `52.83% <60.00%> (+<0.01%)` | :arrow_up: |
   | python | `57.61% <60.00%> (-0.34%)` | :arrow_down: |
   | unit | `51.08% <60.00%> (+0.01%)` | :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/21938?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/api.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvZGF0YXNldHMvYXBpLnB5) | `49.18% <50.00%> (ø)` | |
   | [superset/datasets/commands/duplicate.py](https://codecov.io/gh/apache/superset/pull/21938/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) | `29.48% <66.66%> (+0.37%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `34.38% <0.00%> (-30.44%)` | :arrow_down: |
   | [superset/connectors/sqla/utils.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3V0aWxzLnB5) | `77.45% <0.00%> (-2.95%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `77.03% <0.00%> (-2.23%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `74.96% <0.00%> (-1.11%)` | :arrow_down: |
   | [superset/tasks/scheduler.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvdGFza3Mvc2NoZWR1bGVyLnB5) | `40.00% <0.00%> (-0.43%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `77.44% <0.00%> (-0.35%)` | :arrow_down: |
   | [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/21938/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-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `31.15% <0.00%> (-0.23%)` | :arrow_down: |
   | ... and [5 more](https://codecov.io/gh/apache/superset/pull/21938/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] john-bodley commented on a diff in pull request #21938: chore: Refactor ownership

Posted by GitBox <gi...@apache.org>.
john-bodley commented on code in PR #21938:
URL: https://github.com/apache/superset/pull/21938#discussion_r1005080072


##########
superset/datasets/commands/duplicate.py:
##########
@@ -122,7 +120,7 @@ def validate(self) -> None:
             exceptions.append(DatasetExistsValidationError(table_name=duplicate_name))
 
         try:
-            owners = self.populate_owners(self._actor)

Review Comment:
   See the previous comment. I gather Mypy didn't barf because it was being passed `List[int]` as opposed to `User` per the class `__init__` method. 
   
   Note, per [here](https://github.com/apache/superset/blob/f0ca158989644b793719884b52d04f93c05de1ba/superset/commands/base.py#L58) there's no need to specify `[g.user.id]` given that it defaults to the current user if not specified. 



##########
superset/datasets/api.py:
##########
@@ -585,7 +585,7 @@ def duplicate(self) -> Response:
             return self.response_400(message=error.messages)
 
         try:
-            new_model = DuplicateDatasetCommand([g.user.id], item).run()

Review Comment:
   This was wrong. It was passing in a `List[int]` whereas the class signature expected `User`. I'm somewhat perplexed as to why Mypy didn't report this an error. See [this](https://apache-superset.slack.com/archives/G013HAE6Y0K/p1666734311888839) Slack thread for details.



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