Skip to content

Conversation

aclark4life
Copy link

…esolved hostnames are identical with three domain levels

Please complete the following before merging:

  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded
    clusters, and serverless).

…esolved hostnames are identical with three domain levels
@aclark4life aclark4life requested a review from a team as a code owner April 22, 2025 01:31
@aclark4life aclark4life requested review from dariakp and removed request for a team April 22, 2025 01:31
@dariakp dariakp requested a review from ShaneHarvey April 22, 2025 13:13
@@ -48,6 +48,10 @@ For this test, run each of the following cases:
- the SRV `mongodb+srv://mongo.local` resolving to `test_1.my_hostmongo.local`
- the SRV `mongodb+srv://blogs.mongodb.com` resolving to `cluster.testmongodb.com`

### 5. Do not throw when return address is identical to SRV hostname and SRV hostname has three or more `.` separated parts

- the SRV `mongodb+srv://blogs.mongodb.com` resolving to `blogs.mongodb.com`
Copy link
Member

Choose a reason for hiding this comment

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

Should we add the case where mongodb+srv://blogs.mongodb.com resolves to test.blogs.mongodb.com? Or is that already tested elsewhere?

Copy link
Author

Choose a reason for hiding this comment

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

Not sure. We're adding the 5th test because the previous 3 tests confirm that an error is raised. Similar to the first test in which we confirm there is no error, this test confirms there is no error. IIUC, a response of test.blogs.mongodb.com is valid because the domains match, but the hostnames are not identical so we're not looking for this particular success in this test case.

@aclark4life aclark4life requested a review from ShaneHarvey April 29, 2025 13:19
@aclark4life
Copy link
Author

@dariakp @ShaneHarvey Just noticed this stalled, what's next (if you happen to recall, else I'll review!) ?

@dariakp
Copy link
Contributor

dariakp commented Sep 15, 2025

@aclark4life The tests are pretty straightforward here and I think the only thing we were waiting on was dev prod; as Shane is the eng lead on the ticket I'll defer to his judgment on what's left to finish this spec change - you have my tentative approval modulo lint issues. It's a good idea to include a link to the driver PR/CI in the description though, for future reference.

@ShaneHarvey
Copy link
Member

@aclark4life these changes LGTM but https://jira.mongodb.org/browse/DEVPROD-17419 added the real SRV hosts so we can actually add JSON spec tests for these two cases. Should we update this PR to remove the prose test and add the spec test files? JSON files are easier for drivers to implement so that would be my preference.

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