Skip to content

Commit 24dc4ee

Browse files
authored
Merge pull request #690 from basho/merge-develop-2-2-to-develop
Merge develop-2.2 to develop
2 parents dbdaaaf + 062c9d3 commit 24dc4ee

File tree

93 files changed

+12694
-1285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+12694
-1285
lines changed

.thumbs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
minimum_reviewers: 2
2+
build_steps:
3+
- make clean
4+
- make test
5+
- make xref
6+
- make dialyzer
7+
merge: false
8+
org_mode: true
9+
timeout: 1790

Makefile

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
EXOMETER_PACKAGES = "(basic)"
22
export EXOMETER_PACKAGES
3+
PULSE_TESTS = yz_solrq_eqc
34

45
REBAR ?= $(shell pwd)/rebar
56

@@ -32,24 +33,57 @@ DIALYZER_APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto in
3233
xmerl webtool snmp public_key mnesia eunit syntax_tools compiler
3334
DIALYZER_FLAGS = -Wno_return
3435
TEST_PLT = .yokozuna_test_dialyzer_plt
36+
RIAK_TEST_PATH = riak_test
3537

3638
include tools.mk
3739

3840
${TEST_PLT}: compile-riak-test
39-
ifneq (,$(RIAK_TEST_PATH))
40-
ifneq (,$(wildcard $(TEST_PLT)))
41-
dialyzer --check_plt --plt $(TEST_PLT) && \
42-
dialyzer --add_to_plt --plt $(TEST_PLT) --apps edoc --output_plt $(TEST_PLT) ebin $(RIAK_TEST_PATH)/ebin $(RIAK_TEST_PATH)/deps/riakc/ebin ; test $$? -ne 1
43-
else
44-
dialyzer --build_plt --apps edoc --output_plt $(TEST_PLT) ebin $(RIAK_TEST_PATH)/ebin $(RIAK_TEST_PATH)/deps/riakc ; test $$? -ne 1
45-
endif
46-
else
47-
@echo "Set RIAK_TEST_PATH"
48-
exit 1
49-
endif
50-
51-
dialyzer_rt: deps ${PLT} ${LOCAL_PLT} $(TEST_PLT)
52-
dialyzer -Wno_return --plts $(PLT) $(LOCAL_PLT) $(TEST_PLT) -c riak_test/ebin
41+
@if [ -d $(RIAK_TEST_PATH) ]; then \
42+
if [ -f $(TEST_PLT) ]; then \
43+
dialyzer --check_plt --plt $(TEST_PLT) $(RIAK_TEST_PATH)/ebin && \
44+
dialyzer --add_to_plt --plt $(TEST_PLT) --apps edoc --output_plt $(TEST_PLT) ebin $(RIAK_TEST_PATH)/ebin ; test $$? -ne 1; \
45+
else \
46+
dialyzer --build_plt --apps edoc --output_plt $(TEST_PLT) ebin $(RIAK_TEST_PATH)/ebin ; test $$? -ne 1; \
47+
fi \
48+
fi
49+
50+
dialyzer-rt-run:
51+
@echo "==> $(shell basename $(shell pwd)) (dialyzer_rt)"
52+
@PLTS="$(PLT) $(LOCAL_PLT) $(TEST_PLT)"; \
53+
if [ -f dialyzer.ignore-warnings ]; then \
54+
if [ $$(grep -cvE '[^[:space:]]' dialyzer.ignore-warnings) -ne 0 ]; then \
55+
echo "ERROR: dialyzer.ignore-warnings contains a blank/empty line, this will match all messages!"; \
56+
exit 1; \
57+
fi; \
58+
dialyzer $(DIALYZER_FLAGS) --plts $${PLTS} -c $(RIAK_TEST_PATH)/ebin > dialyzer_warnings ; \
59+
cat dialyzer.ignore-warnings \
60+
| sed -E 's/^([^:]+:)[^:]+:/\1/' \
61+
| sort \
62+
| uniq -c \
63+
| sed -E '/.*\.erl: /!s/^[[:space:]]*[0-9]+[[:space:]]*//' \
64+
> dialyzer.ignore-warnings.tmp ; \
65+
egrep -v "^[[:space:]]*(done|Checking|Proceeding|Compiling)" dialyzer_warnings \
66+
| sed -E 's/^([^:]+:)[^:]+:/\1/' \
67+
| sort \
68+
| uniq -c \
69+
| sed -E '/.*\.erl: /!s/^[[:space:]]*[0-9]+[[:space:]]*//' \
70+
| grep -F -f dialyzer.ignore-warnings.tmp -v \
71+
| sed -E 's/^[[:space:]]*[0-9]+[[:space:]]*//' \
72+
| sed -E 's/([]\^:+?|()*.$${}\[])/\\\1/g' \
73+
| sed -E 's/(\\\.erl\\\:)/\1[[:digit:]]+:/g' \
74+
| sed -E 's/^(.*)$$/^[[:space:]]*\1$$/g' \
75+
> dialyzer_unhandled_warnings ; \
76+
rm dialyzer.ignore-warnings.tmp; \
77+
if [ $$(cat dialyzer_unhandled_warnings | wc -l) -gt 0 ]; then \
78+
egrep -f dialyzer_unhandled_warnings dialyzer_warnings ; \
79+
found_warnings=1; \
80+
fi; \
81+
[ "$$found_warnings" != 1 ] ; \
82+
else \
83+
dialyzer -Wno_return $(DIALYZER_FLAGS) --plts $${PLTS} -c $(RIAK_TEST_PATH)/ebin; \
84+
fi
85+
86+
dialyzer_rt: deps ${PLT} ${LOCAL_PLT} $(TEST_PLT) dialyzer-rt-run
5387

