chore: Refactor ownership - #21938
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21938 +/- ##
===========================================
+ Coverage 55.55% 66.92% +11.37%
===========================================
Files 1806 1806
Lines 69140 69156 +16
Branches 7393 7393
===========================================
+ Hits 38409 46284 +7875
+ Misses 28822 20963 -7859
Partials 1909 1909
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
62a662e to
4d546c7
Compare
There was a problem hiding this 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 Slack thread for details.
| exceptions.append(DatasetExistsValidationError(table_name=duplicate_name)) | ||
|
|
||
| try: | ||
| owners = self.populate_owners(self._actor) |
There was a problem hiding this 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 there's no need to specify [g.user.id] given that it defaults to the current user if not specified.
villebro
left a comment
There was a problem hiding this comment.
I tried to think of any reason for this to be passed through, but couldn't come up with any valid reason, so I must assume it's not needed. And if this does indeed break something we need to add an IT for it anyway. LGTM.
SUMMARY
A follow up to #20499 where the
actorfield was deprecated given this is simply the current logged in user.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION