Skip to content

fix(process-manager): add fallbacks for local runs of the test suite #2393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: v29
Choose a base branch
from

Conversation

tharropoulos
Copy link
Contributor

TLDR

Add IP address fallback chain for local test runs: env var → first IPv4 → localhost

Change Summary

Code Changes:

  1. In benchmark/src/services/typesense-process.ts:
  • Removed hardcoded DEFAULT_IP_ADDRESS: Eliminated the static "192.168.2.25" constant
  • Enhanced getIpAddress() method: Added intelligent fallback chain for non-CI environments:
    • First checks process.env.IP_ADDRESS environment variable
    • Falls back to first available non-internal IPv4 address from network interfaces
    • Finally defaults to "127.0.0.1" (localhost) if no network address found
  • Minor formatting fix: Corrected spacing in numRetries: 20 * 30

PR Checklist

- Read from env for ip addresses
- If it's undefined, fallback to the first ipv4 address
- If none are found, use localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant