-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: Make alembic version table configurable #77
base: main
Are you sure you want to change the base?
feat: Make alembic version table configurable #77
Conversation
7497d18
to
b13f2fd
Compare
I am running this in a local development branch and with this modification I am now running both mlflow and the plugin inside the same postgres database |
Hi @gdiepen, |
Will check what needs to be changed to use mlflow_oidc_auth/config.py there Also will try to see how to write the test for this |
So the first part is done, I have moved everything to the config and use that. Second part I am having some problems with, not familiar with python unittest (a bit more experience with pytest). Getting stuck on how to ensure I can initialize an empty database and see if the table created is based on the os environment..... |
@kharkevich If you understand what is going wrong here, that would be very useful If I use the tables list is always empty. However, if I change it to Second question would be how to mock environment variable in this framework, such that I can create a second test where I let it be a custom alembic version table |
@kharkevich Having the migration run inside of a temporary database would be the nicest unit test (but still stuck on trying to get the alembic unit test to work with |
If the environment variable
OIDC_ALEMBIC_VERSION_TABLE
is defined, use this as the table that alembic uses to store the alembic versions in. If not defined, use the defaultalembic_version
.Fixes: #76
Allows to use both mlflow-oidc-auth and mlflow in the same (postgres) database, each having its own alembic version table.