-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(NODE-3183,NODE-3249): bring versioned API impl up to date #2814
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Bring the versioned API code up to date by addressing NODE-3183 and NODE-3249. Specifically: - Bump the versioned API tests to the latest version using `./etc/update-spec-tests.sh versioned-api`. - Manually apply the SDAM updates from mongodb/specifications@9946950 (because a full update would have also come with load balancer changes that do not pass yet). - Update the test runner slightly to account for the fact that some fields may have only a `$$unsetOrMatches` operator as its contents and thus the set of expected keys in an “expected” object is not a fixed-size set. - Remove the special check for getMore and transaction commands, and now pass the apiVersion for them as well when it is specified. - Use the `hello` command instead of `isMaster` when an API version is specified; make sure that the slightly different response format does not break anything by setting the `ismaster` property manually in that case. - Updating the mock server message handlers to account for both types of handshakes, everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think the suggestions I would have had are part of NODE-3281 and don't need to happen here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a failure still, it is the same test it just happens to be one of the duplicated tests meant to test the unified test runner.
A successful find event with a getmore and the server kills the cursor
in test/spec/unified-test-format/valid-pass/poc-command-monitoring.yml
I tried debugging a bit and it appears the server isn't killing the cursor (which I believe is returning a 0 cursor id) so this line is kind of the source of the error. I'll check with other drivers if this test is an issue for all of us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NODE-3308
It is a shared failure so we can go ahead and merge this. It LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Description
What changed?
Bring the versioned API code up to date by addressing NODE-3183 and
NODE-3249.
Specifically:
./etc/update-spec-tests.sh versioned-api
.mongodb/specifications@9946950
(because a full update would have also come with load balancer
changes that do not pass yet).
fields may have only a
$$unsetOrMatches
operator as its contentsand thus the set of expected keys in an “expected” object is
not a fixed-size set. (This was necessary in order for the updated
versioned-api tests to pass)
now pass the apiVersion for them as well when it is specified.
hello
command instead ofisMaster
when an API version isspecified; make sure that the slightly different response format
does not break anything by setting the
ismaster
property manuallyin that case.
of handshakes, everywhere.
Are there any files to ignore?
I mean, the spec tests were really just updated automatically. The mock tests updates were performed semi-automatically, i.e. I did an automatic replacement and then went through all update sites + all message handlers manually to verify that they were not invalid changes. (Some of the tests are using replies like
mock.DEFAULT_ISMASTER_36
. I’m not sure if it makes sense to actually update those, considering that the name implies a MongoDB 3.6 response. I don’t think it hurts, though.)