Skip to content

Remove hard-coded halos.local references #167

@mairas

Description

@mairas

Overview

Remove hard-coded halos.local hostname references to comply with the workspace hostname policy.

Tracking issue: halos-org/halos#61

Violations

src/generate_container_packages/registry.py:
  94:        "# Using halos.local as the default hostname",
  106:        url = f"{protocol}://halos.local{path}"
  108:        url = f"{protocol}://halos.local:{port}{path}"

tests/test_registry.py:
  77:        assert 'url = "http://halos.local:8080/"' in result
  149:        assert 'url = "http://halos.local/"' in result
  160:        assert 'url = "https://halos.local/"' in result
  168:        assert 'url = "http://halos.local:8080/app"' in result

Fix

  1. registry.py: Replace hard-coded hostname with a required configuration parameter
  2. test_registry.py: Use a test configuration or parameterized hostname

Enforcement

A pre-commit hook has been added. Run .github/scripts/check-hardcoded-hostnames.sh to verify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions