-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge lib
submodule into ops
#3134
Conversation
Passing run #1795 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3134 +/- ##
==========================================
- Coverage 87.43% 87.39% -0.05%
==========================================
Files 314 305 -9
Lines 18341 18265 -76
Branches 2384 2384
==========================================
- Hits 16036 15962 -74
+ Misses 1868 1866 -2
Partials 437 437
☔ View full report in Codecov by Sentry. |
@pattisdr I'm nearing the point of being ready for a review, but before I get there I wanted to make sure there wasn't anything super specific you had in mind for cleanup here? At the very least this will combine the code and do some minimal de-duplication |
@ThomasLaPiana taking a look at this now, apologize for missing this notification last week |
No worries! Release takes precedence and I'm fixing a few bugs real quick since merging in main 😄 they'll be in shortly |
ok...seems like it should be good to go now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @ThomasLaPiana really appreciate the consolidation here. Main things that stood out were the ConnectionConfig/MessagingConfig type issues and some of endpoints/URL's/schemas still in separate files from there rest of the ops endpoint details.
@@ -182,6 +182,6 @@ def filter_fides_connector_datasets( | |||
return { | |||
dataset.fides_key | |||
for connector_config in connector_configs | |||
for dataset in connector_config.datasets | |||
for dataset in connector_config.datasets # type: ignore[attr-defined] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh why are these connection config attributes suddenly causing problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk 😢 but it was a lot
@@ -138,7 +138,7 @@ def dispatch_message( | |||
raise MessageDispatchException("No notification service type configured.") | |||
|
|||
logger.info("Retrieving message config") | |||
messaging_config: MessagingConfig = MessagingConfig.get_configuration( | |||
messaging_config = MessagingConfig.get_configuration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting a type hint being removed likely to get around linting issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep....I also have no idea why, but I had to add a lot of mypy workarounds and that makes me concerned, but not concerned enough to spend hours figuring out why 😅
@pattisdr thank you for the thorough review! Will go through and make changes accordingly 😄 |
@pattisdr I've gone through and made all of the consolidation/refactor changes you mentioned! The only ones left are the |
thanks very much @ThomasLaPiana I plan to review first thing tomorrow. I know this touches a lot of files and you're anxious to merge - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasLaPiana Thanks very much especially for consolidating the user endpoints, that's probably what I hoped to get most out of this.
The cause of the type issues were bothering me so I dug into it and it looks like we were previously importing the MessagingConfig and ConnectionConfig models from a different directory in lib than the other models. I've tried to continue to clean up type hints in this corresponding PR that is pointed at your branch plus some other minor items I saw:
from fides.api.ops.util.oauth_util import verify_oauth_client_prod | ||
from fides.api.ops.oauth.utils import verify_oauth_client_prod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that just occurred to me is that this is going to need a corresponding plus PR that needs to go out in the same release as plus imports a lot of these oauth methods related to scopes and roles that should probably take priority then over other reorganization tickets this sprint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, I'll get on that as soon as this gets merged!
connection_config: ConnectionConfig = ConnectionConfig.get_by( | ||
connection_config = ConnectionConfig.get_by( | ||
db, field="key", value=authentication_request.connection_key | ||
) | ||
assert connection_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either way your assert needs to be moved beneath the verify_oauth_connection_config
as it is expected this could potentially return None. I'll take care of this in my corresponding PR to clean up some of this type stuff
Co-authored-by: Thomas <thomas.lapiana+github@pm.me>
@pattisdr This is ready for a final review, thanks again so much for the work you did in the type hints! I got those merged in and everything is looking good. I've also opened and cross-linked a Fidesplus issue for fixing things over there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me @ThomasLaPiana you'll need another changelog update (group "changed" together) after getting this up to date one more time. Thanks again for all your efforts here.
Thank you so much for your contributions here! This is only the beginning of the decisive tech-debt payoff 🙂 |
failed tests are expected, merging |
Closes #2032
Code Changes
lib
intoops
, mostly maintaining the structurelib
submodule completely once the functionality has been copied overops
/lib
oauth utils/functionsSteps to Confirm
Pre-Merge Checklist
Documentation:CHANGELOG.md
For API changes, the Postman collection has been updatedDescription Of Changes
Long-awaited change to merge the previously-separate
lib
code with theops
api code. This is an iteration on the path towards a total unification ofctl
andops
server code as wellGiven the size of the changes here as well as being a pure refactor change, I'm not expecting much in terms of a manual review here