Commit Graph

57 Commits

Author SHA1 Message Date
Thales Macedo Garitezi 11c169501e
chore(mix): fix app dependencies and reboot apps (emqx_conf)
While declaring `emqx_conf` as an application dependency of
`emqx_resource` worked for releases, it messed up the startup
relationship during tests.  Since only removing `emqx_conf` from the
`applications` key in `emqx_resource` breaks the list of apps that
need to be rebooted on config changes (since `emqx_conf` is not on any
apps dependencies list, it was not being added to the final
topologically sorted list), we now always add it as a vertex to ensure
its presence there.  This (apparently) makes the rebar3 release, the
mix release and test runs behave normally.
2021-12-23 13:48:28 -03:00
Thales Macedo Garitezi 34d6dbca61
chore(mix): simplify build by using rebar3 for umbrella apps
By treating the apps in the umbrella as dependencies to be managed and
built by rebar3, we can simplify the maintenance of the release, at
the cost of increased build times: using Mix as before, it could track
changed files better than using rebar.  But the complexity and
possibility of discrepancies make it using rebar much more compelling.
2021-12-22 09:40:01 -03:00
Thales Macedo Garitezi 917575de5a
chore(mix): minimal elixir mix release build
This commit enables a minimal working build of EMQX release using
Mix.  However, to properly start the release, several configuration
steps are still missing.  A `mix_release.sh` script does a few hacks
to get the release built with Mix to start properly, by first assuming
that `make emqx` has been run prior to the release, ran once to
generate the `app.*.config` files, and then it copies that and some
other files to the expected places.

