Skip to content

Commit f5914db

Browse files
authored
Merge pull request #7 from spacedock-dev/fix/dbt-hub-proxy-allowlist
[codex] Allow dbt Hub through proxy block
2 parents 01a6fce + 67d5d60 commit f5914db

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/razorback/agents/proxy.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# ABOUTME: HTTP egress block — verbatim from run_experiment.py:1497-1525.
2-
# ABOUTME: NO_PROXY exempts the anthropic + statsig + openai + pypi hosts the claude CLI needs.
1+
# ABOUTME: HTTP egress block derived from run_experiment.py:1497-1525.
2+
# ABOUTME: NO_PROXY exempts the API, package, and dbt registry hosts agents need.
33

4-
# Verbatim copy of run_experiment.py:1509-1513. DO NOT paraphrase the host list — the smoke
5-
# test (Task 1) asserts the path works with EXACTLY these hosts.
64
PROXY_EXEMPT_HOSTS = (
75
".anthropic.com,api.anthropic.com,statsig.anthropic.com,"
86
"featuregates.org,.statsig.com,"
97
".openai.com,api.openai.com,auth.openai.com,chatgpt.com,"
10-
"pypi.org,files.pythonhosted.org,pypi.python.org"
8+
"pypi.org,files.pythonhosted.org,pypi.python.org,"
9+
"hub.getdbt.com,codeload.github.com"
1110
)
1211

13-
# Verbatim copy of run_experiment.py:1515-1525.
1412
PROXY_BLOCK_ENV: dict[str, str] = {
1513
"HTTP_PROXY": "http://127.0.0.1:1",
1614
"HTTPS_PROXY": "http://127.0.0.1:1",

tests/unit/test_docker_environment_proxy_separation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
from razorback.environments.docker import ProxySeparatedDockerEnvironment
1313

1414

15+
def test_proxy_exempt_hosts_include_external_package_registries() -> None:
16+
exempt_hosts = PROXY_EXEMPT_HOSTS.split(",")
17+
assert "hub.getdbt.com" in exempt_hosts
18+
assert "codeload.github.com" in exempt_hosts
19+
20+
1521
class _Process:
1622
returncode = 0
1723

0 commit comments

Comments
 (0)