-
Notifications
You must be signed in to change notification settings - Fork 5
[DPE-7322] Support predefined roles #269
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
base: main
Are you sure you want to change the base?
Conversation
03dc3c6
to
3d1f6a2
Compare
3d1f6a2
to
ec166ee
Compare
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 except a couple nits
src/mysql_shell/__init__.py
Outdated
def create_application_database_and_user(self, *, username: str, database: str) -> str: | ||
"""Create database and user for related database_provides application.""" | ||
def create_application_database(self, *, database: str) -> str: |
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.
on the public interface (of mysql_shell), could we keep this as one method since it should always be called together?
e.g. if you want to have it split into two functions internally, suggest something like
def create_application_database_and_user():
self._create_application_database()
self._create_application_user()
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.
I think having a function with two lines of code is an oversimplification and provides little value. Furthermore, 1/2 usages are within an interface that will be pruned soon (deprecated_shared_db_provides.py
module).
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.
function with two lines of code is an oversimplification and provides little value
would you be willing to combine it back into one method then?
I'd like to keep the public interface of mysql_shell the same (1 method) since the methods should always be called together
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.
LGTM overall, one comment to avoid data format manipulations in Python.
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.
Great work
ec166ee
to
597219c
Compare
597219c
to
ed11918
Compare
This PR supports the set of predefined roles proposed in this specification.