-
Notifications
You must be signed in to change notification settings - Fork 347
Allow Redshift user and password to be passed as options #162
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
Conversation
|
@tristanreid, great idea regarding doing the validation in the |
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.
Super minor style nit, but I'd probably change the comma to a semicolon.
|
By the way, this looks good overall; my review comments above are mostly minor nits and should be easy to address; no fundamental code changes needed. |
|
Thanks for the great feedback, Josh. I can get that unit test worked out in the next day or so if you don't get to it. |
|
I'd add the test in |
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'd use if (credsInURL.isDefined) here.
|
Whoops, missed your commit comment earlier. Aside from the minor style nits above, this change looks good to me. |
|
Thanks for the great feedback on this! Should be good to go. By the way, is there a lint / stylechecker available for the Databricks style guide? If not, the rules look pretty easy for me to add on my own, I'm just being lazy (as a good programmer should, of course). |
|
(Closed and re-opened to trigger Travis) |
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.
Scalastyle is complaining about this:
[error] /home/travis/build/databricks/spark-redshift/src/main/scala/com/databricks/spark/redshift/Parameters.scala:66:11: No space after token if
|
Looks like I had Travis disabled for PRs, but should be fixed now. |
Current coverage is
|
|
(Triggering end-to-end integration tests) |
|
Weird: |
|
Ugh...sorry it's taking so many iterations. I don't have the environment to run the integration tests at the moment (in particular the AWS session token) |
|
Is this good to go? |
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.
Should use credentials.foreach { case (user, password => } instead.
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.
done
|
I'll try to take another look later today |
|
Hey Josh, |
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.
According to codecov, it looks like this was never actually hit during tests. I'm going to go ahead and merge this now and will add an end-to-end test myself in a followup patch.
|
This looks fine to me. There's one extra test that I would add, but I can do it myself in a followup. Thanks! |
Per #132, this PR adds user and password options. If these options are present and the user/password are still in the URL, an exception is thrown with a clear error message.
Unit tests are still pending - maybe it's better to check for ambiguous parameters in the Parameter class instead, to make it easier to test? Glad for any other feedback as well!