-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Hide unused fields for Amazon Web Services connection #25416
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
Hide unused fields for Amazon Web Services connection #25416
Conversation
d97c480
to
d44d9c2
Compare
@o-nikolas @ferruzzi @vincbeck - WDYT? |
Neat. I didn't realize that was an option. I'll have to look into what else that may affect, but I think it's a safe change based on my current understanding. 👍 |
Thanks again for doing these changes! I like that. But I agree with @eladkal, I think renaming these fields to |
Due to the fact that @vincbeck @eladkal @josh-fell agreed that renaming would be less confusing users I prepared this option. Also one question, do you think it is also required rename If everything fine, I will push updates tomorrow. |
Yes please :) |
@gmcrocetti regarding to #25494 Again, my personal thought, I still would suggest to hide Couple month ago I've also played with extra fields in UI, by same way as it implemented in SnowflakeHook airflow/airflow/providers/snowflake/hooks/snowflake.py Lines 85 to 109 in 298be50
However I stoped by couple reasons:
Connection(
conn_id="aws_conn_hell",
conn_type="aws",
extra={
"region_name": "us-east-1",
"extra__aws__region_name": "eu-west-1",
"session_kwargs": {
"region_name": "cn-north-1",
}
}
)
So I would suggest to make |
d44d9c2
to
baf87ec
Compare
Update for review. Seems like errors in CI not related to this PR |
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.
Overall, I like it. Left a couple of small suggestions, but no blocking fixes. 👍
) | ||
|
||
# Generate Environment Variable Name and Connection URI | ||
env_key, conn_uri = f"AIRFLOW_CONN_{conn.conn_id.upper()}", conn.get_uri() |
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.
Nitpick, is there a reason these two assignments are on the same line?
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.
Oh... No reason. Just a copy-paste from my personal scratch file.
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 don't particularly hate it, and I know it's functionally the same thing, it's just not something I see in this codebase so I tend to avoid it for style consistency, that's all.
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 good use case is unpack from tuple but not in this situation. Thanks for mention
@@ -104,6 +104,33 @@ If you are configuring the connection via a URI, ensure that all components of t | |||
Examples | |||
-------- | |||
|
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.
🥇 Nice addition
baf87ec
to
7d5e7ff
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.
LGTM. Again, thanks for all these changes!
Sounds reasonable. As part of #25494, |
Follow up #25256
Seems like
host
,port
,schema
never used in AWS Connection, disable it in UI.