Fix(redshift): add missing db_user parameter for IAM auth#5687
Fix(redshift): add missing db_user parameter for IAM auth#5687synthpieter wants to merge 4 commits into
Conversation
5c38736 to
f20bb1b
Compare
|
@synthpieter it looks like there is some conflict with the base branch. Would you mind looking into revolving that? |
|
@StuffbyYuki I just fixed the conflict! To be honest there was something going on with a test in the pipeline before and tried to fix that, but honestly couldn't make it work at the time. That looks gone though! |
|
@synthpieter k it looks like your commits need DCO checks. Could you add them? "All proposed commits should include a Signed-off-by: line in their commit message. This is most conveniently done by using --signoff (-s) when running git commit." |
|
Once everything looks good I'll merge this PR! |
|
@synthpieter Just following up on my last comment! |
|
@synthpieter Another follow up here |
Signed-off-by: Bram Deenik <2051506+synthpieter@users.noreply.github.com>
Signed-off-by: Bram Deenik <2051506+synthpieter@users.noreply.github.com>
Signed-off-by: Bram Deenik <2051506+synthpieter@users.noreply.github.com>
41fc6c3 to
5979453
Compare
|
@StuffbyYuki Sorry for the delay, I'm not actively working with SQLMesh at the moment, so the urgency for my own fix was gone ;) I think (and hope) I fixed it right! |
Problem
SQLMesh's Redshift connection configuration was missing the
db_userparameter, which is required by theredshift_connectorlibrary when using IAM authentication.When enabling iam (iam: True) in the connection config it throws, understandably so, an InterfaceError
However, it was not allowed to add this parameter to the config.
So iam authentication was not really useable.
Solution
Added the
db_userfield to theRedshiftConnectionConfigclass in three places:db_user: t.Optional[str] = Noneto the class"db_user"to the_connection_kwargs_keyspropertyUsage
With this fix, you can now configure Redshift IAM authentication in
config.yaml:Fixes #2146
Disclaimer
This is my first contribution to an open source project ever, so please let me know if this is the right way of doing things :)
I locally give the fix a spin and it seems to fix the problem!