kaxil opened a new pull request #12362:
URL: https://github.com/apache/airflow/pull/12362


   Becase `2c6edca13270` (Resource based permissions) & `849da589634d` (Prefix 
DAG permissions)
   were run before `92c57b58940d_add_fab_tables.py` and 
`03afc6b6f902_increase_length_of_fab_ab_view_menu_.py`,
   the FAB tables were already created because those migrations imported `from 
airflow.www.app import create_app`
   which calls the following lines that creates tables:
   
   
https://github.com/dpgaspar/Flask-AppBuilder/blob/0e7f62418be0aea056302769ebac7d9bfa2bdd4e/flask_appbuilder/security/sqla/manager.py#L86-L97
   
   Previously:
   
   ```
   INFO  [alembic.runtime.migration] Running upgrade bef4f3d11e8b -> 
98271e7606e2, Add scheduling_decision to DagRun and DAG
   INFO  [alembic.runtime.migration] Running upgrade 98271e7606e2 -> 
52d53670a240, fix_mssql_exec_date_rendered_task_instance_fields_for_MSSQL
   INFO  [alembic.runtime.migration] Running upgrade 52d53670a240 -> 
849da589634d, Prefix DAG permissions.
   [2020-11-14 02:35:43,055] {manager.py:727} WARNING - No user yet created, 
use flask fab command to do it.
   [2020-11-14 02:35:46,790] {migration.py:515} INFO - Running upgrade 
849da589634d -> 364159666cbd, Add creating_job_id to DagRun table
   [2020-11-14 02:35:46,794] {migration.py:515} INFO - Running upgrade 
364159666cbd -> 2c6edca13270, Resource based permissions.
   [2020-11-14 02:35:46,795] {app.py:87} INFO - User session lifetime is set to 
43200 minutes.
   [2020-11-14 02:35:46,806] {manager.py:727} WARNING - No user yet created, 
use flask fab command to do it.
   [2020-11-14 02:35:48,221] {migration.py:515} INFO - Running upgrade 
2c6edca13270 -> 45ba3f1493b9, add-k8s-yaml-to-rendered-templates
   [2020-11-14 02:35:48,226] {migration.py:515} INFO - Running upgrade 
45ba3f1493b9 -> 92c57b58940d, Create FAB Tables
   [2020-11-14 02:35:48,227] {migration.py:515} INFO - Running upgrade 
92c57b58940d -> 03afc6b6f902, Increase length of FAB ab_view_menu.name column
   ```
   
   Now:
   
   ```
   INFO  [alembic.runtime.migration] Running upgrade bef4f3d11e8b -> 
98271e7606e2, Add scheduling_decision to DagRun and DAG
   INFO  [alembic.runtime.migration] Running upgrade 98271e7606e2 -> 
52d53670a240, fix_mssql_exec_date_rendered_task_instance_fields_for_MSSQL
   INFO  [alembic.runtime.migration] Running upgrade 52d53670a240 -> 
364159666cbd, Add creating_job_id to DagRun table
   INFO  [alembic.runtime.migration] Running upgrade 364159666cbd -> 
45ba3f1493b9, add-k8s-yaml-to-rendered-templates
   INFO  [alembic.runtime.migration] Running upgrade 45ba3f1493b9 -> 
92c57b58940d, Create FAB Tables
   INFO  [alembic.runtime.migration] Running upgrade 92c57b58940d -> 
03afc6b6f902, Increase length of FAB ab_view_menu.name column
   INFO  [alembic.runtime.migration] Running upgrade 03afc6b6f902 -> 
849da589634d, Prefix DAG permissions.
   [2020-11-14 02:57:18,886] {manager.py:727} WARNING - No user yet created, 
use flask fab command to do it.
   [2020-11-14 02:57:22,380] {migration.py:515} INFO - Running upgrade 
849da589634d -> 2c6edca13270, Resource based permissions.
   ```
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ 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:
[email protected]


Reply via email to