5488
##
5589
## Purity

dialyzer.ignore-warnings

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,113 @@
11
yokozuna.erl:37: The call application:set_env('yokozuna',{'component',_},'false') breaks the contract (Application,Par,Val) -> 'ok' when is_subtype(Application,atom()), is_subtype(Par,atom()), is_subtype(Val,term())
22
yokozuna.erl:44: The call application:set_env('yokozuna',{'component',_},'true') breaks the contract (Application,Par,Val) -> 'ok' when is_subtype(Application,atom()), is_subtype(Par,atom()), is_subtype(Val,term())
3+
yz_rt.erl:131: The variable _ can never match since previous clauses completely covered the type 'false'
4+
yz_languages.erl:59: The variable _ can never match since previous clauses completely covered the type 'false'
5+
yz_pb.erl:236: The variable _ can never match since previous clauses completely covered the type 'false'
6+
yz_pb.erl:237: The variable _ can never match since previous clauses completely covered the type 'false'
7+
yz_pb.erl:269: The variable _ can never match since previous clauses completely covered the type 'false'
8+
yz_pb.erl:300: The variable _ can never match since previous clauses completely covered the type 'false'
9+
yz_pb.erl:301: The variable _ can never match since previous clauses completely covered the type 'false'
10+
yz_schema_admin.erl:293: The variable _ can never match since previous clauses completely covered the type 'false'
11+
yz_schema_admin.erl:304: The variable _ can never match since previous clauses completely covered the type 'false'
12+
yz_schema_admin.erl:315: The variable _ can never match since previous clauses completely covered the type 'false'
13+
yz_schema_admin.erl:326: The variable _ can never match since previous clauses completely covered the type 'false'
14+
yz_schema_admin.erl:337: The variable _ can never match since previous clauses completely covered the type 'false'
15+
yz_schema_admin.erl:347: The variable _ can never match since previous clauses completely covered the type 'false'
16+
yz_solr_start_timeout.erl:28: The variable _ can never match since previous clauses completely covered the type 'false'
17+
yz_wm_extract_test.erl:45: The variable _ can never match since previous clauses completely covered the type 'false'
18+
yz_solrq_test.erl:131: The variable _ can never match since previous clauses completely covered the type 'false'
19+
yz_entropy_data.erl:108: The variable _ can never match since previous clauses completely covered the type 'false'
20+
yz_search_http.erl:80: The variable _ can never match since previous clauses completely covered the type 'false'
21+
yz_search_http.erl:87: The variable _ can never match since previous clauses completely covered the type 'false'
22+
yz_siblings.erl:143: The variable _ can never match since previous clauses completely covered the type 'false'
23+
Unknown functions:
24+
rt:pbc_really_deleted/3
25+
sidejob:resource_exists/1
26+
make_certs:endusers/3
27+
make_certs:rootCA/2
28+
riak_test_runner:metadata/0
29+
riakc_counter:increment/2
30+
riakc_map:new/0
31+
riakc_map:to_op/1
32+
riakc_map:update/3
33+
riakc_obj:get_update_metadata/1
34+
riakc_obj:new/3
35+
riakc_obj:new/4
36+
riakc_obj:select_sibling/2
37+
riakc_obj:set_user_metadata_entry/2
38+
riakc_obj:update_content_type/2
39+
riakc_obj:update_metadata/2
40+
riakc_obj:value_count/1
41+
riakc_pb_socket:create_search_index/2
42+
riakc_pb_socket:create_search_index/4
43+
riakc_pb_socket:create_search_schema/3
44+
riakc_pb_socket:delete_obj/2
45+
riakc_pb_socket:delete_search_index/2
46+
riakc_pb_socket:get_bucket/2
47+
riakc_pb_socket:get_bucket_type/2
48+
riakc_pb_socket:get_search_index/2
49+
riakc_pb_socket:get_search_schema/2
50+
riakc_pb_socket:list_search_indexes/1
51+
riakc_pb_socket:ping/1
52+
riakc_pb_socket:put/2
53+
riakc_pb_socket:put/3
54+
riakc_pb_socket:search/3
55+
riakc_pb_socket:search/4
56+
riakc_pb_socket:start/3
57+
riakc_pb_socket:start_link/2
58+
riakc_pb_socket:stop/1
59+
riakc_pb_socket:update_type/4
60+
riakc_pb_socket:create_search_index/3
61+
riakc_pb_socket:get_search_index/3
62+
riakc_pb_socket:set_options/2
63+
riakc_register:set/2
64+
riakc_set:add_element/2
65+
riakc_set:new/0
66+
riakc_set:to_op/1
67+
rt:admin/2
68+
rt:build_cluster/1
69+
rt:build_cluster/2
70+
rt:clean_data_dir/2
71+
rt:connection_info/1
72+
rt:create_and_activate_bucket_type/3
73+
rt:deploy_nodes/2
74+
rt:enable_search_hook/2
75+
rt:get_node_logs/0
76+
rt:join/2
77+
rt:join_cluster/1
78+
rt:pbc/1
79+
rt:priv_dir/0
80+
rt:select_random/1
81+
rt:start_and_wait/1
82+
rt:stop/1
83+
rt:stop_and_wait/1
84+
rt:update_app_config/2
85+
rt:upgrade/3
86+
rt:wait_for_cluster_service/2
87+
rt:wait_for_cmd/1
88+
rt:wait_for_service/2
89+
rt:wait_until/1
90+
rt:wait_until/2
91+
rt:wait_until_bucket_type_status/3
92+
rt:wait_until_no_pending_changes/1
93+
rt:wait_until_nodes_ready/1
94+
rt:wait_until_unpingable/1
95+
rt:expect_not_in_logs/2
96+
rt:pmap/2
97+
rt:wait_until_bucket_type_visible/2
98+
rt:wait_until_ready/1
99+
rt:wait_until_bucket_type_status/3
100+
rt_config:get/1
101+
rt_intercept:add/2
102+
rt_intercept:load_code/2
103+
rt:heal/1
104+
rt:partition/2
105+
rt:wait_until_transfers_complete/1
106+
rt:log_to_nodes/2
107+
rt:start/1
108+
rt:upgrade/4
109+
yz_solr_orig:index_batch_orig/2
110+
yz_solrq_drain_mgr_orig:drain_orig/1
111+
yz_solrq_drain_mgr_orig:unlink_and_kill_orig/2
112+
yz_solrq_drain_fsm_orig:prepare_orig/2
113+
yz_solrq_drain_mgr_orig:unlink_and_kill_orig/2

0 commit comments

Comments
 (0)