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

[AIRFLOW-5280] conn: Remove aws_default's default region name #5879

Merged
merged 14 commits into from
Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ assists users migrating to a new version.

## Airflow Master

### Changes to `aws_default` Connection's default region

The region of Airflow's default connection to AWS (`aws_default`) has
previously been set to `us-east-1` during installation.

The region now needs to be set manually either in the connection screens in
Airflow, or via the `AWS_DEFAULT_REGION` environment variable.

### Changes to import paths and names of GCP operators and hooks

According to [AIP-21](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-21%3A+Changes+in+import+paths)
Expand Down
3 changes: 1 addition & 2 deletions airflow/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ def initdb():
extra='{"path": "/"}'))
merge_conn(
Connection(
conn_id='aws_default', conn_type='aws',
extra='{"region_name": "us-east-1"}'))
conn_id='aws_default', conn_type='aws'))
merge_conn(
Connection(
conn_id='spark_default', conn_type='spark',
Expand Down
2 changes: 2 additions & 0 deletions docs/howto/connection/aws.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Default Connection IDs

The default connection ID is ``aws_default``.

.. note:: Previously, the ``aws_default`` connection had the "extras" field set to ``{"region_name": "us-east-1"}`` on install. This means that by default the ``aws_default`` connection used the ``us-east-1`` region. This is no longer the case and the region needs to be set manually, either in the connection screens in Airflow, or via the ``AWS_DEFAULT_REGION`` environment variable.

Configuring the Connection
--------------------------

Expand Down
3 changes: 3 additions & 0 deletions run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export AIRFLOW__CORE__UNIT_TEST_MODE=True
# add test/test_utils to PYTHONPATH TODO: Do we need that ??? Looks fishy.
export PYTHONPATH=${PYTHONPATH:=}:${AIRFLOW_SOURCES}/tests/test_utils

# make sure the default AWS_REGION is set
export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:='us-east-1'}

echo Airflow home: "${AIRFLOW_HOME}"
echo Airflow root: "${AIRFLOW_SOURCES}"
echo Home of the user: "${HOME}"
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/in_container/entrypoint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ export PATH=${PATH}:${AIRFLOW_SOURCES}

export AIRFLOW__CORE__UNIT_TEST_MODE=True

# Make sure all AWS API calls default to the us-east-1 region
export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:='us-east-1'}

# Fix codecov build path
# TODO: Check this - this should be made travis-independent
if [[ ! -h /home/travis/build/apache/airflow ]]; then
Expand Down