CAPI-344: prepare for OTP 21 (#9)

* Use more recent versions of build_utils, build image tag and few dependencies in rebar.lock
* Test with more recent version of machinegun
* Fix type of transport_opts from woody_client/0 type (map)
* Rename net_opts from woody_server_config/0 type (map) to protocol_opts
* Add optional transport_opts to woody_server_config/0 type
This commit is contained in:
Sergei 2019-04-04 11:24:24 +03:00 committed by GitHub
parent 3a6c5b675d
commit 81b0cb3ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 33 deletions

2
Jenkinsfile vendored
View File

@ -38,7 +38,7 @@ build('machinery', 'docker-host', finalHook) {
}
runStage('dialyze') {
withWsCache("_build/default/rebar3_19.1_plt") {
withWsCache("_build/default/rebar3_21.1.1_plt") {
sh 'make wc_dialyze'
}
}

View File

@ -7,7 +7,7 @@ SUBMODULES = $(UTILS_PATH)
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
SERVICE_NAME := machinery
BUILD_IMAGE_TAG := eee42f2ca018c313190bc350fe47d4dea70b6d27
BUILD_IMAGE_TAG := f3732d29a5e622aabf80542b5138b3631a726adb
CALL_ANYWHERE := all submodules compile xref lint dialyze clean distclean

@ -1 +1 @@
Subproject commit f7fe66c9f3d4f37566a04c521b28aa168b7a88ec
Subproject commit 870b70a63af18fc7a02c9ff26b06132d2b1993cb

View File

@ -15,7 +15,7 @@ services:
condition: service_healthy
machinegun:
image: dr.rbkmoney.com/rbkmoney/machinegun:5756aa3070f9beebd4b20d7076c8cdc079286090
image: dr.rbkmoney.com/rbkmoney/machinegun:5e26162266a3bcf857852cb7844e5626fb0ebf7a
command: /opt/machinegun/bin/machinegun foreground
volumes:
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml

View File

@ -1,52 +1,52 @@
{"1.1.0",
[{<<"cache">>,{pkg,<<"cache">>,<<"2.2.0">>},1},
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.3.1">>},2},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"1.1.2">>},1},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"1.0.2">>},2},
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.4.2">>},2},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.5.0">>},1},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.6.0">>},2},
{<<"genlib">>,
{git,"https://github.com/rbkmoney/genlib.git",
{ref,"e9e5aed04a870a064312590e798f89d46ce5585c"}},
{ref,"41920d7774d119c294f3aaba4043ced12da2a815"}},
0},
{<<"gproc">>,{pkg,<<"gproc">>,<<"0.8.0">>},1},
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.13.0">>},1},
{<<"idna">>,{pkg,<<"idna">>,<<"5.1.2">>},2},
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.15.0">>},1},
{<<"idna">>,{pkg,<<"idna">>,<<"6.0.0">>},2},
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2},
{<<"mg_proto">>,
{git,"git@github.com:rbkmoney/machinegun_proto.git",
{ref,"5c07c579014f9900357f7a72f9d10a03008b9da1"}},
0},
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.0.2">>},2},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.2.0">>},3},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.3.2">>},2},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},3},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.6.2">>},2},
{<<"rfc3339">>,{pkg,<<"rfc3339">>,<<"0.2.2">>},0},
{<<"snowflake">>,
{git,"https://github.com/rbkmoney/snowflake.git",
{ref,"0a598108f6582affe3b4ae550fc5b9f2062e318a"}},
1},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.1">>},2},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.4">>},2},
{<<"thrift">>,
{git,"https://github.com/rbkmoney/thrift_erlang.git",
{ref,"240bbc842f6e9b90d01bd07838778cf48752b510"}},
{ref,"7843146f22a9d9d63be4ae1276b5fa03938f2e9c"}},
1},
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.3.1">>},3},
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.4.1">>},3},
{<<"woody">>,
{git,"git@github.com:rbkmoney/woody_erlang.git",
{ref,"94eb44904e817e615f5e1586d6f3432cdadd5e29"}},
{ref,"862358ee62a95bf46926be1815f70a72a8679d28"}},
0}]}.
[
{pkg_hash,[
{<<"cache">>, <<"3C11DBF4CD8FCD5787C95A5FB2A04038E3729CFCA0386016EEA8C953AB48A5AB">>},
{<<"certifi">>, <<"D0F424232390BF47D82DA8478022301C561CF6445B5B5FB6A84D49A9E76D2639">>},
{<<"cowboy">>, <<"61AC29EA970389A88ECA5A65601460162D370A70018AFE6F949A29DCA91F3BB0">>},
{<<"cowlib">>, <<"9D769A1D062C9C3AC753096F868CA121E2730B9A377DE23DEC0F7E08B1DF84EE">>},
{<<"certifi">>, <<"75424FF0F3BAACCFD34B1214184B6EF616D89E420B258BB0A5EA7D7BC628F7F0">>},
{<<"cowboy">>, <<"4EF3AE066EE10FE01EA3272EDC8F024347A0D3EB95F6FBB9AED556DACBFC1337">>},
{<<"cowlib">>, <<"8AA629F81A0FC189F261DC98A42243FA842625FEEA3C7EC56C48F4CCDB55490F">>},
{<<"gproc">>, <<"CEA02C578589C61E5341FCE149EA36CCEF236CC2ECAC8691FBA408E7EA77EC2F">>},
{<<"hackney">>, <<"24EDC8CD2B28E1C652593833862435C80661834F6C9344E84B6A2255E7AEEF03">>},
{<<"idna">>, <<"E21CB58A09F0228A9E0B95EAA1217F1BCFC31A1AAA6E1FDF2F53A33F7DBD9494">>},
{<<"hackney">>, <<"287A5D2304D516F63E56C469511C42B016423BCB167E61B611F6BAD47E3CA60E">>},
{<<"idna">>, <<"689C46CBCDF3524C44D5F3DDE8001F364CD7608A99556D8FBD8239A5798D4C10">>},
{<<"metrics">>, <<"25F094DEA2CDA98213CECC3AEFF09E940299D950904393B2A29D191C346A8486">>},
{<<"mimerl">>, <<"993F9B0E084083405ED8252B99460C4F0563E41729AB42D9074FD5E52439BE88">>},
{<<"parse_trans">>, <<"2ADFA4DAF80C14DC36F522CF190EB5C4EE3E28008FC6394397C16F62A26258C2">>},
{<<"ranch">>, <<"E4965A144DC9FBE70E5C077C65E73C57165416A901BD02EA899CFD95AA890986">>},
{<<"parse_trans">>, <<"09765507A3C7590A784615CFD421D101AEC25098D50B89D7AA1D66646BC571C1">>},
{<<"ranch">>, <<"6DB93C78F411EE033DBB18BA8234C5574883ACB9A75AF0FB90A9B82EA46AFA00">>},
{<<"rfc3339">>, <<"1552DF616ACA368D982E9F085A0E933B6688A3F4938A671798978EC2C0C58730">>},
{<<"ssl_verify_fun">>, <<"28A4D65B7F59893BC2C7DE786DEC1E1555BD742D336043FE644AE956C3497FBE">>},
{<<"unicode_util_compat">>, <<"A1F612A7B512638634A603C8F401892AFBF99B8CE93A45041F8AACA99CADB85E">>}]}
{<<"ssl_verify_fun">>, <<"F0EAFFF810D2041E93F915EF59899C923F4568F4585904D010387ED74988E77B">>},
{<<"unicode_util_compat">>, <<"D869E4C68901DD9531385BB0C8C40444EBF624E60B6962D95952775CAC5E90CD">>}]}
].

View File

@ -347,12 +347,10 @@ marshal({schema, Schema, T}, V) ->
machinery_mg_schema:marshal(Schema, T, V);
marshal(timestamp, {{Date, Time}, USec} = V) ->
case rfc3339:format({Date, Time, USec, 0}) of
{ok, R} when is_binary(R) ->
R;
Error ->
error(badarg, {timestamp, V, Error})
end;
{ok, Result} = rfc3339:format({Date, Time, USec, 0}),
% ensure that Result is actually a binary
{true, _} = {is_binary(Result), V},
Result;
marshal({list, T}, V) when is_list(V) ->
[marshal(T, E) || E <- V];

View File

@ -16,7 +16,7 @@
-type woody_client() :: #{
url := woody:url(),
event_handler := woody:ev_handler(),
transport_opts => woody_client_thrift_http_transport:options()
transport_opts => woody_client_thrift_http_transport:transport_options()
}.
-opaque client() :: {woody_client(), woody_context:ctx()}.

View File

@ -10,7 +10,8 @@
-type woody_server_config() :: #{
ip := inet:ip_address(),
port := inet:port_number(),
net_opts => cowboy_protocol:opts()
protocol_opts => woody_server_thrift_http_handler:protocol_opts(),
transport_opts => woody_server_thrift_http_handler:transport_opts()
}.
-type route_opts() :: #{

View File

@ -1,6 +1,9 @@
service_name: machinegun
namespaces:
payproc/tags:
processor:
url: http://machinery:8022/v1/stateproc
storage:
type: memory