-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add all the properties for MongoDB Service Binding #19517
Conversation
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.
Thanks. I added two comments on the form.
Given these changes are quite invasive, I think a discussion before doing this work would have been welcome. Did you discuss this before with the Quarkus community?
} catch (IOException e) { | ||
throw new IllegalStateException("Unable to determine if file '" + f + "' is a regular file", e); | ||
} | ||
File[] files = directory.toFile().listFiles(f -> { |
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.
This is intentional. We avoid lambdas in runtime code as they have a cost. Please revert this change.
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've reverted this change.
@@ -40,4 +43,19 @@ void testK8s() { | |||
assertThat(binding.getProperties()).containsExactly(entry("test-secret-key", "test-secret-value")); | |||
} | |||
|
|||
} | |||
@Test | |||
|
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.
Unnecessary new 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.
Reverted this change as well as the class under test is reverted.
The only changes in this PR now are related to MongoDB binding. For the k8s binding change, I'll open up a discussion regarding the type comparison change with Quarkus community. |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 58d4bfd
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 #📦 integration-tests/mongodb-rest-data-panache✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
⚙️ JVM Tests - JDK 16 #📦 integration-tests/mongodb-rest-data-panache✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
|
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.
Any idea why the quarkus-integration-test-mongodb-rest-data-panache
which uses service binding fails?
Are the properties I had added there not correct? If so, please update them
|
||
private void setUsername(ServiceBinding binding, Map<String, String> properties) { | ||
String username = getDbProperty(binding, DB_USER); // encodeIfContainsSpecialCharacters(getDbProperty(binding, DB_USER)); | ||
LOGGER.info(format("MongoDB username=%s", username)); |
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.
Are you sure these need to be INFO?
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.
Not really. They can be at the debug
level too. I wasn't sure about the convention, hence, I added them at the info
level. If that's not desirable then I can change it to debug
.
I also realized that I left a commented part that shouldn't be there anymore (same as where I'm getting username). I'll remove that as well
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.
Yeah, let's make them debug please
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.
Let me also look at the integration tests as well. Could be because the connection string property doesn't contain username or password anymore.
When done, please squash the commits |
…railing slash before options + handling host and port in one property. Setting Quarkus user/pass separately from connection string. Set log level to debug. Fixed integration tests Logging at debug level instead of info and fixed host+port binding file for integration test failures.
DBAAS-42: Added all the properties for MongoDB. Fixed an issue with trailing slash before options + handling host and port in one property. Setting Quarkus user/pass separately from connection string.
Also changed the type comparison by ignoring case