Skip to content

Commit cfa2303

Browse files
committed
undo tmp change
1 parent 2cba782 commit cfa2303

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

paradedb/localstack_paradedb/extension.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from localstack_extensions.utils.docker import ProxiedDockerContainerExtension
55
from localstack import config
6+
from localstack.extensions.api import http
67

78
# Environment variables for configuration
89
ENV_POSTGRES_USER = "PARADEDB_POSTGRES_USER"
@@ -56,22 +57,22 @@ def _tcp_health_check():
5657
tcp_ports=[postgres_port], # Enable TCP proxying through gateway
5758
)
5859

59-
# TODO: uncomment
60-
# def update_gateway_routes(self, router: http.Router[http.RouteHandler]):
61-
# """
62-
# Override to set up only TCP routing without HTTP proxy.
63-
#
64-
# ParadeDB uses the native PostgreSQL wire protocol (not HTTP), so we
65-
# only need TCP protocol routing - not HTTP proxying. Adding an HTTP
66-
# proxy without a host restriction would cause all HTTP requests to be
67-
# forwarded to the PostgreSQL container, breaking other services.
68-
# """
69-
# # Start the container
70-
# self.start_container()
71-
#
72-
# # Set up only TCP protocol routing (skip HTTP proxy from base class)
73-
# if self.tcp_ports:
74-
# self._setup_tcp_protocol_routing()
60+
# TODO: this should be migrated into the base class directly ..!
61+
def update_gateway_routes(self, router: http.Router[http.RouteHandler]):
62+
"""
63+
Override to set up only TCP routing without HTTP proxy.
64+
65+
ParadeDB uses the native PostgreSQL wire protocol (not HTTP), so we
66+
only need TCP protocol routing - not HTTP proxying. Adding an HTTP
67+
proxy without a host restriction would cause all HTTP requests to be
68+
forwarded to the PostgreSQL container, breaking other services.
69+
"""
70+
# Start the container
71+
self.start_container()
72+
73+
# Set up only TCP protocol routing (skip HTTP proxy from base class)
74+
if self.tcp_ports:
75+
self._setup_tcp_protocol_routing()
7576

7677
def tcp_connection_matcher(self, data: bytes) -> bool:
7778
"""

0 commit comments

Comments
 (0)