Skip to content

Commit cd85cc9

Browse files
Merge pull request #14703 from rabbitmq/loic-problem-matchers
CI: Enable Erlang problem matchers
2 parents faba1c6 + f05b18d commit cd85cc9

File tree

17 files changed

+57
-36
lines changed

17 files changed

+57
-36
lines changed

.github/workflows/test-make-target.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ jobs:
6464
# restricted to the build jobs to avoid duplication in output.
6565
disable_problem_matchers: true
6666

67+
# We install Erlang problem matchers from ci.erlang.mk.
68+
- name: CHECKOUT ERLANG PROBLEM MATCHERS
69+
uses: actions/checkout@v4
70+
with:
71+
repository: ninenines/ci.erlang.mk
72+
path: ci.erlang.mk
73+
74+
- name: INSTALL ERLANG PROBLEM MATCHERS
75+
run: echo "::add-matcher::ci.erlang.mk/.github/matchers/erlang-matchers.json"
76+
6777
- name: MIXED CLUSTERS - FETCH SIGNING KEYS
6878
uses: dsaltares/fetch-gh-release-asset@master
6979
if: inputs.mixed_clusters
@@ -130,7 +140,8 @@ jobs:
130140
if: inputs.plugin != 'rabbitmq_cli'
131141
run: |
132142
sudo netstat -ntp
133-
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
143+
set -o pipefail
144+
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }} NON_DETERMINISTIC=1 2>&1 | sed "s/src\//deps\/${{ inputs.plugin }}\/src\//" | sed "s/test\//deps\/${{ inputs.plugin }}\/test\//" | sed "s/src\/enough\.erl:22:2:/IGNORED src\/enough.erl:22:2:/"
134145
135146
- name: CACHE ACTIVEMQ
136147
uses: actions/cache/save@v4

deps/amqp_client/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ endef
3939
# Release artifacts are put in $(PACKAGES_DIR).
4040
PACKAGES_DIR ?= $(abspath PACKAGES)
4141

42-
LOCAL_DEPS = xmerl ssl public_key
42+
LOCAL_DEPS = ssl public_key
4343
DEPS = rabbit_common credentials_obfuscation
4444
TEST_DEPS = rabbitmq_ct_helpers rabbit meck
4545

deps/amqp_client/src/amqp_connection.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ set_connection_name(ConnName,
203203
%% application controller is in the process of shutting down the very
204204
%% application which is making this call.
205205
ensure_started() ->
206-
[ensure_started(App) || App <- [syntax_tools, compiler, xmerl,
206+
[ensure_started(App) || App <- [syntax_tools, compiler,
207207
rabbit_common, amqp_client, credentials_obfuscation]],
208208
ok.
209209

deps/oauth2_client/test/system_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,14 @@ get_oauth_provider_given_oauth_provider_id(Config) ->
598598
Jwks_uri)
599599
end.
600600

601-
jwks_url_is_used_in_absense_of_jwks_uri(Config) ->
601+
jwks_url_is_used_in_absense_of_jwks_uri(_Config) ->
602602
{ok, #oauth_provider{
603603
jwks_uri = Jwks_uri}} = oauth2_client:get_oauth_provider([jwks_uri]),
604604
?assertEqual(
605605
proplists:get_value(jwks_url, get_env(key_config, []), undefined),
606606
Jwks_uri).
607607

608-
jwks_uri_takes_precedence_over_jwks_url(Config) ->
608+
jwks_uri_takes_precedence_over_jwks_url(_Config) ->
609609
{ok, #oauth_provider{
610610
jwks_uri = Jwks_uri}} = oauth2_client:get_oauth_provider([jwks_uri]),
611611
?assertEqual(get_env(jwks_uri), Jwks_uri).

deps/rabbit/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ define PROJECT_ENV
126126
]
127127
endef
128128

129-
LOCAL_DEPS = sasl os_mon inets compiler public_key crypto ssl syntax_tools xmerl
129+
LOCAL_DEPS = sasl os_mon inets compiler public_key crypto ssl syntax_tools
130130

131131
BUILD_DEPS = rabbitmq_cli
132132
DEPS = ranch cowlib rabbit_common amqp10_common rabbitmq_prelaunch ra sysmon_handler stdout_formatter recon redbug observer_cli osiris syslog systemd seshat horus khepri khepri_mnesia_migration cuttlefish gen_batch_server

deps/rabbit/test/cluster_SUITE.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ init_per_group(Group, Config) ->
6363
true ->
6464
Config1 = rabbit_ct_helpers:set_config(Config, [
6565
{rmq_nodename_suffix, Group},
66-
{rmq_nodes_count, 2}
66+
{rmq_nodes_count, 2},
67+
{find_crashes, false} %% we crash some queues on purpose
6768
]),
6869
rabbit_ct_helpers:run_steps(Config1,
6970
rabbit_ct_broker_helpers:setup_steps() ++

deps/rabbit/test/crashing_queues_SUITE.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ end_per_suite(Config) ->
3939

4040
init_per_group(cluster_size_2, Config) ->
4141
rabbit_ct_helpers:set_config(Config, [
42-
{rmq_nodes_count, 2}
42+
{rmq_nodes_count, 2},
43+
{find_crashes, false} %% we crash queues on purpose
4344
]).
4445

4546
end_per_group(_, Config) ->

deps/rabbit_common/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ define HEX_TARBALL_EXTRA_METADATA
2525
}
2626
endef
2727

28-
LOCAL_DEPS = compiler crypto public_key sasl ssl syntax_tools tools xmerl runtime_tools
28+
LOCAL_DEPS = compiler crypto public_key sasl ssl syntax_tools tools runtime_tools
2929
DEPS = thoas ranch recon credentials_obfuscation
3030

3131
# Variables and recipes in development.*.mk are meant to be used from
@@ -43,7 +43,7 @@ DEP_EARLY_PLUGINS = $(PROJECT)/mk/rabbitmq-early-plugin.mk
4343
DEP_PLUGINS = $(PROJECT)/mk/rabbitmq-build.mk \
4444
$(PROJECT)/mk/rabbitmq-hexpm.mk
4545

46-
PLT_APPS += mnesia crypto ssl xmerl
46+
PLT_APPS += mnesia crypto ssl
4747

4848
include ../../rabbitmq-components.mk
4949
include ../../erlang.mk

deps/rabbit_common/mk/rabbitmq-early-plugin.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ CT_OPTS += -kernel net_ticktime 5
3636
#
3737
# cth_styledout
3838
# This hook will change the output of common_test to something more
39-
# concise and colored.
39+
# concise and colored. Not used on GitHub Actions except in parallel CT.
4040

41+
ifndef GITHUB_ACTIONS
4142
CT_HOOKS += cth_styledout
43+
endif
4244
TEST_DEPS += cth_styledout
4345

4446
ifdef CONCOURSE

deps/rabbit_common/src/rabbit_binary_parser.erl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ assert_utf8(B) ->
164164
end.
165165

166166
validate_utf8(Bin) ->
167-
try
168-
_ = xmerl_ucs:from_utf8(Bin),
169-
ok
170-
catch exit:{ucs, _} ->
167+
case unicode:characters_to_binary(Bin, unicode, unicode) of
168+
B when is_binary(B) ->
169+
ok;
170+
{error, _, _} ->
171+
error;
172+
{incomplete, _, _} ->
171173
error
172174
end.

0 commit comments

Comments
 (0)