-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUST-1712 Support User Configuration for max_connecting
#923
Conversation
This aims to help with #913 (comment), though I would love feedback on the comments I left and whether or not I properly piped through the variable correctly. One specific thing I wanted to call out is that in |
This looks exactly right to me, thank you! I've authorized a CI run and if there are no unexpected failures (there are a few expected ones, test server backend issues) I'll merge this in. |
Thanks! Do you know of a better comment/documentation to describe |
Hmm, not really. @isabelatkinson, do you have thoughts 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.
Code changes look mostly good! There are a few JSON tests for this option we'll need to sync as well. The files are:
pool-checkout-custom-maxConnecting-is-enforced.json
, which should go intosrc/test/spec/json/connection-monitoring-and-pooling/cmap-format/
connection-pool-options.json
, which should go intosrc/test/spec/json/uri-options/
. The file already exists but you can just overwrite it.
Once those are synced they should hopefully be able to run without any extra test runner code changes, but let us know if you run into anything. I can also just push these up to your branch if you'd prefer!
Co-authored-by: Isabel Atkinson <isabelatkinson@gmail.com>
@isabelatkinson I think I've addressed all of the changes you mentioned, lmk if that's not the case |
@isabelatkinson Do you have a sense as to when you'd be able to take a look at this PR again? |
Hi @LuisOsta, I am taking a look now and will get back to you today. |
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.
I authorized a CI run for the most recent commit and it looks like the run_uri_options_spec_tests
test is failing with the following error:
[2023/08/02 19:14:33.200] thread 'client::options::test::run_uri_options_spec_tests' panicked at 'Valid connection pool options are parsed correctly: Error { kind: InvalidArgument { message: "maxconnecting is an invalid option. An option with a similar name exists: maxconnecting" }, labels: {}, wire_version: None, source: None }', src/client/options/test.rs:129:22
I believe adding "maxconnecting"
and corresponding parsing logic to this match statement will resolve this issue.
Thank you for syncing the connection-pool-options.json
test! It looks like the other test wasn't added; maybe it's currently an untracked file on your branch?
@isabelatkinson Thank you for the quick review and the comments! Yes I forgot to include the older test I've added it now and hopefully the provides the needed coverage |
Hi @LuisOsta, I authorized another CI run and I'm seeing the following failures:
and
If you set the |
@isabelatkinson Thanks for the info! I'll see if I can debug it locally and push a fix |
@isabelatkinson @abr-egn Why are there duplicates versions of each test in JSON and YAML? I haven't been able to figure that out. I'll put some work on getting the tests to pass but if y'all have the bandwidth I would appreciate any guidance or patch to fix the tests. Also if y'all know how to run a specific test let me know |
@LuisOsta You can ignore the YAML files. We sync these tests from the MongoDB drivers-wide specifications repo which has the tests in both JSON and YAML format, but they're identical and we only parse/run the JSON. We are currently focused on other high-priority work but we do have this ticket planned for this quarter. We should be able to get to it in the coming month if you're not able to finish it up!
You can pass the name of the test you want to run to
|
@isabelatkinson @abr-egn I think I've fixed the tests and resolved the bugs now! I've run the test suite locally and they're all passing |
@abr-egn @isabelatkinson Interesting there seems to be linting issues but I can't run the linter
Any guidance on how to get that file or what linting issues there are would be great. Also when I run |
@isabelatkinson @abr-egn Can y'all lmk what failed in this EVG run? And if there are problems? I can't see the actual log lines and would love to get this PR finished |
The scripts in .evergreen don't work in a local client, unfortunately. You can run them locally by using the same invocation as in the script directly, i.e.
It looks like the lint failure is just an import order diff:
The rest of the failures are in a CMAP spec test:
Let me know if you can reproduce that - if not I'll take a look. |
@abr-egn Okay I think I've fixed all of the issues, the issue with the cmap was due to a race condition in the test that made it pass sometimes locally. Thanks for the help! |
Can you give more details about the race condition? The tests are run across all drivers, so it's rare that something like that is actually a bug in the test. |
@abr-egn Oh it was fixed and completely on me, it was with how I designed the custom max enforcement test, essentially a misuse of |
It seems that there remained some linting issue though for me running: rustfmt +nightly --unstable-features --check src/**/*.rs and rustfmt +nightly --unstable-features --check src/*.rs locally both worked so I'm unsure what remains |
Sorry! I should have been more specific. The contents of |
@abr-egn Ah I think I misunderstood the testing situation, I've made it align with the spec tests! |
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! The only remaining evergreen failures are known issues unrelated to this PR.
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, thank you for your contribution! we are planning on doing a 2.7.0-beta
release within the next week or so which will include both this PR and #932.
@isabelatkinson Awesome, thanks! And happy to contribute. That's great to hear about the beta release. And when would the stable release be cut? I'd love to be able to plan for that release accordingly |
Adds
max_connecting
as a configureable variable inClientOptions
which is then piped through down toConnectionPoolWorker
which utilizes it to determine the maximum number of pending connections that can be created