<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:21:19 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>[DRIVERS-348] Resync CRUD spec tests organized by minServerVersion and maxServerVersion</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-348</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;CRUD tests are now organized by &lt;tt&gt;minServerVersion&lt;/tt&gt; and &lt;tt&gt;maxServerVersion&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Relevant tag: &lt;a href=&quot;https://github.com/mongodb/specifications/tree/crud-tests-2017-01-10&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;crud-tests-2017-01-10&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="344076">DRIVERS-348</key>
            <summary>Resync CRUD spec tests organized by minServerVersion and maxServerVersion</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Jan 2017 16:23:30 +0000</created>
                <updated>Mon, 15 Apr 2019 17:27:27 +0000</updated>
                            <resolved>Wed, 17 Jan 2018 19:36:11 +0000</resolved>
                                                                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1476474" author="jmikola@gmail.com" created="Fri, 13 Jan 2017 16:45:17 +0000"  >&lt;blockquote&gt;&lt;p&gt;The lack of the &quot;upsertedId&quot; field in &quot;result&quot; would seem to imply that the driver should not return a value of &quot;upsertedId&quot; field to the user, but the relevant versions of the server do generate an _id for the inserted document for this operation, so the C++ driver does return a value of &quot;upsertedId&quot;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I imagine all drivers report the server-generated ObjectID in the &lt;tt&gt;upsertedId&lt;/tt&gt; field. According to the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CRUD spec&lt;/a&gt;, the type of this field is &quot;any&quot; and there is no mention of what to do in the absence of a value. I presume this means drivers should leave it as &lt;tt&gt;null&lt;/tt&gt;. That said, it&apos;s possible the upsert a document and use BSON &lt;tt&gt;null&lt;/tt&gt; as its ID, so &lt;tt&gt;upsertedCount&lt;/tt&gt; is really the source of truth as to whether or not we should consider the contents of &lt;tt&gt;upsertedId&lt;/tt&gt;.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Given this observation, I&apos;m led to believe that (as of this resync) drivers should now be ignoring the presence or absence of fields in their user replies that aren&apos;t mentioned in the &quot;result&quot; document from the tests? That doesn&apos;t seem like a great direction to go in, since it weakens the strength of the assertions that the spec test can make. I wonder if, in the test files, we should be encoding &quot;the upsertedId field should not be present in the user reply&quot; differently from &quot;any value of upsertedId in the user reply is acceptable&quot;?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;My understanding was that fields not present in the &lt;tt&gt;outcome.result&lt;/tt&gt; field within the CRUD spec tests are simply not asserted. I&apos;m happy to clarify that in the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/crud/tests/README.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;test&apos;s README.rst&lt;/a&gt;, as it currently only states that &lt;tt&gt;outcome.result&lt;/tt&gt; is &quot;The return value from the operation.&quot;&lt;/p&gt;

&lt;p&gt;Consider that before &lt;a href=&quot;https://github.com/mongodb/specifications/commit/52425058334fce2b0b31a5cec88cac7d25e65073&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;5242505&lt;/a&gt; many tests were not asserting the value of &lt;tt&gt;upsertedCount&lt;/tt&gt; at all. Also, we omit assertions for &lt;tt&gt;modifiedCount&lt;/tt&gt; in pre-2.6 tests because drivers are free to omit the field, leave it as &lt;tt&gt;null&lt;/tt&gt;, or throw exceptions when it is accessed (per the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/driver-bulk-update.rst#nmodified&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Bulk Update spec&lt;/a&gt;).&lt;/p&gt;</comment>
                            <comment id="1476066" author="rassi@10gen.com" created="Fri, 13 Jan 2017 00:07:57 +0000"  >&lt;p&gt;When resyncing these tests to the C++ driver repository, we ran into an issue with the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/784379e0c1d585d25a62c5c0048bfcec8bc643f0/source/crud/tests/write/replaceOne-pre_2.6.yml#L62-L77&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&quot;ReplaceOne with upsert when no documents match without an id specified&quot; test&lt;/a&gt; in replaceOne-pre_2.6.json.  The lack of the &quot;upsertedId&quot; field in &quot;result&quot; would seem to imply that the driver should not return a value of &quot;upsertedId&quot; field to the user, but the relevant versions of the server do generate an _id for the inserted document for this operation, so the C++ driver does return a value of &quot;upsertedId&quot;.  This issue didn&apos;t affect any previous tests (this test was previously blacklisted on 2.4 and earlier), so I figured I&apos;d bring it up here, in case other folks run into this issue.&lt;/p&gt;

