-
Notifications
You must be signed in to change notification settings - Fork 0
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
PMR: Remove access to stale Profiles with create_or_update_profiles()
#17
Conversation
tests/integration/profiles_management/test_create_or_update_profiles.py
Outdated
Show resolved
Hide resolved
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.
Made a first pass, mainly correcting grammar mistakes.
I like the splitting of the files and the small functions, but I'm not sure about the names of the files/directories.
- Maybe the
yamls
directory could be renamed toexample-yaml
to be more descriptive. - Not sure about the name of
conftest.py
- The helpers
k8s.py
,kfam.py
,profiles.py
could have more descriptive names as well, maybe appending-helpers
? - I don't think the name
create.py
fits as well, maybecreate_or_update.py
is better
Thanks for the review @mvlassis! Regarding the names, indeed naming is always a bit tough.
Let's also get feedback from @DnPlas and we can go with the naming that seems more easy to understand for all of us, and I'll make a commit |
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.
Thanks @kimwnasptd !
Did a first pass on the create.py
file. I think some of my comments may re-shape this PR, so after your consideration and possible update, I can do a second pass on the rest of the files.
I also had to push a commit to address canonical/bundle-kubeflow#1178 and canonical/charmcraft#2023 cc @mvlassis |
create_or_update_profiles()
|
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.
Thanks @kimwnasptd, lgtm. Let's also ask @mvlassis for his approval.
7c9d6bb
to
49a23c8
Compare
Closes #9
First part of working on the
create_or_udpate_profiles
function. There will be follow-up PRs for the rest of the functionality of that function, but for now I focused on breaking it to smaller PRs.Changes
create_or_update_profiles(pmr)
functioncreate_or_update_profiles(pmr)
. For now I have one file, but we can break it to multiple as we goReview Notes
You can test the code by running
tox -e integration-library
.There is a bit of duplication between the testing helper functions and the helper functions of the library. I've kept them separate, as it's a bad practice to use utility function from the main logic that is tested from the test scripts.
Lastly, while in the future the function's signature will slightly change, to take into consideration the principals, for now I haven't included them (as they also collide with lint)