Repository navigation
Add missing features supported in 8.2 and 8.3, add spec_since option for smoke test mode - #735
Merged
Merged
Conversation
eerxuan
force-pushed
the
add-missing-features-8.3
branch
from
November 5, 2026 00:42
efcc366 to
fcf32ab
Compare
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, docs); effort from diff stats (442+2 LOC, 28 files); LLM: Adds new smoke tests and feature-tree rows for 15+ operators supported in MongoDB 8.2, expanding compatibility test coverage across multiple operator categories. If a label is wrong, remove it manually and ping |
- Add a --spec-version option (8.0, 8.2, 8.3; default 8.2). It filters smoke tests only; out-of-scope smoke tests are deselected and listed in the .deselected.json sidecar. - requires(spec_since=..., spec_until=...) gates are allowed only on smoke-marked tests. A spec gate on a non-smoke test stops collection with a usage error that lists the tests. - Spec gates work at folder (spec_gate_folder in conftest.py), file (pytestmark), class and test level. All requires markers on a test now combine; the closest wins on the same key. - The marker validator rejects a spec gate that does not name a known version. The JSON report records the spec version and server versions. - Regular tests always run and expect the MongoDB 8.2.4 answer. - Add smoke tests and feature-tree rows for 8.2 operators (window, score, scoreFusion, vector similarity, system variables, projection $meta) and for 8.3 operators (folder-gated with spec_since="8.3"). Gate the smoke tests an 8.0 server fails with spec_since="8.2". - The setFeatureCompatibilityVersion smoke test sets the server's own current FCV, so it passes on any server version. - dev/compose.yaml adds mongo:8.0.38 and mongo:8.3.13 standalone servers with no CI target; dev ports are published on 127.0.0.1 only. - Update README and docs. Signed-off-by: Yunxuan Shi <yunxuan@amazon.com>
eerxuan
force-pushed
the
add-missing-features-8.3
branch
from
November 19, 2026 20:21
f83a032 to
f47f4c2
Compare
nitinahuja89
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds feature-tree rows and smoke tests for operators the reference server supports but
docs/feature-tree.csvdid not track, and a--spec-versionoption so smoke tests for features from other minor versions can live in the suite without failing runs against older servers.Reference version and spec versions
Expected results are pinned to MongoDB 8.2.4, the CI target. Every test except smoke tests always runs and expects the 8.2.4 answer, whatever
--spec-versionis set to.Only smoke tests (
pytest.mark.smoke) can select a target minor version with--spec-version:8.0,8.2(default) or8.3. There is no8.1spec version; a feature added in 8.1 usesspec_since="8.2".requiresmarker:requires(spec_since="8.3")for a feature added in 8.3,requires(spec_until=...)for one a later version removed. An ungated smoke test runs under every spec.pytestmark), or a folder of smoke tests (spec_gate_folder(__file__, spec_since="8.3")in itsconftest.py).smokemarker stops collection with a usage error that lists the tests.requiresmarkers on a test now combine (folder, module, class, test); the closest wins on the same key. Previously only the closest marker applied..deselected.jsonsidecar, like unmet capabilities.run.New smoke tests and tree rows
Spec 8.2 (15)
$firstN,$lastN,$median,$percentile,$minMaxScaler$score,$scoreFusion$similarityCosine,$similarityDotProduct,$similarityEuclidean$$DESCEND,$$PRUNE,$$KEEP,$$USER_ROLES$metaSpec 8.3 (11), folder-gated with
spec_since="8.3":$mergeObjects(window),$$IDX,$currentDate,$toArray,$toObject,$subtype,$serializeEJSON,$deserializeEJSON,$createObjectId,$hash,$hexHash.Gated
spec_since="8.2"(10 smoke tests an 8.0 server fails):$concatArraysand$setUnionaccumulators,$rankFusion(8.1),$sigmoid,$score,$scoreFusion,$minMaxScaler,$similarityCosine,$similarityDotProduct,$similarityEuclidean(8.2).Tree rows only (4):
$$NOW,$$CLUSTER_TIME,$$CURRENT,$$REMOVEalready had smoke tests.Each smoke test is a capability probe built on
assertCommandSupported. ThesetFeatureCompatibilityVersionsmoke test now sets the server's own current FCV, so it works on any server version.Dev environment
dev/compose.yaml: newmongo-standalone-8.0(mongo:8.0.38, port 27020) andmongo-standalone-8.3(mongo:8.3.13, port 27019) services. Neither is auto-discovered or in the CI matrix; CI stays on 8.2.4.127.0.0.1only.Not added, already covered:
$setUnion, the$first/$lastarray-element forms,$accumulator.Follow-ups: non-operator features the tree does not track yet (schema validation, time series, pipeline updates, read preference/concern, sessions, BSON ordering and limits, Stable API, window bounds, change stream images, cluster parameters, security, wire protocol).
Testing
mongo:8.2.4mongo:8.0.38-m smoke --spec-version 8.0mongo:8.2.4-m smoke --spec-version 8.2mongo:8.3.13-m smoke --spec-version 8.3pytest -m unitpass.