Skip to content

Commit f63f7fb

Browse files
eberriganclaude
andauthored
fix: Add safety check for leading dots in hostname and bump version (#197)
- Add safety check to strip leading dots from hostnames - Bump allocator version from 0.0.3a0 to 0.0.3a1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent d8bc5a4 commit f63f7fb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/allocator/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ description = "VM Allocator Service Package for Lablink"
2424
name = "lablink-allocator-service"
2525
readme = "README.md"
2626
requires-python = ">=3.9"
27-
version = "0.0.3a0"
27+
version = "0.0.3a1"
2828

2929
[project.optional-dependencies]
3030
dev = ["twine", "build", "pytest", "ruff", "pytest-cov"]

packages/allocator/src/lablink_allocator_service/utils/config_helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def get_allocator_url(cfg, allocator_ip: str) -> Tuple[str, str]:
6565
else:
6666
# Default to just the domain
6767
host = cfg.dns.domain
68+
69+
# Just to be safe
70+
if host.startswith("."):
71+
host = host[1:]
6872
else:
6973
# Use IP address
7074
host = allocator_ip

0 commit comments

Comments
 (0)