-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: greptimedb data bridge #11276
feat: greptimedb data bridge #11276
Conversation
A cool work |
@killme2008 thanks a lot for your contribution! Could you have a look at CI checks failures and try to fix them? Also please let us know if you don't know how to fix something. |
Thank you. I am fixing these failures and adding more tests. So it's still a draft, I'll request your review when it's ready. |
e850a15
to
8cf337a
Compare
@id Hi, the code is ready for review. Would you please approve the Continuous Integration (CI) to run? Then I will investigate the failures in the CI checks and address them accordingly. Thank you. |
@killme2008 CI is running |
All of the new tests have successfully passed: TEST INFO: 2 test(s), 29 case(s) in 2 suite(s)
Testing lib.emqx_bridge_greptimedb.emqx_bridge_greptimedb_SUITE: Starting test, 28 test cases
Config override: log level is set to 'warning'
Listener http:dashboard on :18083 started.
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_authentication_error_on_send_message: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_bad_timestamp: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_boolean_variants: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_const_timestamp: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_create_disconnected: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_get_status: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_missing_field: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_start_already_started: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_start_error: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_start_exception: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_start_ok: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_start_ok_no_subject_tags_write_syntax: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_start_ok_timestamp_write_syntax: OK
%%% emqx_bridge_greptimedb_SUITE ==> with_batch.sync_query.grpcv1_tcp.t_write_failure: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_authentication_error_on_send_message: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_bad_timestamp: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_boolean_variants: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_const_timestamp: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_create_disconnected: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_get_status: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_missing_field: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_start_already_started: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_start_error: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_start_exception: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_start_ok: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_start_ok_no_subject_tags_write_syntax: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_start_ok_timestamp_write_syntax: OK
%%% emqx_bridge_greptimedb_SUITE ==> without_batch.sync_query.grpcv1_tcp.t_write_failure: OK
Stop listener http:dashboard on :18083 successfully.
Testing lib.emqx_bridge_greptimedb.emqx_bridge_greptimedb_SUITE: TEST COMPLETE, 28 ok, 0 failed of 28 test cases
Testing lib.emqx_bridge_greptimedb.emqx_bridge_greptimedb_connector_SUITE: Starting test, 1 test cases
%%% emqx_bridge_greptimedb_connector_SUITE ==> t_lifecycle: OK
Testing lib.emqx_bridge_greptimedb.emqx_bridge_greptimedb_connector_SUITE: TEST COMPLETE, 1 ok, 0 failed of 1 test cases
Updating /Users/dennis/programming/erlang/emqx/_build/test/logs/index.html ... done
Updating /Users/dennis/programming/erlang/emqx/_build/test/logs/all_runs.html ... done
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed |
apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl
Outdated
Show resolved
Hide resolved
apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl
Outdated
Show resolved
Hide resolved
apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl
Outdated
Show resolved
Hide resolved
apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl
Outdated
Show resolved
Hide resolved
@lafirest I resolved almost all of the comments, and some comments not sure are reserved. PTAL, thank u. |
@killme2008 one of the test cases is failing in the new bridge test suite even after re-run could you take a look? |
@id I am currently investigating the issue. It is strange that I am unable to reproduce it on my local machine. It seems that the greptimedb client is unable to establish a connection to the database in the CI docker container. I appreciate your reminder and will rebase the master later. Thank you. |
9aa3d0a
to
9a9793f
Compare
Pull Request Test Coverage Report for Build 5640738765
💛 - Coveralls |
@killme2008 looks like you still need to include this commit into your PR? |
@id Good catch! thank u! Looks like i missed this commit when rebasing with master. |
Fixes #10647
Summary
🤖 Generated by Copilot at e850a15
This pull request adds a new bridge type
greptimedb
to theemqx_bridge
application, which enables emqx to send messages to a greptimedb database via gRPC. It also adds a new applicationemqx_bridge_greptimedb
, which implements the bridge logic, the configuration schema, the api reference, and the unit tests for the greptimedb bridge type. It also adds the docker-compose files, the rebar.config file, and the i18n files to support the new bridge type.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