-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Mongo updates #1737
Mongo updates #1737
Conversation
very welcome improvements on MongoDB :) |
2ac2add
to
6dc6e40
Compare
That's as much as I can fix in the the CI runs now. If you re-run, it should pass |
Bumps the MongoDB driver to latest upstream. Adds DNS SRV support to MongoDB in vmq_diversity. Add authentication to MongoDB test. Adds Docker Compose file for local testing. New CI profile to get tests with external services running in GitHub Actions. Bumps `rebar3` binary to latest.
7358642
to
dde6c11
Compare
SslOpts = proplists:get_value(ssl_opts, WorkerArgs0), | ||
WorkerArgs1 = proplists:delete(ssl, WorkerArgs0), | ||
WorkerArgs2 = proplists:delete(ssl_opts, WorkerArgs1), | ||
mc_worker_api:connect([{ssl,Ssl}, {ssl_opts, SslOpts}|WorkerArgs2]) |
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.
does mc_worker_api:connect/1
change anything in behaviour? vs. mc_worker:start_link/1
?
(fine with me, I'm just wondering what the difference is as the params are the same.
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.
Yeah. It's a thin wrapper around mc:worker:start_link/1
.
If you pass login
and password
in the proplist, it authenticates the connection.
https://github.com/comtihon/mongodb-erlang/blob/master/src/api/mc_worker_api.erl#L64-L68
I am not sure how authentication was working without this.
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.
Jep, good for me including the rebar3 bump (worst case I can always go change that).
pkg_hash_ext
is new in rebar.lock
Have not functionally tested the MongoDB stuff but looks good to merge.
Bump MongoDB driver to upstream with SRV (vernemq#1737)
* Update THANKS * Changing default: Don't make bridge direct_plugin_exports (subscribe,… (#1629) * Changing default: Don't make bridge direct_plugin_exports (subscribe, publish etc) wait for cluster readiness * Routing through QoS to internal PublishFun * Update changelog.md * Fix handling of WebSocket protocols (#1635) Correctly handles mutliple values in the `sec_websocket_protocol` HTTP header. * Update rebar.lock * Update rebar.config * Update changelog.md * Improve Proxy protocol error logging (#1637) * Adds usage information for vmq-admin retain command (#1) (#1639) * vmq-admin usage() includes retain command * Update changelog.md * Update vmq_diversity.schema * Update changelog.md * Update changelog.md * Fix size for database pools not being honored (#1657) * Ensure_that_MQTT_v5_user_properties_are_stored_to_disk/DB_#1560 (#1655) * Ensure_that_MQTT_v5_user_properties_are_stored_to_disk/DB_with_a_message_#1560 * relax p_msg_val_pre() type to allow properties to be persisted with payload Co-authored-by: ioolkos <[email protected]> * Fix RPC query * Add "m" shortcut for "more" * update certifi to 2.5.3 (#1685) * Allow configuration of buffer sizes for vmq_cluster_com, and autotune 'buffer' for vmq_cluster_node * no need for masking * Make Watermarks configurable for vmq_cluster_com listener * Update Hackney to 1.17.0 [dependency] * Update changelog.md * Webhooks HTTPS Enhancements Adds HTTPS-specific options to the webhooks module and tests. Allows users to specify a custom CA and verification options. Allows hooks to authenticate to endpoints with client certificates. Adds PEM validation to the vmq_server and vmq_webhooks schemas. * Updated clique dependency to fix trailing equal sign (Issue #1673) * Add missing server cert for webhooks test suite * Fix verify function Corrects the verify function to take the endpoint hostname. Sets reuse_sessions to false when verifying the peer certificate. * Add GitHub Actions * Update index.html Remove Slack * Webhooks HTTPS improvements (#1711) * Webhooks HTTPS improvements This adds CRL checking, which is enabled by default. It adds a number of tests to HTTPS Webhooks functionality, including: * fail if CRLs are required but not available * fail if the endpoint certificate is expired * fail if the endpoint certificate Common Name does not match hostname * Update index.html Remove Slack * Bump to trigger CI Co-authored-by: ioolkos <[email protected]> * Add macOS to CI (#1715) * Create ADOPTERS.md * Bump MongoDB driver to upstream with SRV (#1737) Bumps the MongoDB driver to latest upstream. Adds DNS SRV support to MongoDB in vmq_diversity. Add authentication to MongoDB test. Adds Docker Compose file for local testing. New CI profile to get tests with external services running in GitHub Actions. Bumps `rebar3` binary to latest. * Revert rebar3 (#1740) Reverts rebar3 to earlier version to fix broken release. Adds a smoke test in GitHub actions to detect broken releases in CI. * Update internal Luerl interface (luerl:do/1 is no more), update Luerl dependency (#1745) * Update changelog.md * upgrade to Cowboy 2.8.0 (#1747) * upgrade to Cowboy 2.8.0 * Add upgrade note to changelog. * Ignores the top-level data dir (#1749) * Support the MongoDB auth_source connect option (#1750) * Safe binary to term (#1752) * Validate UTF8 strings in topics and use safe binary_to_term. * Update changelog * update hackney to 1.17.4 (#1756) * fix ws options in proxy_protocol case (#1739) * fix ws options in proxy_protocol case * get peer info from proxy info * basic connect test for ws proxy protocol * add test for proxy protocol local command * Update changelog.md * Create FUNDING.yml * Update deps (#1772) * update hackney to 1.17.4 * pin rebar3_cuttlefish to commit tag * dialyzer Co-authored-by: Andrew Varner <[email protected]> Co-authored-by: Luke Dudney <32501671 [email protected]> Co-authored-by: Ruben Gees <[email protected]> Co-authored-by: Steve Lee <[email protected]> Co-authored-by: Drew Varner <[email protected]> Co-authored-by: wojciech.luczkow <[email protected]>
* Update THANKS * Changing default: Don't make bridge direct_plugin_exports (subscribe,… (vernemq#1629) * Changing default: Don't make bridge direct_plugin_exports (subscribe, publish etc) wait for cluster readiness * Routing through QoS to internal PublishFun * Update changelog.md * Fix handling of WebSocket protocols (vernemq#1635) Correctly handles mutliple values in the `sec_websocket_protocol` HTTP header. * Update rebar.lock * Update rebar.config * Update changelog.md * Improve Proxy protocol error logging (vernemq#1637) * Adds usage information for vmq-admin retain command (#1) (vernemq#1639) * vmq-admin usage() includes retain command * Update changelog.md * Update vmq_diversity.schema * Update changelog.md * Update changelog.md * Fix size for database pools not being honored (vernemq#1657) * Ensure_that_MQTT_v5_user_properties_are_stored_to_disk/DB_#1560 (vernemq#1655) * Ensure_that_MQTT_v5_user_properties_are_stored_to_disk/DB_with_a_message_#1560 * relax p_msg_val_pre() type to allow properties to be persisted with payload Co-authored-by: ioolkos <[email protected]> * Fix RPC query * Add "m" shortcut for "more" * update certifi to 2.5.3 (vernemq#1685) * Allow configuration of buffer sizes for vmq_cluster_com, and autotune 'buffer' for vmq_cluster_node * no need for masking * Make Watermarks configurable for vmq_cluster_com listener * Update Hackney to 1.17.0 [dependency] * Update changelog.md * Webhooks HTTPS Enhancements Adds HTTPS-specific options to the webhooks module and tests. Allows users to specify a custom CA and verification options. Allows hooks to authenticate to endpoints with client certificates. Adds PEM validation to the vmq_server and vmq_webhooks schemas. * Updated clique dependency to fix trailing equal sign (Issue vernemq#1673) * Add missing server cert for webhooks test suite * Fix verify function Corrects the verify function to take the endpoint hostname. Sets reuse_sessions to false when verifying the peer certificate. * Add GitHub Actions * Update index.html Remove Slack * Webhooks HTTPS improvements (vernemq#1711) * Webhooks HTTPS improvements This adds CRL checking, which is enabled by default. It adds a number of tests to HTTPS Webhooks functionality, including: * fail if CRLs are required but not available * fail if the endpoint certificate is expired * fail if the endpoint certificate Common Name does not match hostname * Update index.html Remove Slack * Bump to trigger CI Co-authored-by: ioolkos <[email protected]> * Add macOS to CI (vernemq#1715) * Create ADOPTERS.md * Bump MongoDB driver to upstream with SRV (vernemq#1737) Bumps the MongoDB driver to latest upstream. Adds DNS SRV support to MongoDB in vmq_diversity. Add authentication to MongoDB test. Adds Docker Compose file for local testing. New CI profile to get tests with external services running in GitHub Actions. Bumps `rebar3` binary to latest. * Revert rebar3 (vernemq#1740) Reverts rebar3 to earlier version to fix broken release. Adds a smoke test in GitHub actions to detect broken releases in CI. * Update internal Luerl interface (luerl:do/1 is no more), update Luerl dependency (vernemq#1745) * Update changelog.md * upgrade to Cowboy 2.8.0 (vernemq#1747) * upgrade to Cowboy 2.8.0 * Add upgrade note to changelog. * Ignores the top-level data dir (vernemq#1749) * Support the MongoDB auth_source connect option (vernemq#1750) * Safe binary to term (vernemq#1752) * Validate UTF8 strings in topics and use safe binary_to_term. * Update changelog * update hackney to 1.17.4 (vernemq#1756) * fix ws options in proxy_protocol case (vernemq#1739) * fix ws options in proxy_protocol case * get peer info from proxy info * basic connect test for ws proxy protocol * add test for proxy protocol local command * Update changelog.md * Create FUNDING.yml * Update deps (vernemq#1772) * update hackney to 1.17.4 * pin rebar3_cuttlefish to commit tag * dialyzer Co-authored-by: Andrew Varner <[email protected]> Co-authored-by: Luke Dudney <32501671 [email protected]> Co-authored-by: Ruben Gees <[email protected]> Co-authored-by: Steve Lee <[email protected]> Co-authored-by: Drew Varner <[email protected]> Co-authored-by: wojciech.luczkow <[email protected]>
Proposed Changes
This PR does a few things.
vmq_diversity
for SRV seed lookup in MongoDBTypes of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CODE_OF_CONDUCT.md
documentFurther Comments
This bumps
rebar3
like #1731 did. I am happy to back that part out if needed.The CI profile is a temporary workaround to get us some more testing in CI. Eventually we need all the things tested in Actions. Then, we can ditch the CI profile in for the all tests profile. However, I think this is definitely better than the status quo.
I'll add the DNS SRV documentation if this gets approved. The DNS SRV stuff and the latest MongoDB driver will help if we tackle #1471.
This also probably fixes #1117. I tested my MongoDB changes DNS SRV explicitly against Atlas Cloud databases and it worked in driver tests.
There's no good way to test the SRV functionality in CI because it depends on DNS records.
The diversity suite completely passes locally with the Docker Compose file.