Skip to content

Commit

Permalink
fix(interactive): minor changes on list_service_status (#4313)
Browse files Browse the repository at this point in the history
- Change localhost to 127.0.0.1
- Move the comment message to a new filed `info`
  • Loading branch information
zhanglei1949 authored Nov 6, 2024
1 parent 2cd1144 commit f41ad88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions coordinator/gscoordinator/flex/core/interactive/hqps.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def list_service_status(self) -> List[dict]:
api_instance = gs_interactive.AdminServiceServiceManagementApi(api_client)
response = api_instance.get_service_status()
if CLUSTER_TYPE == "HOSTS":
host = 'localhost' # for interactive deployed in hosts, we could not determine the public ip in container. So we let user to replace with the public ip.
host = '127.0.0.1' # for interactive deployed in hosts, we could not determine the public ip in container. So we let user to replace with the public ip.
if response.status == "Running" and response.graph is not None:
g = response.graph.to_dict()
serving_graph_id = g["id"]
Expand All @@ -246,10 +246,11 @@ def list_service_status(self) -> List[dict]:
status = {
"status": response.status,
"sdk_endpoints": {
"cypher": f"neo4j://{host}:{self._get_mapped_port(response.bolt_port)} (Replace localhost with public ip if connecting from outside)",
"hqps": f"http://{host}:{self._get_mapped_port(response.hqps_port)} (Replace localhost with public ip if connecting from outside)",
"gremlin": f"ws://{host}:{self._get_mapped_port(response.gremlin_port)}/gremlin (Replace localhost with public ip if connecting from outside)",
"cypher": f"neo4j://{host}:{self._get_mapped_port(response.bolt_port)}",
"hqps": f"http://{host}:{self._get_mapped_port(response.hqps_port)}",
"gremlin": f"ws://{host}:{self._get_mapped_port(response.gremlin_port)}/gremlin",
},
"info": "Replace 127.0.0.1 with public ip if connecting from outside",
"start_time": service_start_time,
"graph_id": g["id"],
}
Expand Down
4 changes: 4 additions & 0 deletions flex/openapi/openapi_coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ components:
type: string
grpc:
type: string
info:
type: string
nullable: true
start_time:
type: string

Expand Down Expand Up @@ -2196,6 +2199,7 @@ paths:
cypher: neo4j://mock.api.cypher:7676
gremlin: ws://mock.api.gremlin/gremlin
hqps: http://mock.api.hqps:10000
info: "Replace 127.0.0.1 with public ip if connecting from outside"
start_time: "2024-01-01 00:00:00"
500:
$ref: "#/components/responses/500"
Expand Down

0 comments on commit f41ad88

Please sign in to comment.