Skip to content

bug(config): two parallel env var names for browser host — AUTOBOT_BROWSER_SERVICE_HOST vs AUTOBOT_BROWSER_HOST can silently diverge #3743

@mrveiss

Description

@mrveiss

Problem

The browser VM host is configured via two separate env var names that are read by different code paths:

Var Read by Set by
AUTOBOT_BROWSER_SERVICE_HOST playwright_service.py:465 (PlaywrightService) backend.env.j2 (fixed in #3728)
AUTOBOT_BROWSER_HOST service_config.py:77 (ServiceConfigMixin.get_host("browser")) backend.env.j2 (fixed in #3728)

Both are now written by Ansible from the same source value, but they can drift if one is changed manually or if a future change only updates one.

ServiceConfigMixin.get_host() checks AUTOBOT_{SERVICE}_HOST (i.e. AUTOBOT_BROWSER_HOST) while PlaywrightService hardcodes AUTOBOT_BROWSER_SERVICE_HOST. These are the same physical VM.

Fix

Consolidate to one env var. PlaywrightService should use os.getenv("AUTOBOT_BROWSER_HOST") (the pattern used by all other services in ServiceConfigMixin), removing the special-cased AUTOBOT_BROWSER_SERVICE_HOST name. Update backend.env.j2 to only emit one var.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions