Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/test-make-target.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ jobs:
# restricted to the build jobs to avoid duplication in output.
disable_problem_matchers: true

# We install Erlang problem matchers from ci.erlang.mk.
- name: CHECKOUT ERLANG PROBLEM MATCHERS
uses: actions/checkout@v4
with:
repository: ninenines/ci.erlang.mk
path: ci.erlang.mk

- name: INSTALL ERLANG PROBLEM MATCHERS
run: echo "::add-matcher::ci.erlang.mk/.github/matchers/erlang-matchers.json"

- name: MIXED CLUSTERS - FETCH SIGNING KEYS
uses: dsaltares/fetch-gh-release-asset@master
if: inputs.mixed_clusters
Expand Down Expand Up @@ -120,7 +130,8 @@ jobs:
if: inputs.plugin != 'rabbitmq_cli'
run: |
sudo netstat -ntp
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
set -o pipefail
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }} NON_DETERMINISTIC=1 | sed "s/src\//deps\/${{ inputs.plugin }}\/src\//" | sed "s/test\//deps\/${{ inputs.plugin }}\/test\//"

- name: CACHE ACTIVEMQ
uses: actions/cache/save@v4
Expand Down
2 changes: 1 addition & 1 deletion deps/rabbit/src/rabbit_msg_store.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ scan_data(<<Size:64, MsgIdInt:128, _Rest/bits>> = Data, Fd, Fun, Offset, FileSiz
end;
%% This might be the start of a message.
scan_data(<<Size:64, Rest/bits>> = Data, Fd, Fun, Offset, FileSize, MsgIdsFound, Acc)
when byte_size(Rest) < Size + 1, Size + 9 =< FileSize - Offset ->
when byte_size(Rest) < Size + 1, Size < FileSize - Offset ->
scan(Data, Fd, Fun, Offset, FileSize, MsgIdsFound, Acc);
scan_data(Data, Fd, Fun, Offset, FileSize, MsgIdsFound, Acc)
when byte_size(Data) < 8 ->
Expand Down
2 changes: 2 additions & 0 deletions deps/rabbit_common/mk/rabbitmq-early-plugin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ CT_OPTS += -kernel net_ticktime 5
# This hook will change the output of common_test to something more
# concise and colored.

ifndef GITHUB_ACTIONS
CT_HOOKS += cth_styledout
TEST_DEPS += cth_styledout
endif

ifdef CONCOURSE
FAIL_FAST = 1
Expand Down
20 changes: 17 additions & 3 deletions deps/rabbitmq_ct_helpers/src/ct_master_fork.erl
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ run_all([{Node,Run,Skip}|Rest],TSRec=#testspec{label = Labels,
{cover_stop, CoverStop},
{config, ConfigFiles},
{event_handler, EvHandlers},
{ct_hooks, [rabbit_ct_hook, cth_styledout] ++ FiltCTHooks},
{ct_hooks, [rabbit_ct_hook] ++ FiltCTHooks},
% {ct_hooks_order, CTHooksOrder},
{enable_builtin_hooks, EnableBuiltinHooks},
{auto_compile, AutoCompile},
Expand Down Expand Up @@ -723,14 +723,28 @@ master_print_summary_for(Title,List) ->
_ = case List of
[] -> ok;
_ ->
Chars = [
Chars = [[
master_format_gh_anno(Reason),
io_lib:format("Node: ~w~nCase: ~w:~w~nReason: ~p~n~n",
[Node, Suite, FuncOrGroup, Reason])
|| {Node, Suite, FuncOrGroup, Reason} <- List],
] || {Node, Suite, FuncOrGroup, Reason} <- List],
log(all,Title,Chars,[])
end,
ok.

master_format_gh_anno({error, {{exception, Reason, [{Mod, Fun, Arity, Loc}|_]}, _}}) ->
%% We use .github because that file exists in our repository
%% so GH will still put annotations in pull requests even
%% if we don't have the real file name.
File = proplists:get_value(file, Loc, ".github"),
Line = proplists:get_value(line, Loc, 0),
io_lib:format("::error file=~s,line=~b::~w:~tw/~b: ~w~n",
[File, Line, Mod, Fun, Arity, Reason]);
master_format_gh_anno(Reason) ->
%% Do the bare minimum if we don't know the error reason.
io_lib:format("::error file=.github,line=0::~w~n",
[Reason]).

update_queue(take,Node,From,Lock={Op,Resource},Locks,Blocked) ->
%% Locks: [{{Operation,Resource},Node},...]
%% Blocked: [{{Operation,Resource},Node,WaitingPid},...]
Expand Down
Loading