-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5280] conn: Remove aws_default's default region name #5879
Conversation
41f4bd8
to
7dfb15b
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.
At the very least please update the docs about Managing AWS connections to mention this.
7dfb15b
to
f8a154f
Compare
@ashb I am also happy to just update the docs if you think that would be better -- it's just that I haven't found this documented anywhere and do not see a significant advantage in keeping it the way it currently is. My scope is just quite limited, so I am happy to be proved wrong :) Thanks! |
https://airflow.apache.org/howto/connection/aws.html (which should be docs/source/howto/connection/aws.rst) |
f8a154f
to
2822f13
Compare
* The `aws_default` by default specifies the `region_name` to be `us-east-1` in its `extra` field. This causes trouble when the desired AWS account uses a different region as this default value has priority over the $AWS_REGION and $AWS_DEFAULT_REGION environment variables, gets passed directly to `botocore` and does not seem to be documented. * This commit removes the default region name from the `aws_default`'s extra field. This means that it will have to be set manually, which would follow the "explicit is better than implicit" philosophy. * The AWS_DEFAULT_REGION variable has been added to the test executing scripts, so that they would still pass. * A quick note on this change has been added to the AWS connection documentation as well. Signed-off-by: mr.Shu <[email protected]>
2822f13
to
599fe2d
Compare
@ashb I got the tests to pass once Let me try to reiterate once again why do I think this change should be applied: When you install Airflow right now and use either the That said, if you do not agree with this change for any reason, I am happy to close this PR and create a new one that would only add the documentation bit. Thanks again! |
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.
I think this is a sensible change - following the convention for people familiar with AWS tools is the right thing to do.
We should add a note about this to UPDATING.md - note that anyone existing install won't have the connection edited, so this isn't a "breaking change" but I think it is worth calling out in the updating instructions.
Co-Authored-By: Ash Berlin-Taylor <[email protected]>
…/remove_aws_default_conn_region_name Signed-off-by: mr.Shu <[email protected]>
…m:mrshu/airflow into mrshu/remove_aws_default_conn_region_name
* Mention the change of aws_default region in `UPDATING.md` Signed-off-by: mr.Shu <[email protected]>
19f33b5
to
a38caa2
Compare
Thanks @ashb, I've added a few lines to Note that the The tests seem to be failing here sporadically, but mostly because the Thanks! |
UPDATING.md
Outdated
### Changes to FileSensor | ||
FileSensor is now takes a glob pattern, not just a filename. If the filename you are looking for has `*`, `?`, or `[` in it then you should replace these with `[*]`, `[?]`, and `[[]`. | ||
|
||
### Change dag loading duration metric name | ||
Change DAG file loading duration metric from |
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.
Could you avoid making white-space only changes to the rest of this file? (This will make this change harder to cherry-pick back to the release branch)
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.
Understood -- will do in a new commit.
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.
These changes still are here - can you remove them please.
Co-Authored-By: Ash Berlin-Taylor <[email protected]>
* Fix whitespace in `UPDATING.md` which happend before. Signed-off-by: mr.Shu <[email protected]>
…m:mrshu/airflow into mrshu/remove_aws_default_conn_region_name
de16321
to
8763ac6
Compare
…/remove_aws_default_conn_region_name Signed-off-by: mr.Shu <[email protected]>
8763ac6
to
8d9a5d9
Compare
Thanks for all the help here @ashb! |
Codecov Report
@@ Coverage Diff @@
## master #5879 +/- ##
==========================================
+ Coverage 79.99% 80.01% +0.01%
==========================================
Files 610 610
Lines 35176 35176
==========================================
+ Hits 28140 28146 +6
+ Misses 7036 7030 -6
Continue to review full report at Codecov.
|
…/remove_aws_default_conn_region_name Signed-off-by: mr.Shu <[email protected]>
@ashb I've just noticed there was a conflict in the Please do let me know if I can do anything else here. Thanks! |
ea93332
to
3cf92f2
Compare
* Add a note on change in aws_default's region Signed-off-by: mr.Shu <[email protected]>
3cf92f2
to
0076b70
Compare
…/remove_aws_default_conn_region_name Signed-off-by: mr.Shu <[email protected]>
@ashb Sorry for the delay here, both the conflict and the whitespace issues should be resolved here. The PR should be otherwise (hopefully) ready. Thank you for your patience again! |
…/remove_aws_default_conn_region_name Signed-off-by: mr.Shu <[email protected]>
7dea464
to
4748f8e
Compare
@ashb |
Hmmmm - thinking about this a bit more, does this mean that on a "bare" install the aws_default connection won't work? |
@ashb It will not work in the sense that you will additionally need to specify either the I would argue that the I firmly believe that explicit is better than implicit, especially in cases of default configuration. Hence, I see it more as fixing a small bug than changing some already-established behavior. |
[ci-skip]
The `aws_default` by default specifies the `region_name` to be `us-east-1` in its `extra` field. This causes trouble when the desired AWS account uses a different region as this default value has priority over the $AWS_REGION and $AWS_DEFAULT_REGION environment variables, gets passed directly to `botocore` and does not seem to be documented. This commit removes the default region name from the `aws_default`'s extra field. This means that it will have to be set manually, which would follow the "explicit is better than implicit" philosophy. (cherry picked from commit 781d001)
Make sure you have checked all steps below.
Jira
Description
The
aws_default
by default specifies theregion_name
to beus-east-1
in itsextra
field. This causes trouble when the desiredAWS account uses a different region as this default value has priority
over the $AWS_REGION and $AWS_DEFAULT_REGION environment variables,
gets passed directly to
botocore
and does not seem to be documented.This commit removes the default region name from the
aws_default
'sextra field. This means that it will have to be set manually, which
would follow the "explicit is better than implicit" philosophy.
Signed-off-by: mr.Shu [email protected]
Tests
I am not sure how to provide a test here, but I am happy to follow any guidance on this matter.
Commits
Documentation
Code Quality
flake8