<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:21:37 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CDRIVER-4682] Log informational message client-side based on detected environment (DocumentDB or CosmosDB)</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-4682</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;This ticket was split from &lt;tt&gt;DRIVERS-2583&lt;/tt&gt;, please see that ticket for a detailed description. &lt;/p&gt;</description>
                <environment></environment>
        <key id="2391954">CDRIVER-4682</key>
            <summary>Log informational message client-side based on detected environment (DocumentDB or CosmosDB)</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="dbeng-pm-bot">PM Bot</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 Jul 2023 15:10:31 +0000</created>
                <updated>Sat, 28 Oct 2023 11:27:47 +0000</updated>
                            <resolved>Thu, 14 Sep 2023 17:58:04 +0000</resolved>
                                                    <fixVersion>1.25.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5705032" author="xgen-internal-githook" created="Thu, 14 Sep 2023 17:57:49 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@mongodb.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4682&quot; title=&quot;Log informational message client-side based on detected environment (DocumentDB or CosmosDB)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4682&quot;&gt;&lt;del&gt;CDRIVER-4682&lt;/del&gt;&lt;/a&gt; Detect non-MongoDB host names before SRV lookup. (#1401)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;print failing URI on test failure&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;refactor `_detect_nongenuine_hosts` to use separate helper and accept `mongoc_uri_t`&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;move `_detect_nongenuine_hosts` earlier&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This is intended to ease testing. Tests using bogus URIs will fail SRV lookup. Checking before SRV lookup allows tests to observe the log.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;check SRV hostname&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;---------&lt;/p&gt;

&lt;p&gt;Co-authored-by: Jeremy Mikola &amp;lt;jmikola@gmail.com&amp;gt;&lt;br/&gt;
Co-authored-by: Ezra Chung &amp;lt;88335979+eramongodb@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/fe68d3b0c878c7bb1ba7083d713daa392835e441&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/fe68d3b0c878c7bb1ba7083d713daa392835e441&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5687655" author="alex.bevilacqua" created="Thu, 7 Sep 2023 18:43:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmikola%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;jmikola@mongodb.com&quot;&gt;jmikola@mongodb.com&lt;/a&gt; / &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rishabh.bisht%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rishabh.bisht@mongodb.com&quot;&gt;rishabh.bisht@mongodb.com&lt;/a&gt; as discussed on DRIVERS-2583 I&apos;m reopening this ticket to adjust the implementation per the update change summary:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Drivers should detect Cosmos and DocumentDB servers by examining host names added to a topology during MongoClient construction. &lt;font color=&quot;#DE350B&quot;&gt;If SRV is used, this check should be done on the SRV URI&apos;s `{hostname}.{domainname}` prior to SRV lookup (ex: xyz.mongodb.net)&lt;/font&gt;.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="5647796" author="xgen-internal-githook" created="Mon, 21 Aug 2023 18:10:58 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Jeremy Mikola&apos;, &apos;email&apos;: &apos;jmikola@gmail.com&apos;, &apos;username&apos;: &apos;jmikola&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4682&quot; title=&quot;Log informational message client-side based on detected environment (DocumentDB or CosmosDB)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4682&quot;&gt;&lt;del&gt;CDRIVER-4682&lt;/del&gt;&lt;/a&gt; log informational message for nongenuine hosts (#1374)&lt;/p&gt;

&lt;p&gt;Nongenuine hosts are detected after SRV resolution; however, we cannot easily mock SRV responses so that is intentionally not tested.&lt;/p&gt;

&lt;p&gt;Matching is anchored to the end of the host string. This necessitated moving mongoc-uri&apos;s ends_with function to mongoc-util in order to share it with mongoc-topology.&lt;/p&gt;

&lt;p&gt;Co-authored-by: Ezra Chung &amp;lt;88335979+eramongodb@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/36c1f141b55272f8d09a8492ef74fd9d701d16f6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/36c1f141b55272f8d09a8492ef74fd9d701d16f6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5621666" author="jmikola@gmail.com" created="Tue, 8 Aug 2023 21:03:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/1374&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/pull/1374&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="2391955">CXX-2713</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                                                <inwardlinks description="split from">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2391968">PHPLIB-1194</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i202t4:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_21457" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Upstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;DRIVERS-2583:&lt;br/&gt;
Drivers should detect Cosmos and DocumentDB servers by examining host names added to a topology during MongoClient construction. If SRV is used, this check should be done on the SRV URI&apos;s `{hostname}.{domainname}` prior to SRV lookup (ex: xyz.mongodb.net).&lt;/p&gt;

&lt;p&gt;If one or more host names end with &quot;.cosmos.azure.com&quot; (case-insensitive), log the following message using an &quot;info&quot; level:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;You appear to be connected to a CosmosDB cluster. For more information regarding feature compatibility and support please visit &lt;a href=&quot;https://www.mongodb.com/supportability/cosmosdb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/supportability/cosmosdb&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If one or more host names end with &quot;.docdb.amazonaws.com&quot; or &quot;.docdb-elastic.amazonaws.com&quot; (case-insensitive), log the following message using an &quot;info&quot; level:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;You appear to be connected to a DocumentDB cluster. For more information regarding feature compatibility and support please visit &lt;a href=&quot;https://www.mongodb.com/supportability/documentdb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/supportability/documentdb&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Drivers should not emit more than one log message per MongoClient construction.&lt;/p&gt;

&lt;p&gt;Note: there are no spec/prose tests for this ticket. Each driver should implement its own set of tests for this behavior. The libmongoc tests from &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/1374&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb/mongo-c-driver#1374&lt;/a&gt; may be used as a reference.&lt;br/&gt;
Note#2: Refer to &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2753&quot; title=&quot;Introduce &amp;quot;client&amp;quot; logging category&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2753&quot;&gt;DRIVERS-2753&lt;/a&gt; if using standardized logging.&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>