Taragolis commented on PR #36611: URL: https://github.com/apache/airflow/pull/36611#issuecomment-1879133056
> The aiflow-init container runs airflow version which I think COULD in the past initialize the DB as side effect but this could have changed since. I guess it still work, and just simple step for operate with airflow's entrypoint environment variables: [`_AIRFLOW_DB_MIGRATE`](https://airflow.apache.org/docs/docker-stack/entrypoint.html#upgrading-airflow-db) and [`_AIRFLOW_WWW_USER_CREATE`, `_AIRFLOW_WWW_USER_USERNAME`, `_AIRFLOW_WWW_USER_PASSWORD`](https://airflow.apache.org/docs/docker-stack/entrypoint.html#creating-admin-user) >And it seems that our tests do not actually run airflow-init - so the right fix here will be in this case to change our tests to run the init, then verify if the database have been created and only then run the whole compose setup. It should not explicit run `docker-compose up airflow-init` because this command required for very old docker compose, something like below 1.29.0 which doesn't support `service_completed_successfully` depends on instruction In our tests we run `docker compose up -d --wait` https://github.com/apache/airflow/blob/5b4e95065ec860b6ea7f398fabf36ef7492b0970/docker_tests/test_docker_compose_quick_start.py#L140-L142 And according to the dependencies it should run initialise DB after Postgres started and before scheduler/webserver/worker/triggerer ```mermaid graph TD; postgres-->airflow-init; redis-->airflow-init; airflow-init-->airflow-webserver; airflow-init-->airflow-scheduler; airflow-init-->airflow-worker; airflow-init-->airflow-triggerer; airflow-init-->airflow-cli; airflow-init-->flower; postgres-->airflow-webserver; postgres-->airflow-scheduler; postgres-->airflow-worker; postgres-->airflow-triggerer; postgres-->airflow-cli; postgres-->flower; redis-->airflow-webserver; redis-->airflow-scheduler; redis-->airflow-worker; redis-->airflow-triggerer; redis-->airflow-cli; postgres-->flower; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
