Skip to content

Incorporated SRV format in connection string#1

Open
Krish-cloudsufi wants to merge 14 commits intodevelopfrom
srv
Open

Incorporated SRV format in connection string#1
Krish-cloudsufi wants to merge 14 commits intodevelopfrom
srv

Conversation

@Krish-cloudsufi
Copy link
Owner

Incorporated SRV format in connection string and introduced a toggle property in MongoDB plugin UI.

pom.xml Outdated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this change

pom.xml Outdated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this change

Copy link

@vikasrathee-cs vikasrathee-cs Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it primitive at all places

if (!containsMacro(MongoDBConstants.HOST) && Strings.isNullOrEmpty(host)) {
throw new InvalidConfigPropertyException("Host must be specified", MongoDBConstants.HOST);
}
if (!containsMacro(MongoDBConstants.PORT)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep this condition as when useSRV is not macro and not true, this validation is required

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link

@vikasrathee-cs vikasrathee-cs Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Connect Using SRV String as field and label name in widget and also add the same in md doc file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add same description that you have added in md file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change field name also

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I make it as connectUsingSRV ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name should be same as given in widget.json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding 'is' as a prefix doesnt make much sense, keep it just connectUsingSRVString

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove blank lines

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a small description

Copy link

@vikasrathee-cs vikasrathee-cs Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make boolean primitive at all places


**Password:** Password to use to connect to the specified database.

**Connect Using SRV String:** Toggle to determine whether to use an SRV connection string for MongoDB. It can be

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add same to sink also

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename this also to CONNECT_USING_SRV_STRING

@Description("Toggle to determine whether to use an SRV connection string for MongoDB. It can be " +
"enabled if the MongoDB deployment supports SRV DNS records for connection resolution.")
@Nullable
private boolean connectUsingSRVString;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this condition below to check this plugin property whether it contains macro or not, but the plugin property is not annotated with @macro annotation.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Collaborator

@sgarg-CS sgarg-CS Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to boolean ? as the main config file uses the primitive type for the same variable.
Boolean can cause NPE, if the variable is not set.

@sgarg-CS
Copy link
Collaborator

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments