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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mongodb): add configurable option to override legacy protocol usage #11429
Conversation
af90f82
to
0db0ff0
Compare
0db0ff0
to
c533243
Compare
c533243
to
d93e1bb
Compare
{ok, _} = create_bridge(Config, #{<<"use_legacy_protocol">> => <<"true">>}), | ||
?retry( | ||
_Interval0 = 200, | ||
_NAttempts0 = 20, | ||
?assertMatch({ok, connected}, emqx_resource_manager:health_check(ResourceID)) | ||
), | ||
WorkerPids0 = get_worker_pids(Config), | ||
Expected0 = maps:from_keys(WorkerPids0, true), | ||
LegacyOptions0 = maps:from_list([{Pid, mc_utils:use_legacy_protocol(Pid)} || Pid <- WorkerPids0]), | ||
?assertEqual(Expected0, LegacyOptions0), | ||
{ok, _} = delete_bridge(Config), |
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.
nit: maybe put it in a fun?
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.
It's only used here twice, so I don't think it's worth doing it at this point. If it starts getting used more often, it's a good idea.
is it still needed after the client is fixed? |
bump mongo client version ? |
I think it is better to have the option to customize it if needed, even if the auto mechanism is improved.
It is bumped: |
Fixes https://emqx.atlassian.net/browse/EMQX-10750
Fixes #11428
See emqx/mongodb-erlang#39
Summary
馃 Generated by Copilot at af90f82
Added support for different MongoDB protocol versions in the emqx_mongodb and emqx_bridge_mongodb applications. Updated the dependency, test case, configuration, and i18n files accordingly. Bumped the versions of the affected applications.
PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md
filesChecklist for CI (.github/workflows) changes
changes/
dir for user-facing artifacts update