potiuk commented on a change in pull request #11099:
URL: https://github.com/apache/airflow/pull/11099#discussion_r493324127
##########
File path: breeze
##########
@@ -117,6 +119,9 @@ function breeze::setup_default_breeze_constants() {
# If set to true, the database will be initialized, a user created and
webserver and scheduler started
export START_AIRFLOW="false"
+ export AIRFLOW__CORE__LOAD_EXAMPLES="true"
Review comment:
You need to set those variables in the _initialization.sh rather than
here. I suggest a new function `initialization::intialize_airflow_variables()`.
The way it works is, that default values for those variables are set in the
_initialization.sh (for both CI and Breeze) and here "default_breeze_constants"
sets only the values for those variables that are different than the default.
If you specify values in the switches, they will override the default values
set in the __initialization. After __initialization is complete, most of the
variables are set to read-only so that we detect any accidental overriding
immediately and avoid any difficult to diagnose mistakes.
Breeze is really the "user-facing" script that uses the "scripts/ci" scripts
under-the-hood, but the CI does not use Breeze.
Context and reasoning:
There are certain variables that should be set by default differently in the
development environment and in the CI". In the development environment you
mostly already have the environment/images etc. set-up and want to take
advantage of it, but in CI you always start from a clean state on a fresh
machine and you need to get everything from the scratch as fast as possible and
you have the GITHUB_TOKEN, images containing latest sources built in the cache
by the "Image Build" workflow, and GCR cache handy. So you can do it much
faster and better if you optimize it, and having different default variables
helps with achieving all the optimisations.
----------------------------------------------------------------
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]