History | View | Annotate | Download (16.1 kB)
Log RPC errors from inside executeRpcCall
executeRpcCall is the function to be used for executing RPCs, so it makes senseto use it as the single point for logging all thte RPC call errors.
Fixes Issue 293.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Factor out the logRpcErrors function
This function can be useful to multiple RPC calls, therefore it is movedto the file containing the common RPC functions.
Also, it is made more generic by changing its signature.
Add export_list RPC call definitions
This is straightforward, as the call has no parameters and a very simple return type.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Improve TemplateHaskell code to support empty objects
Currently, an empty objects will generate warnings as the arguments ofvarious functions are unused. By adding conditional code for this, wecan support generation of empty objects, e.g. like needed in Rpc code....
Switch the curl bindings from optional to required
Currently, we support curl being optional via some sporting exercises:ifdefs in the code, data types that represent 'Curl is disabled'state, etc. However, with the future work on RPC, we would have toeven make the dependencies list conditional on it, etc. This is too...
Reduce duplication of curl options computation
Some curl option are request-specific, but not node specific: e.g. rpctimeout, etc. The patch changes the HttpClientRequest type so that wecan pre-seed such options, instead of rebuilding the list in eachindividual request execution....
Simplify RPC error cases
This patch removes the node from the RPC error constructursCurlLayerError and OfflineNodeError. The rationale is that we anywayreturn tuples (node, result), and removing this duplication allowssimplified signatures/calls in the execution of RPC calls....
Switch the RPC module over to the multi interface
This replaces the very-basic parMap of IO actions (fully serialised,as parMap won't work here), to the multi interface.
This makes a simple "time gnt-node list" on a 6-node cluster go from3.2s to ~0.9s, and allows even better parallelisation - before,...
Rename htools/ to src/
Per offline discussions, this is the first patch of therenames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification inthe .gitignore rules; otherwise, simply s/htools/src/....