This is an automated email from the ASF dual-hosted git repository.

vatsrahul1001 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 732204be41f Fix admin user creation in the Docker image at DEBUG log 
level (#77631)
732204be41f is described below

commit 732204be41f30e5de626a63e516464d89eaff49c
Author: ChickenBenny <[email protected]>
AuthorDate: Tue Dec 1 16:36:49 2026 +0800

    Fix admin user creation in the Docker image at DEBUG log level (#77631)
---
 Dockerfile                        | 4 +++-
 Dockerfile.ci                     | 4 +++-
 scripts/docker/entrypoint_ci.sh   | 4 +++-
 scripts/docker/entrypoint_prod.sh | 4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 012bbd74711..5f696bc5009 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2038,7 +2038,9 @@ function create_www_user() {
         exit 1
     fi
 
-    if airflow config get-value core auth_manager | grep -q "FabAuthManager"; 
then
+    # Not grep -q: at DEBUG level the command still logs to stdout after the 
match, and with pipefail
+    # its broken pipe would fail the check.
+    if airflow config get-value core auth_manager | grep "FabAuthManager" 
>/dev/null; then
         airflow users create \
            --username "${_AIRFLOW_WWW_USER_USERNAME="admin"}" \
            --firstname "${_AIRFLOW_WWW_USER_FIRSTNAME="Airflow"}" \
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 38fb9638373..e1516b10f34 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -2088,7 +2088,9 @@ function start_api_server_with_examples(){
     export AIRFLOW__API__EXPOSE_CONFIG=True
     airflow dags reserialize
     echo "Example dags parsing finished"
-    if airflow config get-value core auth_manager | grep -q "FabAuthManager"; 
then
+    # Not grep -q: at DEBUG level the command still logs to stdout after the 
match, and with pipefail
+    # its broken pipe would fail the check.
+    if airflow config get-value core auth_manager | grep "FabAuthManager" 
>/dev/null; then
         echo "Create admin user"
         airflow users create -u admin -p admin -f Thor -l Administrator -r 
Admin -e [email protected] || true
         echo "Admin user created"
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index d71181f064a..3071553e578 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -567,7 +567,9 @@ function start_api_server_with_examples(){
     export AIRFLOW__API__EXPOSE_CONFIG=True
     airflow dags reserialize
     echo "Example dags parsing finished"
-    if airflow config get-value core auth_manager | grep -q "FabAuthManager"; 
then
+    # Not grep -q: at DEBUG level the command still logs to stdout after the 
match, and with pipefail
+    # its broken pipe would fail the check.
+    if airflow config get-value core auth_manager | grep "FabAuthManager" 
>/dev/null; then
         echo "Create admin user"
         airflow users create -u admin -p admin -f Thor -l Administrator -r 
Admin -e [email protected] || true
         echo "Admin user created"
diff --git a/scripts/docker/entrypoint_prod.sh 
b/scripts/docker/entrypoint_prod.sh
index 3f431531749..a697e99ce94 100755
--- a/scripts/docker/entrypoint_prod.sh
+++ b/scripts/docker/entrypoint_prod.sh
@@ -160,7 +160,9 @@ function create_www_user() {
         exit 1
     fi
 
-    if airflow config get-value core auth_manager | grep -q "FabAuthManager"; 
then
+    # Not grep -q: at DEBUG level the command still logs to stdout after the 
match, and with pipefail
+    # its broken pipe would fail the check.
+    if airflow config get-value core auth_manager | grep "FabAuthManager" 
>/dev/null; then
         airflow users create \
            --username "${_AIRFLOW_WWW_USER_USERNAME="admin"}" \
            --firstname "${_AIRFLOW_WWW_USER_FIRSTNAME="Airflow"}" \

Reply via email to