aritra24 commented on code in PR #47691:
URL: https://github.com/apache/airflow/pull/47691#discussion_r2003985483
##########
Dockerfile.ci:
##########
@@ -1029,9 +1029,13 @@ function start_api_server_with_examples(){
echo
airflow dags reserialize
echo "Example dags parsing finished"
- echo "Create admin user"
- airflow users create -u admin -p admin -f Thor -l Administrator -r Admin
-e [email protected]
- echo "Admin user created"
+ if airflow config get-value core auth_manager | grep -q "FabAuthManager";
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"
+ else
+ echo "Skipping user creation as auth manager different than Fab is
used"
Review Comment:
Nit: different from*
##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -509,10 +521,12 @@ def env_variables_for_docker_commands(self) -> dict[str,
str]:
_set_var(_env, "AIRFLOW__CORE__EXECUTOR", self.executor)
_set_var(_env, "AIRFLOW__API__BASE_URL",
f"http://localhost:{WEB_HOST_PORT}")
_set_var(_env, "AIRFLOW__WEBSERVER__SECRET_KEY",
b64encode(os.urandom(16)).decode("utf-8"))
+ _set_var(_env, "AIRFLOW__CORE__AUTH_MANAGER", self.auth_manager_path)
+ _set_var(_env, "AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_USERS",
"admin:admin,viewer:viewer")
_set_var(
_env,
"AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_PASSWORDS_FILE",
- "/files/simple_auth_manager_passwords.json.generated",
+
"/opt/airflow/dev/breeze/src/airflow_breeze/files/simple_auth_manager_passwords.json",
Review Comment:
Is this right? The prefix shouldn't be needed I guess?
--
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]