fix(manifest): allow ip git upstreams
test / unit (pull_request) Successful in 27s
test / integration (pull_request) Successful in 42s

This commit is contained in:
2026-05-28 19:44:51 -04:00
parent fed006441d
commit 1f0434bffc
2 changed files with 28 additions and 1 deletions
+13 -1
View File
@@ -143,7 +143,11 @@ class GitEntry:
user, host, port, path = _parse_git_upstream(
upstream, f"bottle '{bottle_name}' {label} '{name}' Upstream"
)
if host_key is not None and host_key != host:
if (
host_key is not None
and host_key != host
and not _is_ip_literal(host)
):
die(
f"bottle '{bottle_name}' git.remotes key {host_key!r} "
f"does not match Upstream host {host!r}"
@@ -963,6 +967,14 @@ def _parse_git_upstream(url: str, label: str) -> tuple[str, str, str, str]:
return (user, host, port, path)
def _is_ip_literal(value: str) -> bool:
try:
ipaddress.ip_address(value)
except ValueError:
return False
return True
def _validate_egress_routes(
bottle_name: str,
routes: tuple[EgressRoute, ...],