Просмотр исходного кода

docs(bpapi): Clarify deprecation procedure

k32 4 лет назад
Родитель
Сommit
fbd7b132ca
2 измененных файлов с 7 добавлено и 3 удалено
  1. 3 3
      apps/emqx/src/bpapi/README.md
  2. 4 0
      apps/emqx_bridge/src/emqx_bridge_api.erl

+ 3 - 3
apps/emqx/src/bpapi/README.md

@@ -96,9 +96,9 @@ The following limitations apply to these modules:
 1. Once the minor EMQX release stated in `introduced_in()` callback of
    a module reaches GA, the module is frozen. No changes are allowed
    there, except for adding `deprecated_since()` callback.
-2. After the _next_ minor release after the one deprecating the
-   module reaches GA, the module can be removed.
-3. Old versions of the protocol can be dropped in the next major
+2. If the backplane API was deprecated in a release `maj.min.0`, then
+   it can be removed in release `maj.min+1.0`.
+3. Old versions of the protocols can be dropped in the next major
    release.
 
 This way we ensure each minor EMQX release is backward-compatible with

+ 4 - 0
apps/emqx_bridge/src/emqx_bridge_api.erl

@@ -457,6 +457,10 @@ rpc_call(Node, Mod, Fun, Args) ->
         Res -> Res
     end.
 
+wrap_rpc({badrpc, Reason}) -> {error, Reason};
+wrap_rpc(Ret)              -> Ret.
+
+
 error_msg(Code, Msg) when is_binary(Msg) ->
     #{code => Code, message => Msg};
 error_msg(Code, Msg) ->