-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Fix edge cases of "migrate/create-default-connections" #33136
Conversation
e324782
to
d4b8f68
Compare
e635085
to
377c0ef
Compare
219e8c0
to
6cd4737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting is a little weird to me. Having the first line of the reason in the blue box feels unnecessary.
Yeah. Sphinx is doing things on its own sometimes. I had another verison of it that looked different. Let me try it. |
In apache#32810, "airflow db migrate" command has been added and it is used by `start-airflow` command. There were a few edge cases not covered and this PR completes it. * We can move the "database/load_default_connections" configuration to a new "deprecated" section. This is the first time we remove the option completely as it lost its meaning, but we likely still want to explain that the option was there and what it does when deprecated "db init" command is used. It has no meaning when you use "airflow db migrate" or when you run the new "airflow connections create-default-connections" commands. So we can now remove it completely from configuraiton. It will still work in the "airflow db init" which is deprecated, as long as we provide an explicit fallback. Also if someone had it defined in their config or env variable, it will continue to work even if it is not defined. * We need to explain the change in a significant newsfragment. * The ``start-airflow`` command supports creating default connections with ``--load-default-connections`` flag. This was lost after the change so this PR brings it back by running the new "airflow connections create-default-connections" command if the flag is used. * The `start-airflow` breeze command can be used to start older versions of airflow - with ``--use-airflow-version" - those that do not support `airflow db migrate` command. In this case the old behaviour is used with setting the "AIRFLOW__DATABASE__LOAD_DEFAULT_CONNECTIONS" based on the flag passed and running "airflow db init" instead.
6cd4737
to
d0e1378
Compare
Same flaky as fixed (?) in main. |
In #32810, "airflow db migrate" command has been added and it is used by `start-airflow` command. There were a few edge cases not covered and this PR completes it. * We can move the "database/load_default_connections" configuration to a new "deprecated" section. This is the first time we remove the option completely as it lost its meaning, but we likely still want to explain that the option was there and what it does when deprecated "db init" command is used. It has no meaning when you use "airflow db migrate" or when you run the new "airflow connections create-default-connections" commands. So we can now remove it completely from configuraiton. It will still work in the "airflow db init" which is deprecated, as long as we provide an explicit fallback. Also if someone had it defined in their config or env variable, it will continue to work even if it is not defined. * We need to explain the change in a significant newsfragment. * The ``start-airflow`` command supports creating default connections with ``--load-default-connections`` flag. This was lost after the change so this PR brings it back by running the new "airflow connections create-default-connections" command if the flag is used. * The `start-airflow` breeze command can be used to start older versions of airflow - with ``--use-airflow-version" - those that do not support `airflow db migrate` command. In this case the old behaviour is used with setting the "AIRFLOW__DATABASE__LOAD_DEFAULT_CONNECTIONS" based on the flag passed and running "airflow db init" instead. (cherry picked from commit b672ba4)
In #32810, "airflow db migrate" command has been added and it
is used by
start-airflow
command. There were a few edge casesnot covered and this PR completes it.
to a new "deprecated" section. This is the first time we remove
the option completely as it lost its meaning, but we likely
still want to explain that the option was there and what it does
when deprecated "db init" command is used.
It has no meaning when you use "airflow db migrate" or when you run the
new "airflow connections create-default-connections" commands. So we can
now remove it completely from configuraiton. It will still work
in the "airflow db init" which is deprecated, as long as we provide an
explicit fallback. Also if someone had it defined in their config or
env variable, it will continue to work even if it is not defined.
We need to explain the change in a significant newsfragment.
The
start-airflow
command supports creating default connectionswith
--load-default-connections
flag. This was lost afterthe change so this PR brings it back by running the new
"airflow connections create-default-connections" command if the
flag is used.
The
start-airflow
breeze command can be used to start olderversions of airflow - with ``--use-airflow-version" - those that do not
support
airflow db migrate
command. In this case the old behaviour isused with setting the "AIRFLOW__DATABASE__LOAD_DEFAULT_CONNECTIONS"
based on the flag passed and running "airflow db init" instead.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.