Skip to content

Commit c8b1d25

Browse files
committed
Fix some OTP-27 Dialyzer errors in rabbitmq_peer_discovery_etcd
And disable those checks in CI for now. We are getting errors because of the eetcd dependency and we can't upgrade at this time (see comment in the commit).
1 parent ff8780b commit c8b1d25

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/test-make-type-check.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ jobs:
4242
- rabbitmq_management_agent
4343
- rabbitmq_peer_discovery_common
4444
- rabbitmq_peer_discovery_consul
45-
- rabbitmq_peer_discovery_etcd
45+
# @todo We are getting errors because of wrong types
46+
# in the eetcd dep. But upgrading requires using gun 2.0,
47+
# which we can't because another app's dep, emqtt, requires
48+
# gun 1.3.x. So for now we don't type check this plugin.
49+
#- rabbitmq_peer_discovery_etcd
4650
- rabbitmq_peer_discovery_k8s
4751
- rabbitmq_prelaunch
4852
- rabbitmq_prometheus

deps/rabbitmq_peer_discovery_etcd/src/rabbitmq_peer_discovery_etcd_v3_client.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ callback_mode() -> [state_functions, state_enter].
8787
terminate(Reason, State, Data) ->
8888
rabbit_log:debug("etcd v3 API client will terminate in state ~tp, reason: ~tp",
8989
[State, Reason]),
90-
disconnect(?ETCD_CONN_NAME, Data),
90+
_ = disconnect(?ETCD_CONN_NAME, Data),
9191
rabbit_log:debug("etcd v3 API client has disconnected"),
9292
rabbit_log:debug("etcd v3 API client: total number of connections to etcd is ~tp", [length(eetcd_conn_sup:info())]),
9393
ok.
@@ -157,13 +157,13 @@ recover(internal, start, Data = #statem_data{endpoints = Endpoints, connection_m
157157
}};
158158
{error, Errors} ->
159159
[rabbit_log:error("etcd peer discovery: failed to connect to endpoint ~tp: ~tp", [Endpoint, Err]) || {Endpoint, Err} <- Errors],
160-
ensure_disconnected(?ETCD_CONN_NAME, Data),
160+
_ = ensure_disconnected(?ETCD_CONN_NAME, Data),
161161
Actions = [{state_timeout, reconnection_interval(), recover}],
162162
{keep_state, reset_statem_data(Data), Actions}
163163
end;
164164
recover(state_timeout, _PrevState, Data) ->
165165
rabbit_log:debug("etcd peer discovery: connection entered a reconnection delay state"),
166-
ensure_disconnected(?ETCD_CONN_NAME, Data),
166+
_ = ensure_disconnected(?ETCD_CONN_NAME, Data),
167167
{next_state, recover, reset_statem_data(Data)};
168168
recover({call, From}, Req, _Data) ->
169169
rabbit_log:error("etcd v3 API: client received a call ~tp while not connected, will do nothing", [Req]),

0 commit comments

Comments
 (0)