Skip to content

Commit bf62164

Browse files
michaelklishinmergify[bot]
authored andcommitted
rabbit_definitions: resolve conflicts
(cherry picked from commit ab19045)
1 parent dadff5f commit bf62164

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

deps/rabbit/src/rabbit_definitions.erl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,11 @@ maybe_load_definitions_from_local_filesystem(App, Key) ->
268268

269269
case should_skip_if_unchanged() of
270270
false ->
271-
<<<<<<< HEAD
272-
rabbit_log:debug("Will use module ~s to import definitions", [Mod]),
273-
Mod:load(IsDir, Path);
274-
true ->
275-
Algo = rabbit_definitions_hashing:hashing_algorithm(),
276-
rabbit_log:debug("Will use module ~s to import definitions (if definition file/directory has changed, hashing algo: ~s)", [Mod, Algo]),
277-
=======
278271
rabbit_log:debug("Will re-import definitions even if they have not changed"),
279272
Mod:load(IsDir, Path);
280273
true ->
281274
Algo = rabbit_definitions_hashing:hashing_algorithm(),
282275
rabbit_log:debug("Will import definitions only if definition file/directory has changed, hashing algo: ~ts", [Algo]),
283-
>>>>>>> 975dced74c (Closes #7685)
284276
CurrentHash = rabbit_definitions_hashing:stored_global_hash(),
285277
rabbit_log:debug("Previously stored hash value of imported definitions: ~s...", [binary:part(rabbit_misc:hexify(CurrentHash), 0, 12)]),
286278
case Mod:load_with_hashing(IsDir, Path, CurrentHash, Algo) of

deps/rabbit/src/rabbit_definitions_import_local_filesystem.erl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,13 @@ load(Proplist) when is_list(Proplist) ->
5050
case pget(local_path, Proplist, undefined) of
5151
undefined -> {error, "local definition file path is not configured: local_path is not set"};
5252
Path ->
53-
<<<<<<< HEAD
54-
rabbit_log:debug("Asked to import definitions from a local file or directory at '~s'", [Path]),
55-
case file:read_file_info(Path, [raw]) of
56-
{ok, FileInfo} ->
57-
%% same check is used by Cuttlefish validation, this is to be extra defensive
58-
IsReadable = (element(4, FileInfo) == read) or (element(4, FileInfo) == read_write),
59-
case IsReadable of
60-
true ->
61-
load_from_single_file(Path);
62-
false ->
63-
Msg = rabbit_misc:format("local definition file '~s' does not exist or cannot be read by the node", [Path]),
64-
{error, Msg}
65-
end;
66-
_ ->
67-
Msg = rabbit_misc:format("local definition file '~s' does not exist or cannot be read by the node", [Path]),
68-
{error, {could_not_read_defs, Msg}}
69-
=======
7053
rabbit_log:debug("Asked to import definitions from a local file or directory at '~ts'", [Path]),
7154
IsDir = filelib:is_dir(Path),
7255
case IsDir of
7356
true ->
7457
load_from_local_path(true, Path);
7558
false ->
7659
load_from_single_file(Path)
77-
>>>>>>> 975dced74c (Closes #7685)
7860
end
7961
end;
8062
load(Map) when is_map(Map) ->
@@ -217,16 +199,6 @@ load_from_multiple_files([File|Rest]) ->
217199
end.
218200

219201
load_from_single_file(Path) ->
220-
<<<<<<< HEAD
221-
rabbit_log:debug("Will try to load definitions from a local file or directory at '~s'", [Path]),
222-
case rabbit_misc:raw_read_file(Path) of
223-
{ok, Body} ->
224-
rabbit_log:info("Applying definitions from file at '~s'", [Path]),
225-
import_raw(Body);
226-
{error, E} ->
227-
rabbit_log:error("Could not read definitions from file at '~s', error: ~p", [Path, E]),
228-
{error, {could_not_read_defs, {Path, E}}}
229-
=======
230202
rabbit_log:debug("Will try to load definitions from a local file or directory at '~ts'", [Path]),
231203

232204
case file:read_file_info(Path, [raw]) of
@@ -250,5 +222,4 @@ load_from_single_file(Path) ->
250222
_ ->
251223
Msg = rabbit_misc:format("local definition file '~ts' does not exist or cannot be read by the node", [Path]),
252224
{error, {could_not_read_defs, Msg}}
253-
>>>>>>> 975dced74c (Closes #7685)
254225
end.

0 commit comments

Comments
 (0)