Skip to content

Commit

Permalink
Add second wait for auth migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
burakince committed Dec 15, 2024
1 parent 80d0e34 commit 4d2edc6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
26 changes: 13 additions & 13 deletions docker-compose.basic-auth-postgres-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
minio:
container_name: minio-basic-auth-test
container_name: minio-basic-auth-pg-test
hostname: minio
image: minio/minio:${MINIO_VERSION}
entrypoint: sh
Expand All @@ -12,13 +12,13 @@ services:
- "9000:9000"
- "9001:9001"
volumes:
- minio-basic-auth-storage:/data
- minio-basic-auth-pg-storage:/data
networks:
- basic_auth_test_nw
- basic_auth_pg_test_nw

postgres:
image: "postgres:${POSTGRES_VERSION}"
container_name: mlflow-basic-auth-db
container_name: mlflow-basic-auth-pg-db
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -28,11 +28,11 @@ services:
volumes:
- postgres-basic-auth-storage:/var/lib/postgresql/data
networks:
- basic_auth_test_nw
- basic_auth_pg_test_nw

usersdb:
image: "postgres:${POSTGRES_VERSION}"
container_name: mlflow-basic-auth-users-db
container_name: mlflow-basic-auth-users-pg-db
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -42,10 +42,10 @@ services:
volumes:
- postgres-basic-auth-users-storage:/var/lib/postgresql/data
networks:
- basic_auth_test_nw
- basic_auth_pg_test_nw

mlflow:
container_name: mlflow-basic-auth-test
container_name: mlflow-basic-auth-pg-test
build:
context: .
dockerfile: Dockerfile
Expand All @@ -63,9 +63,9 @@ services:
ports:
- "8080:8080"
networks:
- basic_auth_test_nw
- basic_auth_pg_test_nw
volumes:
- mlflow-basic-auth-storage:/mlflow
- mlflow-basic-auth-pg-storage:/mlflow
- ./test-containers/basic-auth/postgres/basic_auth.ini:/mlflow/basic_auth.ini
depends_on:
- minio
Expand All @@ -77,11 +77,11 @@ volumes:
driver: local
postgres-basic-auth-users-storage:
driver: local
mlflow-basic-auth-storage:
mlflow-basic-auth-pg-storage:
driver: local
minio-basic-auth-storage:
minio-basic-auth-pg-storage:
driver: local

networks:
basic_auth_test_nw:
basic_auth_pg_test_nw:
driver: bridge
7 changes: 4 additions & 3 deletions tests/test_basic_auth_postgres_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ def test_postgres_backended_model_upload_and_access_with_basic_auth(

log_message = f".*Listening at: {re.escape(base_url)}.*"
compose.wait_for_logs("mlflow", log_message)
time.sleep(3) # Wait 3 seconds more the get flask ready
compose.wait_for_logs("mlflow", ".*8606fa83a998, initial_migration")
time.sleep(5) # Wait 5 seconds more the get flask ready

experiment_name = "aws-cloud-postgres-experiment"
model_name = "test-aws-pg-model"
experiment_name = "basic-auth-postgres-experiment"
model_name = "test-basic-auth-pg-model"
stage_name = "Staging"
os.environ["MLFLOW_TRACKING_USERNAME"] = mlflow_admin_username
os.environ["MLFLOW_TRACKING_PASSWORD"] = mlflow_admin_password
Expand Down

0 comments on commit 4d2edc6

Please sign in to comment.