Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Apr 7, 2023

The AIP-44 and AIP-52 are controlled now by environment variables, however those variables were not passed by default to inside the docker-compose environment so they had no effect when set on the ci.yaml. This PR fixes it, but it also sets the variables to be enabled by default in Breeze environment and when the tests are run locally in main using local venv so that the contributors are not surprised when they try to reproduce local failures.

In 2.6 branch, we will set both variables to "false" by default in ci.yml, so that the tests are not run when we cherry-pick the changes.


^ 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.

The AIP-44 and AIP-52 are controlled now by environment variables,
however those variables were not passed by default to inside the
docker-compose environment so they had no effect when set on the
ci.yaml. This PR fixes it, but it also sets the variables to
be enabled by default in Breeze environment and when the tests
are run locally in main using local venv so that the contributors
are not surprised when they try to reproduce local failures.

In 2.6 branch, we will set both variables to "false" by default
in ci.yml, so that the tests are not run when we cherry-pick the changes.
os.environ["AIRFLOW__CORE__UNIT_TEST_MODE"] = "True"
os.environ["AWS_DEFAULT_REGION"] = os.environ.get("AWS_DEFAULT_REGION") or "us-east-1"
os.environ["CREDENTIALS_DIR"] = os.environ.get("CREDENTIALS_DIR") or "/files/airflow-breeze-config/keys"
os.environ["AIRFLOW_ENABLE_AIP_44"] = os.environ.get("AIRFLOW_ENABLE_AIP_44") or "true"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the default if not set when our tests are run. This way the user wil not have to set the variables in their tests when they run in from the IDE (cc: @ephraimbuddy @jedcunningham @eladkal @pierrejeambrun ). I found it highly annoying that I had to set it in main - but still in airflow they will be disabled by default.

In CI in branch 2.6 we will set the vars to be "false" by default, so the tests will be skipped there - even if the change here will be part of 2.6.

@potiuk potiuk merged commit f17eace into apache:main Apr 7, 2023
@potiuk potiuk deleted the turn-aip-44-on-main-by-default branch April 7, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants