Commit Graph

142 Commits

Author SHA1 Message Date
Alexey
533d2a6d81
MSPF-429: Graceful shutdowns (#89) 2019-04-19 14:18:32 +03:00
Sergey Elin
09506cdd10
MSPF-413: Add execition_time (#92)
List of changes:
* Use thrift plugin compiler 0.3.0
* Update build_tools to latest
* Update build image to Erlang 21
* Added execution_start_time, execution_end_time, execution_duration_ms to woody state
2019-04-19 10:08:35 +03:00
Sergei
d0ac788d95
OTP 20 compatibility (#93) 2019-04-18 17:54:16 +03:00
Andrey Fadeev
cf9dc0dad5
Add predefined ip pickers (#91) 2019-04-10 21:07:38 +03:00
Andrey Fadeev
4f85c9be4d
Add checkout_timeout hackney error processing (#90) 2019-04-10 19:47:41 +03:00
Andrey Fadeev
c396f927b5
MG-155 Improve resolving (#88)
Update hackney to version with fixed hostname normalization.
Add resolving both ipv4 and ipv6 only addresses.
2019-04-02 18:00:07 +02:00
Toporkov Igor
862358ee62
MSPF-428: Erlang OTP 21 to master (#86)
* MSPF-394/Migrate woody_erlang to cowboy 2.5.0 (#82)

* Renewed some old cowboy syntax

* Reworked types to fit new cowboy/ranch versions

* Replaced cowboy tuples with separate values

* Fixed types, deleted testing logs, deleted redundant errors

* Moved to new StackTrace retrieval syntax for Erlang/OTP 21

* Restored default config, fixed typing

* Cleaned unnessesary changes, removed export_all

* Restored genlib cached version

* Downgraded to old stacktrace retrieval syntax, fixed codestyle

* Restored new StackTrace retrieval syntax, updated build image

* Changed rebar3 version for CI

* Corrected typing and spelling, removed unnessesary supervisor

* Created stream handler to replace hooks

* Added options for reading body

* Simplified stream handler

* Fixed wrong module name, added read body options support in stream handler

* Puted read body opts to env, renamed stream handler

* Codestyle, types and config fixes

* Moved response tracing to a separate function, now tracing failed requests too

* Changed options to map (#83)

* Fixed wrong timeout override logic (#84)

* Patch merge conflict

* Bump dependencies  (#87)

* bumped hackney

* bumped erlang thrift commit
2019-03-28 17:52:17 +03:00
Alexey
4f5f7337e6
MSPF-416: No aggressive keepalives (#85) 2019-03-28 13:37:37 +03:00
Andrey Fadeev
d8de03d34a
Remove unexist meta usage in client event formatter (#81) 2018-11-09 12:40:20 +03:00
Andrew Mayorov
71475b5d3d
Relax test assertion to make it realistic (#80)
* Update README with mentions of new and updated options
2018-11-07 15:37:24 +03:00
Andrew Mayorov
7a57a10d02
Expose ranch transport opts (#79)
It will allow library users to tune things like number of max allowed concurrent connections.
2018-11-07 12:54:54 +03:00
Andrey Fadeev
8458d1c0c9
MSPF-397 Use OS time for deadline calculation (#78)
*  Use OS time for deadline calculation
Erlang system time may differ from OS time after OS time changes.
For example, try to run Erlang node, change system time and run
> erlang:system_time(millisecond) - os:system_time(millisecond).
See http://erlang.org/doc/apps/erts/time_correction.html#time-warp-modes for details

* Use OS time for cache lifetime as cache library do
2018-11-02 13:47:37 +03:00
Andrey Fadeev
aa82994bf3
MSPF-392 Fix caching client events lack on transient errors (#77) 2018-10-09 18:07:15 +03:00
Anton Belyaev
9c1c8b3a0a
Describe server tracing in README. (#76) 2018-09-06 13:38:53 +03:00
Andrey Fadeev
ca28ab65fa
HG-389 Caching client integration fixes (#75)
Turn off requests collapsing by default
Add caching client event for scoper event handler
Add small caching_client description in README
2018-09-06 13:31:39 +03:00
Andrey Fadeev
9a393c14d5
Add deadline to logging meta (#74) 2018-09-06 13:19:29 +03:00
Andrey Fadeev
94eb44904e
MSPF-351 Add headers transition (#71) 2018-07-31 11:37:13 +03:00
Petr Kozorezov
996f6d5b2c
Task/mspf 374/woody caching (#73)
* add stale cache and joint workers

* add caching client

* add test, refactor code a little bit

* apply review fixes

* apply review fixes

* apply review fixes

* add caching client events

* apply review comments

* add thrift meta info to cache events

* update tests
2018-07-31 10:51:12 +03:00
Andrey Fadeev
354ac76645
MG-128 Switch rfc3339 back to upstream (#72) 2018-07-06 15:35:20 +03:00
Andrey Fadeev
98469234e4
MG-128 Fix deadline without milliseconds part parsing (#69)
Switch to our own rfc3339 fork
2018-07-03 19:48:43 +03:00
Andrey Fadeev
b6bb676b3b
MG-128 Add convertors between deadline and unixtime (#68) 2018-07-03 14:53:00 +03:00
Anton Belyaev
06ef3d63c0
HG-364: add get_routes/1 api to http handler (#67) 2018-04-24 16:18:43 +03:00
Petr Kozorezov
d9362a5f81
add additional routes to woody server (#66) 2018-04-10 15:16:33 +03:00
Anton Belyaev
74fb666e87
MSPF-313: introduce deadlines (#62)
* introduce woody deadline
* refactor cowboy handler init checks order
  1. start with basic http checks
  2. proceed with woody related stuff
2018-01-30 12:50:18 +03:00
Anton Belyaev
ad1e91050c MSPF-281: add event meta formatting interface and introduce woody_state (#61)
* add event meta formatting
* introduce woody_state
* freshen up the build image
* add  tag for internal error on cowboy unhealthy termination
2017-10-20 14:34:01 +03:00
Anton Belyaev
2d00bda104 MSPF-258: explicitly handle more posix errors in http client (#60) 2017-06-09 17:01:44 +03:00
Anton Belyaev
62e6e19f4a MSPF-232-235: fixes after M pen testing (#56)
* MSPF-232: optionally configure max_heap_size limit for server handler.
* MSPF-233: check vm total memory against configurable threshold before
            starting to handle request on the server.

* MSPF-234: improve introspection for result_unexpected errors on the client.
* MSPF-234: send thrift decode error details from server to client
* MSPF-234: pass stacktrace for result_unexpected error from server to client as error details
* MSPF-235: use input Id as a span_id, instead of trace_id in woody_context:new_rpc_id/1.
            trace_id is used across the entire requst tree and is rather safer
            as woody snowflake id.

* fix a bug in server net_opts handling
* fix event formatting types
2017-05-18 17:17:37 +04:00
Anton Belyaev
992c279466 MSPF-224: fix error format in case of TApplicationException exception from server in 200 (#55) 2017-04-28 17:26:42 +03:00
Artem Ocheredko
8f1f42e209 Fix getting context meta by key when there is no meta (#54) 2017-03-31 20:18:04 +04:00
Andrew Mayorov
2f264f97c6 HG-155: Bump to rbkmoney/thrift@240bbc8 (#53) 2017-03-20 18:20:03 +03:00
Anton Belyaev
d6f0de5a35 MG-64: correct woody_client:child_spec name (#52) 2017-03-04 14:37:17 +04:00
Dmitry Manik
7650c1f9f1 Fix flowed child_spec abstraction (#48)
* MG-64: Add find_pool function

* MG-64: Refactor options

* MG-64: Fix linter and dialyzer errors

* MG-64: Fix tests

* MG-64: Add review fixes

Remove unnecessary functionality
Rename pool_name -> name option
Define child_spec as woody_client_behaviour

* MG-64: Add review fixes 2
2017-03-03 17:34:41 +03:00
Anton Belyaev
66884b7020 MSPF-200: bump up erlang to 19.1 and fix some bugs along the way (#50)
* bump up erlang to 19.1
* fix Issue https://github.com/rbkmoney/woody_erlang/issues/44
* fix Issue https://github.com/rbkmoney/woody_erlang/issues/41
* fix some other bugs
2017-02-22 15:45:51 +03:00
Dmitry Manik
29cab89b7c MG-73: Fix spec typo (#49) 2017-02-21 18:00:00 +03:00
Anton Belyaev
b5ae9ae3ab MG-69: Refix connect_timeout and use hackney:skip_body/1 (#47) 2017-02-15 19:53:13 +03:00
Anton Belyaev
905d087c7b MG-63: read the body in case of error to free the connection; add con… (#46) 2017-02-15 15:53:55 +03:00
Dmitry Manik
75c4b97608 Add an opportunity to obtain pool child spec (#45)
* Add an opportunity to obtain pool child spec

* Rework options passing while creating pools

* Add some info about child_spec usage
2017-02-09 19:56:09 +03:00
Anton Belyaev
17bd521843 HG-152: handle econnrefused and econnreset properly (#42) 2017-02-02 16:48:17 +04:00
Anton Belyaev
249fa01d13 MSPF-108: fix handler example in README (#40) 2016-12-29 19:12:06 +03:00
Anton Belyaev
e1782b323b Update README.md (#39) 2016-12-19 15:04:16 +03:00
Anton Belyaev
ac84da3d5b MSPF-108: transient errors implementation (#38)
* align rpc id handling with new requirements
* add new interface woody.erl, mv woody_t -> woody
* bump up thrift for the latest thrift_membuffer_transport
* remove woody:call_safe/3, woody_client:call_safe/3 from client API
* add cowboy net_opts to Server API
* Introduce event formatter to woody_event_handler
* Refactor events
* Remove outdated exception from the elvis rules
* Update woody_server_thrift_handler internal API
* make Opts optional for handlers
* add default event handler
* bump up hackney
* update README
* fix issues: 12, 18, 20, 21, 25, 26, 31, 37
2016-12-19 14:11:05 +03:00
Anton Belyaev
ebf5b86e99 MSPF-18: new woody context (#36)
* MSPF-18: introduce woody_context
* MSPF-18: use Jenkins cache for dialyze; bump up build utils (add colors to wc_%), build-image
* MSPF-18: add bugfix for [Issue 20]
* MSPF-18: add bugfix for [Issue 27]
* MSPF-18: add bugfix for [Issue 29]
* MSPF-18: add bugfix for [Issue 34]
* MSPF-18: update README
2016-11-18 16:49:05 +03:00
Anton Belyaev
2157a34651 HG-64: pass any transport opts to underlying hackney. (#32)
HG-64: fix several issues
* pass any transport opts to underlying hackney.
* remove TC for allowed options
* fix Issue https://github.com/rbkmoney/woody_erlang/issues/19
* bump up build_image
* bump up build_utils
2016-10-18 16:41:45 +03:00
Anton Belyaev
49f47a8b3d MSPF-61: switch to build utils and refactor (#17)
* start using build_utils
* simplify woody_client:result_ok() type (issue 10)
* use integer snowflake id
* rename woody_client_thrift:format_return/3 (issue 11)
* provide details to event_handler for http errors (issue 15)
* clarify net_opts() for woody_server_thrift_http_handler:options() type
* switch snoflake to rbkmoney fork
* update readme
* introduce lint and fix lint warnings
* add woody_client:make_id_int/0 API function
2016-08-26 19:15:48 +04:00
Andrew Mayorov
78b3f7767c MG-15: Bump thrift runtime dep (#16) 2016-08-24 14:59:04 +00:00
Petr Kozorezov
cccf733393 MG-16: fix handler_opts type (#14) 2016-08-11 15:24:12 +04:00
Anton Belyaev
db30966138 MG-16: fix handler spec validation (#9)
* MG-16: fix handler spec validation

* MG-16: add a test
2016-08-04 13:25:49 +04:00
Andrew Mayorov
cd7779e615 HG-40: Bump thrift dep to include latest bugfix (#7) 2016-07-29 09:25:48 +00:00
Anton Belyaev
dbe03ca171 Merge pull request #5 from rbkmoney/ft/MSPF-46/CI-adaption
MSPF-46: enable Jenkins 2.0 CI
2016-07-12 21:17:09 +04:00
Anton Belyaev
5398a6ee47 MSPF-46: enable Jenkins 2.0 CI 2016-07-12 20:06:35 +03:00