You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/09/30 15:27:40 UTC
[GitHub] [airflow] francescomucio opened a new pull request #11207: Breeze start-airflow command wasn't able to initialize the db in 1.10.x
francescomucio opened a new pull request #11207:
URL: https://github.com/apache/airflow/pull/11207
The database initialization needs a different cli command (the old `initdb`).
Also it is not necessary to create a dummy user in version 1.10.x to allow people to login in the Web UI.
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on a change in pull request #11207: Breeze start-airflow command wasn't able to initialize the db in 1.10.x
Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #11207:
URL: https://github.com/apache/airflow/pull/11207#discussion_r497612001
##########
File path: scripts/in_container/check_environment.sh
##########
@@ -107,8 +107,12 @@ function startairflow_if_requested() {
. "$( dirname "${BASH_SOURCE[0]}" )/configure_environment.sh"
# initialize db and create the admin user if it's a new run
- airflow db init
- airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
+ if [[ ${RUN_AIRFLOW_1_10} == "true" ]]; then
+ airflow initdb
+ else
+ airflow db init
+ airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
Review comment:
```suggestion
airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email || true
```
This will help in case of no RBAC.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] francescomucio commented on a change in pull request #11207: Breeze start-airflow command wasn't able to initialize the db in 1.10.x
Posted by GitBox <gi...@apache.org>.
francescomucio commented on a change in pull request #11207:
URL: https://github.com/apache/airflow/pull/11207#discussion_r497617047
##########
File path: scripts/in_container/check_environment.sh
##########
@@ -107,8 +107,12 @@ function startairflow_if_requested() {
. "$( dirname "${BASH_SOURCE[0]}" )/configure_environment.sh"
# initialize db and create the admin user if it's a new run
- airflow db init
- airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
+ if [[ ${RUN_AIRFLOW_1_10} == "true" ]]; then
+ airflow initdb
+ else
+ airflow db init
+ airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
Review comment:
Actually that line is only for version 2 onward, but it gave me an idea to include `create_user` also for the RBAC setup. See my next commit.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on a change in pull request #11207: Breeze start-airflow command wasn't able to initialize the db in 1.10.x
Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #11207:
URL: https://github.com/apache/airflow/pull/11207#discussion_r500103610
##########
File path: scripts/in_container/check_environment.sh
##########
@@ -107,8 +107,12 @@ function startairflow_if_requested() {
. "$( dirname "${BASH_SOURCE[0]}" )/configure_environment.sh"
# initialize db and create the admin user if it's a new run
- airflow db init
- airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
+ if [[ ${RUN_AIRFLOW_1_10} == "true" ]]; then
+ airflow initdb
+ else
+ airflow db init
+ airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
Review comment:
Ther won't be indeed. But we are still able to install 1.10 in the ./breeze from 2.0 (for convenience) via `--install-airflow-version` . So we should add this option just for that case. I am going to do it shortly.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk merged pull request #11207: Breeze start-airflow command wasn't able to initialize the db in 1.10.x
Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #11207:
URL: https://github.com/apache/airflow/pull/11207
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] feluelle commented on a change in pull request #11207: Breeze start-airflow command wasn't able to initialize the db in 1.10.x
Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #11207:
URL: https://github.com/apache/airflow/pull/11207#discussion_r500097310
##########
File path: scripts/in_container/check_environment.sh
##########
@@ -107,8 +107,12 @@ function startairflow_if_requested() {
. "$( dirname "${BASH_SOURCE[0]}" )/configure_environment.sh"
# initialize db and create the admin user if it's a new run
- airflow db init
- airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
+ if [[ ${RUN_AIRFLOW_1_10} == "true" ]]; then
+ airflow initdb
+ else
+ airflow db init
+ airflow users create -u admin -p admin -f Thor -l Adminstra -r Admin -e dummy@dummy.email
Review comment:
@potiuk there won't be any RBAC option in 2.0 anymore, right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org