-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
allow multiple elements in impersonation chain #35694
allow multiple elements in impersonation chain #35694
Conversation
needs static checks fixes |
9aa4bc6
to
ffae40a
Compare
cc: @VladaZakharova and team -> do you think it's a safe change (in terms of , being always recognized as separator) |
Hi! |
@VladaZakharova essentially there's a bug in the current implementation where there is no actual way to pass in a list of strings via the connection (since |
ffae40a
to
e75544a
Compare
e75544a
to
4dbc17e
Compare
Could you please provide your test using this operator where you are using multiple SA in |
@VladaZakharova imo the added unit tests should be sufficient, given it's just extending the current functionality already in the provider |
I just want to be sure that previous functionality really doesn't work without your changes, since it is quite strange. That is why i have kindly asked you if you can provide system test that you have used to check this functionality. |
Yes. My question is also - what's the problem with keeping the sequence as before? WHY do you think using array is not good enough @melugoyal ? Is there a particular reason you want to introduce coma separated string that having array does not allow? Can you show an example case where this is problematic? |
@VladaZakharova @potiuk please correct me if i'm wrong but i don't see how you can specify a list of strings when configuring a connection through the Airflow UI for a connection field that is a string. this change allows the user to specify a comma-separated list of strings in the Airflow UI for the |
Correct me if I am wrong - but I think you cannot do it with your change either? The impersonation_chain can only be passed by Hook / Operator init parameters, not through connection extra (which is what you are suggesting) ? And it is defined like this everywhere in those:
But.maybe I am missing something ?? |
IMHO You'd need to implement quite a lot more changes to allow impersonation chain to be passed by extra (including fields customisations) - and I am not even sure if it is a good idea (I'd revert it to @VladaZakharova and others from Google to have a say on that). |
Ah.. I see - I completely forgotten about the other PR :) You have to remember that when you look at multiple 10s of PRs a day it's hard to remember that something have been mentioned at description and you might simply not realise that when you look at just the code but have not re-read all the description from the beginning (I understand for you might be obvious because those are the only two PRs you are looking at. With this context - it is clear what you are after. Now I would refer to @VladaZakharova and team to asy if having impersonation in extra seem like good idea or not - becasue really this is what should be decided (when it is, then indeed this one makes sense). |
Hi!
|
Thank you for explanation, i think we can merge the changes |
#33715 added the
impersonation_chain
parameter to Google Cloud connections, but didn't allow any way to set multiple values for the impersonation chain. with this change, users can specify a comma-separated list of service accounts to be used in the impersonation chain^ 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.