-
Notifications
You must be signed in to change notification settings - Fork 30
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
Added sslmode/sslrootcert for postgresql and cockroachdb #66
Conversation
f202b07
to
4468a74
Compare
4468a74
to
f6103e4
Compare
This seems reasonable. My primary concern would be with test coverage for parsing the information out. I'd like to make sure we have that covered well. I will take a closer look and play around with the unit tests a bit. I can probably get time next week to do that, just FYI. |
f6103e4
to
2bf4fe6
Compare
Added few more test cases. Please let me know if you have further comment. |
@dmikusa-pivotal |
@dmikusa-pivotal anything we can do to move this forward? |
No, nothing else is needed from your end. It just needs to be reviewed & merged. There are a couple of other PRs here as well, I will try to review them all next week and get a release cut. |
Can you expand on why you have the cockroachdb specifics added into the Postgres processor? The Postgres processor is only going to fire if your binding type is I think we could separate the two without too much fuss. We could do that with an abstract PostgreSqlLikeBindingProcessor class that has the shared implementation. Then you could have PostgreSqlBindingsPropertiesProcessor and CockroachDbBindingsPropertiesProcessor which are final and extend from the abstract class. Or if you don't want to have the abstract class/inheritance, you could possibly implement CockroachDbBindingsPropertiesProcessor as a composable wrapper around PostgreSqlBindingsPropertiesProcessor. Either way, I think you could define a custom binding type and keep the CockroachDb-specific bits in their own class. Does that seem reasonable? |
@dmikusa-pivotal The reasons are:
I have implemented this approach to other binding client libraries. It is also good for Spring-Cloud-Bindings library to be consistent with them as well. |
If you don't want to create a unique binding type that's fine by me. I just wanted to confirm the intent there, thanks for confirming. That said, I would still like to have some separation in the code. The fact that comments are required to document what's being done to me means the complexity is high enough to warrant it (don't get me wrong, I like the comments & links, those are great, I'd just like to see some separation in the code to signify the difference as well). You don't have to implement a full separate processor, but perhaps split out |
2bf4fe6
to
1af77a8
Compare
yes, make sense, I did a new submit for that. |
1af77a8
to
d799d82
Compare
Oh, ok. I was looking at the Postgres docs yesterday and didn't see options listed. That plus the comments lead me to believe it was specific to CockroachDB. I clearly just missed it, thanks for clarifying. This looks great though. I'll re-run tests & get this merged. Thanks! |
#65
Enhanced PostgreSqlBindingsPropertiesProcessor to process the sslmode, sslrootcert, and options under $SERVICE_BINDING_ROOT if they present, and construct the final connection URL with these properties.