Also, `emqx_telemetry` hangs the start procedure because it thinks
it's in an official release and tries to make a request.  We disable
it temporarily via config just to get a working build for now.
2021-12-21 13:51:22 -03:00
Shawn a879ec0f3a feat(resource): add option 'force_create' to emqx_resource:create/4 2021-12-20 10:26:27 +08:00
Shawn a44e18e869 fix(bridge): filter out some extra fields from the request body 2021-12-18 19:19:58 +08:00
Shawn 11e8e0db69 fix(bridge): stop http failed due to econnrefused 2021-12-18 15:33:25 +08:00
Shawn 46838a08cc fix(resource): update testcases for after_query functions 2021-11-23 10:41:45 +08:00
Shawn 9aa63358e6 fix(resource): type spec for resource_data() 2021-11-23 10:04:31 +08:00
Shawn 29ad6d215e feat(resource): add metrics to emqx_resource 2021-11-23 10:04:31 +08:00
Ilya Averyanov 071c2c99e8 refactor(authn resources): add `emqx_resource` and `emqx_authn` tests 2021-11-22 21:08:04 +03:00
Shawn 9c93ea0338 feat(connector): add API for /connectors_test 2021-11-22 17:35:33 +08:00
Zaiming Shi 56e2a9741f style: ensure newline at EOF for all files 2021-11-04 14:40:14 +01:00
zhanghongtong 2307bdd868 fix(emqx_resource): fix InstId type error 2021-10-25 13:43:28 +08:00
lafirest 3524942766 fix: change all ~s in io format to ~ts
we should use unicode to replace latin1
2021-10-12 15:09:24 +08:00
zhouzb ddfc010fdb fix(resource): fix undefined function 2021-09-16 16:53:43 +08:00
JimMoen deac54c847 chore(for editor): Add comments for Emacs major mode. 2021-09-16 15:43:30 +08:00
Shawn 304c5613ac refactor(resource): rename the emqx_resource:update/4 to recreate/4 2021-09-15 17:46:42 +08:00
Shawn d46241fe2f feat(bridges): avoid clientid competition between bridges on different nodes 2021-09-10 14:21:17 +08:00
Shawn bfb2df37ce refactor(bridge): rename emqx_data_bridge to emqx_bridge 2021-09-10 11:43:03 +08:00
zhongwencool c1c24af002 fix: dialyzer warning 2021-08-27 10:09:26 +08:00
zhongwencool 73238ed81f feat: emqx_resource support cluster_call 2021-08-26 17:23:39 +08:00
Zaiming Shi e6232665a3 refactor(emqx): ensure app shutdown and reboot order
make use of application dependency to ensure start order.
also the same dependency top-sorted for shutdown and reboot order
2021-08-04 08:40:03 +02:00
Zaiming Shi b10fb4e95d refactor: unify all io:format calls to use the same macro 2021-08-01 09:36:59 +02:00
Zaiming Shi d0e9d4c4d5 fix(emqx_resource): raise error when failed to pick worker 2021-07-29 12:34:16 +02:00
zhanghongtong 178bafbabf chore: rename required function to not_empty
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-09 14:18:41 +08:00
zhanghongtong c10d154dab chore(connector): update schema file
Signed-off-by: zhanghongtong <rory-z@outlook.com>
2021-07-09 14:18:41 +08:00
Shawn 704af9f3b1
The config handler phase2 (#5052)
* refator(config_handler): handle and validate the updates to raw_configs

* fix(hocon): update hocon to 0.8.0

* refactor(config_handler): check and apply envs only in top-level handler

* refactor(config_handler): update config from top level to bottom level

* refactor(emqx_data_bridge): move configs to emqx.conf

* fix(emqx_schema): remove the extra config path

* fix(config_handler): load the emqx.conf when starting emqx_config_handler

* fix(data_bridge): API not working

* feat(config_handler): save updated configs to emqx_override.conf

* fix(config_handler): cannot find the emqx.conf and emqx_override.conf

* fix(emqx_config): cannot find the correct path for etc dir

* fix(test): load load emqx_schema foreign refereced apps

* refactor(emqx_plugin): do not generate configs before load plugins

All configs (including the configs for plugins) now should go into
the `emqx.conf`.

* fix(tests): update the test cases for plugins

* fix(tests): don't include schema from apps when testing

* fix(tests): use emqx-ct-helper branch hocon
2021-06-25 11:47:18 +08:00
Shawn 8978464269
change resource,connectors,data_bridges as normal apps (#5034) 2021-06-19 16:27:21 +08:00
turtleDeng 54dedc8343 Revert "chore: mv emqx_connector to emqx_data_bridge"
This reverts commit d640e2ccfa.
2021-06-17 19:11:10 +08:00
Turtle d640e2ccfa chore: mv emqx_connector to emqx_data_bridge 2021-06-17 16:42:41 +08:00
turtleDeng 0515ef6e45
feat(connector): add more connector (#4985) 2021-06-16 11:28:26 +08:00
Shawn 444c721f93 fix(config): change handler name to emqx_data_bridge_config_handler 2021-06-16 11:27:34 +08:00
Shawn b11afc6997 fix(config): start the top level config handler at emqx bootup 2021-06-16 11:27:34 +08:00
Zaiming Shi 9a78f812e1 fix(emqx_resource): fix schema schema definition 2021-06-15 12:35:08 +02:00
Shawn 1de2f5cb2f fix(emqx_data_bridge): update bridge failed 2021-06-08 21:46:52 +08:00
Shawn fdd0233103 feat(emqx_resource): update the demo.md 2021-06-08 21:46:52 +08:00
Shawn 65dc2f2be8 feat(emqx_resource): remove the schema sugar from parse transformed code 2021-06-08 21:46:52 +08:00
Shawn bdf6374414 fix(emqx_resource): disable the debug print for parse-transformed code 2021-06-07 22:11:05 +08:00
Shawn 149a54cef4 fix(emqx_resource): dialyzer issues 2021-06-07 22:08:21 +08:00
Shawn 3c1c457697 fix(emqx_resource): call to undefined function hocon:richmap_to_map/1 2021-06-07 21:54:17 +08:00
Shawn 16c0a5b80a fix(emqx_resource): merge conflict 2021-06-07 21:25:19 +08:00
Shawn a37b3957e3
Merge branch 'master' into emqx_connector 2021-06-07 21:12:00 +08:00
Shawn 4914b003ac feat(emqx_resource): update the unused APIs 2021-06-07 17:20:34 +08:00
Shawn 2ff92d2880 feat(emqx_data_bridge): add HTTP APIs for data bridge 2021-06-07 16:12:06 +08:00
Shawn 4f451ee862 feat(emqx_resource): delete API generation from parse transfrom 2021-06-05 15:30:21 +08:00
Shawn f1552f4f4f feat(emqx_data_bridge): create emqx_data_bridge 2021-06-04 23:47:16 +08:00
Shawn 9617b65d52 fix(dialyzer): incorrect function spec 2021-06-03 13:35:57 +08:00
Shawn 03519d7e61 fix(emqx_resource): HTTP APIs for emqx_resource not working 2021-06-03 13:35:57 +08:00
Shawn 3da62e59d6 fix(emqx_connector): the HTTP API for emqx_connector_mysql 2021-06-03 01:24:30 +08:00
Shawn 49c5edce2e fix(emqx_connector): start emqx_connector_mysql failed 2021-06-02 17:28:47 +08:00