&lt;p&gt;Given this observation, I&apos;m led to believe that (as of this resync) drivers should now be ignoring the presence or absence of fields in their user replies that aren&apos;t mentioned in the &quot;result&quot; document from the tests?  That doesn&apos;t seem like a great direction to go in, since it weakens the strength of the assertions that the spec test can make.  I wonder if, in the test files, we should be encoding &quot;the upsertedId field should not be present in the user reply&quot; differently from &quot;any value of upsertedId in the user reply is acceptable&quot;?  As a short-term fix, we could also remove this test (the spec test repo doesn&apos;t have any other operations that return non-deterministic values as far as I can tell, like insertions of documents that have a generated _id, but we probably should add those eventually).&lt;/p&gt;</comment>
                            <comment id="1475897" author="jmikola@gmail.com" created="Thu, 12 Jan 2017 20:41:32 +0000"  >&lt;p&gt;Validating PHPLIB (per &lt;a href=&quot;https://jira.mongodb.org/browse/PHPLIB-231&quot; title=&quot;Implement test runner for CRUD spec tests&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPLIB-231&quot;&gt;&lt;del&gt;PHPLIB-231&lt;/del&gt;&lt;/a&gt;). Not relevant to HHVM and PHPC.&lt;/p&gt;</comment>
                            <comment id="1475769" author="jmikola@gmail.com" created="Thu, 12 Jan 2017 18:29:35 +0000"  >&lt;p&gt;Note: although &lt;tt&gt;maxServerVersion&lt;/tt&gt; may be changed to be exclusive by SPEC-834 (see: &lt;a href=&quot;https://github.com/mongodb/specifications/pull/129&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;pull request&lt;/a&gt;), this should not require any changes to the tests in the &lt;a href=&quot;https://github.com/mongodb/specifications/tree/crud-tests-2017-01-10&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;crud-tests-2017-01-10&lt;/a&gt; tag.&lt;/p&gt;

&lt;p&gt;That said, drivers will still want to use &quot;&amp;gt;=&quot; and &quot;&amp;lt;&quot; comparisons for &lt;tt&gt;minServerVersion&lt;/tt&gt; and &lt;tt&gt;maxServerVersion&lt;/tt&gt;, respectively.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="346665">CSHARP-1897</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="327131">PHPLIB-231</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="346669">PYTHON-1218</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="346670">RUBY-1196</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="346667">NODE-912</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="346666">JAVA-2428</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="343902">DRIVERS-347</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="326968">DRIVERS-332</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_23952" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Driver Compliance</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<style type='text/css'>
         #scriptField, #scriptField *{
                border: 1px solid black;
            }

            #scriptField{
                border-collapse: collapse;
            }

            #scriptField td {
                text-align: center; /* Center-align text in table cells */
            }

            #scriptField td.key {
                text-align: left; /* Left-align text in the Key column */
            }

            #scriptField a {
                text-decoration: none; /* Remove underlines from links */
                border: none; /* Remove border from links */
            }
            
            /* Add green background color to cells with FixVersion */
            #scriptField td.hasFixVersion {
                background-color: #00FF00; /* Green color code */
            }

            /* Center-align the first row headers */
            #scriptField th {
                text-align: center;
            }
        </style>
<table id='scriptField'>
  <tr>
    <th>Key</th>
    <th>Status/Resolution</th>
    <th>FixVersion</th>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PHPLIB-231'>PHPLIB-231</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>1.1.1</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CSHARP-1897'>CSHARP-1897</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>2.4.3</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SCALA-292'>SCALA-292</a>
    </td>
    <td>Done</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-1218'>PYTHON-1218</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>3.5</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/JAVA-2428'>JAVA-2428</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>3.5.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUBY-1196'>RUBY-1196</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>2.4.2</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PERL-719'>PERL-719</a>
    </td>
    <td>Done</td>
    <td class='hasFixVersion'>2.0.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-912'>NODE-912</a>
    </td>
    <td>Done</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hstlpb:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>