Skip to content
  • Agata Murawska's avatar
    Fix RPC call and result (de)serialization · 9b09c0be
    Agata Murawska authored
    
    
    Previous version of RPC calls implementation in Haskell did not take
    into account that the actual result type for queries is a list, not
    a dictionary.
    
    This patch aims at fixing the problem "for now" - it is not a pretty
    solution, but it does work. Note that parsing of the result is now
    split into two parts - first, we check if server's aswer is positive,
    then if it is, we procede with decoding the actual result.
    
    Values and order of some fields in the result type were changed to
    reflect actual order of arguments from server responses.
    
    AllInstancesInfo call was particularly tricky, because it returns a
    dictionary where keys are instance names - and the response from
    a given node is correct if all the instances were deserialized, not
    just some.
    
    Signed-off-by: default avatarAgata Murawska <agatamurawska@google.com>
    Reviewed-by: default avatarIustin Pop <iustin@google.com>
    9b09c0be