HomeSoftware Heritage

Reorganize configuration of the http server building

Description

Reorganize configuration of the http server building

rework the configuration used by make_app() so that one can start the
http server usig an existing grpc server by a setting the configuration
file accordingly.

This make the make_app() function only accept one config structure
(dict), which structure would be:

graph:
  cls: local
  grpc_server: # config for spawn_java_grpc_server()
    ...
  http_rpc_server: # config for GraphServerApp()
    ...

or:

graph:
  cls: remote
  url: # host:port of the running grpc server
    ...
  http_rpc_server: # config for GraphServerApp()
    ...

This also comes wit a few other refactorings:

  • rename swh/graph/rpc/ as swh/graph/grpc/ to prevent confusion with the (http) rpc server.
  • similarly, rename swh/graph/rpc_server.py as swh/graph/grpc_server.py
  • and rename swh/graph/http_server.py as swh/graph/http_rpc_server.py
  • remove the "graph" config section from the grpc_server config structure (it had only the "path" config entry).

Details

Provenance
douarddaAuthored on Sep 12 2022, 2:48 PM
douarddaPushed on Sep 13 2022, 3:01 PM
Differential Revision
D8448: Reorganize configuration of the http server building
Parents
rDGRPH7049b584c24f: Move swh-graph's test fixture in a pytest_plugin module
Branches
Unknown
Tags
Unknown
Build Status
Buildable 31499
Build 49275: test-and-buildJenkins console · Jenkins