Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log migrations info in consistent way #14158

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Feb 9, 2021

same as #13458 but for 82b7c48c147f_remove_can_read_permission_on_config_.py migration

This migration changes logging handlers
so each next migration is differently formatted when doing
airflow db reset. This commit fixes this behavior.

Before:

INFO  [alembic.runtime.migration] Running upgrade 849da589634d -> 2c6edca13270, Resource based permissions.
INFO  [alembic.runtime.migration] Running upgrade 2c6edca13270 -> 61ec73d9401f, Add description field to connection
INFO  [alembic.runtime.migration] Running upgrade 61ec73d9401f -> 64a7d6477aae, fix description field in connection to be text
INFO  [alembic.runtime.migration] Running upgrade 64a7d6477aae -> e959f08ac86c, Change field in DagCode to MEDIUMTEXT for MySql
INFO  [alembic.runtime.migration] Running upgrade e959f08ac86c -> 82b7c48c147f, Remove can_read permission on config resource for User and Viewer role
[2021-02-09 19:17:31,307] {migration.py:555} INFO - Running upgrade 82b7c48c147f -> 449b4072c2da, Increase size of connection.extra field to handle multiple RSA keys
Upgrades done
root@78916ec8c0e5:/opt/airflow# exit

After:

INFO  [alembic.runtime.migration] Running upgrade 849da589634d -> 2c6edca13270, Resource based permissions.
[2021-02-09 19:17:24,539] {manager.py:727} WARNING - No user yet created, use flask fab command to do it.
INFO  [alembic.runtime.migration] Running upgrade 2c6edca13270 -> 61ec73d9401f, Add description field to connection
INFO  [alembic.runtime.migration] Running upgrade 61ec73d9401f -> 64a7d6477aae, fix description field in connection to be text
INFO  [alembic.runtime.migration] Running upgrade 64a7d6477aae -> e959f08ac86c, Change field in DagCode to MEDIUMTEXT for MySql
INFO  [alembic.runtime.migration] Running upgrade e959f08ac86c -> 82b7c48c147f, Remove can_read permission on config resource for User and Viewer role
INFO  [alembic.runtime.migration] Running upgrade 82b7c48c147f -> 449b4072c2da, Increase size of connection.extra field to handle multiple RSA keys
Upgrades done
root@78916ec8c0e5:/opt/airflow# exit


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@kaxil kaxil added this to the Airflow 2.0.2 milestone Feb 9, 2021
same as apache#13458 but for `82b7c48c147f_remove_can_read_permission_on_config_.py` migration

This migration changes logging handlers
so each next migration is differently formatted when doing
airflow db reset. This commit fixes this behavior.
@XD-DENG XD-DENG merged commit e423e38 into apache:master Feb 10, 2021
@kaxil kaxil deleted the log-migrations branch February 10, 2021 18:36
ashb pushed a commit that referenced this pull request Mar 19, 2021
same as #13458 but for `82b7c48c147f_remove_can_read_permission_on_config_.py` migration

This migration changes logging handlers
so each next migration is differently formatted when doing
airflow db reset. This commit fixes this behavior.

(cherry picked from commit e423e38)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants