[DRIVERS-2612] Bump minServerVersion for CSFLE deterministic encryption spec test for explain command Created: 21/Apr/23  Updated: 21/Aug/23

Status: Implementing
Project: Drivers
Component/s: Client Side Encryption
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-77040 Append API version fields to root of ... Closed
Issue split
split to CDRIVER-4664 Bump minServerVersion for CSFLE deter... Backlog
split to CSHARP-4679 Bump minServerVersion for CSFLE deter... Backlog
split to CXX-2699 Bump minServerVersion for CSFLE deter... Backlog
split to JAVA-5029 Bump minServerVersion for CSFLE deter... Backlog
split to NODE-5359 Bump minServerVersion for CSFLE deter... Backlog
split to RUST-1679 Bump minServerVersion for CSFLE deter... Backlog
split to GODRIVER-2873 Bump minServerVersion for CSFLE deter... Closed
split to MOTOR-1141 Bump minServerVersion for CSFLE deter... Closed
split to PYTHON-3743 Bump minServerVersion for CSFLE deter... Closed
split to RUBY-3279 Bump minServerVersion for CSFLE deter... Closed
split to PHPLIB-947 Failure in test-requireApiVersion tas... Closed
Related
is related to SERVER-69564 Query analysis omits version API fiel... Closed
is related to PHPLIB-947 Failure in test-requireApiVersion tas... Closed
Driver Changes: Needed
Server Compat: 7.0, 7.1
Downstream Changes Summary:

Sync legacy CSFLE spec tests to mongodb/specifications@08c206e.

Engineering Lead: Kevin Albertson Kevin Albertson
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
PHPLIB-947 Fixed 1.17.0
CDRIVER-4664 Backlog
CXX-2699 Backlog
CSHARP-4679 Backlog
GODRIVER-2873 Fixed 1.13.0, 1.13.1
JAVA-5029 Backlog
NODE-5359 Backlog
MOTOR-1141 Duplicate
PYTHON-3743 Fixed 4.6
RUBY-3279 Fixed 2.19.2
RUST-1679 Backlog

 Description   

Summary

The "Explain a find with deterministic encryption" test in explain.yml has historically failed when Testing with required API version due to a bug in crypt_shared (SERVER-69564). PHP previously had to skip this test to avoid failures (PHPLIB-947).

SERVER-69564 was fixed in 6.3.0-rc0, but this also depends on SERVER-77040 (7.1.0-rc0) and BACKPORT-16190 (7.0.0-rc4). The spec test's minServerVersion should be bumped to 7.0.0 so it can run in all drivers' test suites without being skipped.

If drivers previously had no record of this test failure, it's likely they were never running CSFLE spec tests (specifically with crypt_shared) while requiring an API version. That'd be worth looking into as part of this issue (and should be communicated in downstream changes).

Motivation

Who is the affected end user?

Driver test suites.

How does this affect the end user?

A CSFLE spec test has historically failed when run with a required API version.

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

All drivers should have experienced a test failure. If they did not, it's likely they were not running CSFLE tests with a required API version, which would violate the Stable API test guidelines.

Is this issue urgent?

No.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Githook User [ 23/Jun/23 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: DRIVERS-2612: Require 7.0+ for explain apiVersion bug fix (#1435)

In previous server versions, apiVersion is not properly appended to the root of an explain command document.

When testing with requireApiVersion=1, that can cause test failures if the driver does not have additional logic to always append the field to a crypt_shared/mongocryptd response.
Branch: master
https://github.com/mongodb/specifications/commit/08c206ea4772d024ba80a13454d261d54eca8d4d

Comment by Jeremy Mikola [ 16/Jun/23 ]

https://github.com/mongodb/specifications/pull/1435

Comment by Kevin Albertson [ 11/May/23 ]

Here is a patch build of the PHP driver with the test unskipped:
https://spruce.mongodb.com/version/64540f1f1e2d17415fcf80ef/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
Tests fail on 6.0 and latest.

The error does not reproduce in the Go driver using server 6.0.4 and crypt_shared 6.0.4. The Go driver appends apiVersion after encrypting the command. The command sent from the Go driver includes the apiVersion at the root of the document.

Filed SERVER-77040 and marking this ticket as Blocked until this is fixed in mongocryptd and crypt_shared.

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