Skip to content

Commit

Permalink
feat: Fix cosmos spec update script (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrod-teich authored Aug 28, 2024
1 parent 21fb8a7 commit 437eccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/automation_scripts/update_cosmos_spec_from_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def parse_endpoints_from_grpcurl(grpc_url: str) -> dict[str, list[str]]:
print("### Parsing endpoints from gRPC service")

endpoints: dict[str, list[str]] = {"grpc": [], "rest": []}
content = os.popen(f"grpcurl -plaintext {grpc_url} describe").read()
content = os.popen(f"grpcurl {grpc_url} describe").read()

# Regex pattern to find services starting with their corresponding rpc and rest paths
grpc_pattern = re.compile(
Expand All @@ -48,7 +48,7 @@ def parse_endpoints_from_grpcurl(grpc_url: str) -> dict[str, list[str]]:
)

rpc_pattern = re.compile(r"rpc (\w+) \(")
rest_pattern = re.compile(r'option\s*\(\s*.*?\s*\)\s*=\s*{\s*get:\s*"(.*?)"\s*}', re.DOTALL)
rest_pattern = re.compile(r'get:\s*"(.*?)"', re.DOTALL)

# Finding all services that start with 'lavanet'
for service_match in grpc_pattern.finditer(content):
Expand Down

0 comments on commit 437eccd

Please sign in to comment.