[DRIVERS-2698] Clarify that the unified test format is not intended to run on community servers Created: 18/Aug/23  Updated: 28/Oct/23  Resolved: 26/Sep/23

Status: Closed
Project: Drivers
Component/s: Unified Test Runner
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jérôme Tamarelle Assignee: Bailey Pearson
Resolution: Fixed Votes: 0
Labels: leads-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DRIVERS-2630 Add e2e testing against Atlas to the ... Closed
is related to DRIVERS-2688 Search index unified tests should spe... Backlog
Driver Changes: Not Needed

 Description   

Summary

DRIVERS-2549 added a new search index management API to the index-management spec. The unified test files added by this tickets were modified by DRIVERS-2630 to validate the the error message returned by the server.

Search index commands are only supported with Atlas.

This message is only returned by the enterprise version. The community version have an other message

no such command: 'createSearchIndexes'

After discussion (see comments), it was decided that the unified test format is not intended to run with community servers. The spec should be clarified to say that enterprise servers should be used with unified tests.

Motivation

Who is the affected end user?

Drivers engineers.

How does this affect the end user?

It does not.

How likely is it that this problem or use case will occur?

Developers running the tests on community version get unexpected failures.

If the problem does occur, what are the consequences and how severe are they?

Engineers are stuck until they figure out they must run the driver tests against the enterprise version.
The problem can be solved by implementing a check before running the UTR.

Example in PHPLIB.

Is this issue urgent?

No, as long as the engineers are aware of the problem and can implement the check as described in the previous question.

Is this ticket required by a downstream team?

No

Is this ticket only for tests?

Yes, this ticket is only for tests.

Acceptance Criteria

  • Update the unified test format spec to state that only enterprise servers are intended to be supported.


 Comments   
Comment by Githook User [ 26/Sep/23 ]

Author:

{'name': 'Bailey Pearson', 'email': 'bailey.pearson@mongodb.com', 'username': 'baileympearson'}

Message: DRIVERS-2698: clarify that the unified test format is only intended for enterprise servers (#1462)
Branch: master
https://github.com/mongodb/specifications/commit/14916f76fd92b2686d8e3d1f0e4c2d2ef88ca5a7

Comment by Tom Selander [ 22/Aug/23 ]

Drivers Triage: bailey.pearson@mongodb.com can you investigate this drivers ticket to see what can be done here? This came up as potentially related to DRIVERS-2688

cc daria.pardue@mongodb.com 

Comment by Jeremy Mikola [ 18/Aug/23 ]

Detecting Atlas can likely be done by checking that the host name ends with ".mongodb.net" or ".mongodb-dev.net" (similar to what is being done in DRIVERS-2583).

Detecting enterprise servers is a bit more involved, but we have prior art for that in PHPLIB:

function isEnterprise(): bool
{
    $buildInfo = $this->getPrimaryServer()->executeCommand(
        $this->getDatabaseName(),
        new Command(['buildInfo' => 1])
    )->toArray()[0];
 
    if (isset($buildInfo->modules) && is_array($buildInfo->modules)) {
        return in_array('enterprise', $buildInfo->modules);
    }
 
    throw new UnexpectedValueException('Could not determine server modules');
}

This entails checking if an "enterprise" string exists in the modules array field in the buildInfo command response.

Generated at Thu Feb 08 08:26:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.