Repository navigation
Bind the capabilities the operator tags left unmapped - #4590
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
Every capability the manual documents is now bound, inferred, excluded or a reviewed gap. Tokens documented in several contexts are bound to the factories that write each context's form; contexts and facets the factories can't write go in the coverage plan's new missing list, which reports MISSING_TYPED_API with its reason and titles the issue with it. A selector may also claim an operator the manual documents only in other contexts, as push with a list claims $each. A declaration that serves several capabilities carries the earliest one's annotation; a missing or earlier annotation for a later one is LATER_VARIANT. AggregationOptions#let gains its 5.0 server annotation.
This branch has not been deployed
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.
Stacked on #4589 (
audits-update-reads). Step 5 of the plan: bindings for the 102 capabilities the operator tags leftUNKNOWN_MAPPING.Problem
The coverage report left 102 capabilities as
UNKNOWN_MAPPING, which is neither published nor counted as present. Two different causes produced them:77 tokens the manual documents in several contexts:
$sumas an accumulator and a window function;$pushas an accumulator and an update operator;$avgas an expression, an accumulator and a window function.The Morphia factories carry
@aggregation.expression $sum, a tag that covers all three aggregation contexts, so inference rightly refused to choose.$mergeand$outhave their tag on the class rather than the factory method, which inference doesn't read.25 facets: documented variants of an existing operator, each with its own version, such as
$converttoarray(8.3),$lookup's concise correlated syntax (5.0) and$out's time-series options (6.3). Facets are never inferred.Change
Bindings, 105 entries in
coverage-plan.json:$mergeand$outare bound toMerge#mergeandOut#out.$bsonSize9.0,$textmemory limits and explain output. Others are variants the builder already writes, such as$lookup's concise syntax throughLookup#pipelineand$mergewith aggregate-level variables throughAggregationOptions#let.Reviewed gaps: a new
missinglist in the plan records a capability the tagged API claims but can't express. It reportsMISSING_TYPED_APIwith its reason, and the published issue's title carries the reason's first sentence so variants of one operator can be told apart. There are 18:$concatArrays,$setUnionas accumulators and window functions{$concatArrays: ["$items"]}, never the accumulator form{$concatArrays: "$items"}$top,$bottom,$topN,$bottomNas expressions (8.3)output, not the expression'sinput$convertto array or object (8.3), to binData (9.0), binary subtypes,format(8.3)ConvertTypehas no array, object or binData target, andConvertExpressionnoformatarrayIndexAson$filterand$map(8.3)$currentOp'stargetAllNodes(7.1)CurrentOplacks the option$outtime-series options (6.3)Outhas no time-series support$elemMatchas a projectionFindOptionshas noelemMatchprojection;Filters.elemMatchis the query predicateComparison rule changes:
UpdateOperators#push(String, List)claims both$pushand$each, and previously that made both bindings ambiguous. A claim of another operator in the same context, or of one the manual doesn't document, is still ambiguous.LATER_VARIANT, which isn't published. For example,ObjectExpressions#mergeObjectsserves the accumulator and also the window function added in 8.3, andLookup#pipelineserves base$lookupand the 5.0 concise form. An annotation newer than the capability's own introduction is still a finding.Core:
AggregationOptions#letgains@mongodb.server.release 5.0. Its missing annotation was the one real version finding the new bindings surfaced.Result at docs e4b0c153
The weekly job would file 32
MISSING_APIissues: the 14 new server expressions plus the 18 reviewed gaps. It would file no version findings.Decisions to review
missinglist is a new plan concept. Before this, the plan had no way to record "reviewed: Morphia can't express this", so facets like these stayed unmapped indefinitely. A gap can't also be bound or excluded, and contract validation rejects that.$textmemory limits" and "$planCacheStatsoutput". Morphia expresses the operator, and the server applies the behavior. Excluding them would also have been defensible.arrayIndexAs,$converttargets,$outtime series and the expression forms of$top/$bottom), they'd become follow-up PRs.$merge,$outand pipeline updates still have nodsl-bindings.jsonentry, so Run the page's own read after a write #4589's paired reads don't generate yet. That would be its own step.Testing
concatArraysandsetUnionas accumulators, andtop/bottomas expressions) and an annotation suppression that was too broad.Self-reviewed only.