Local Development
cd mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
python3 -m pytest
Optional EMR on EKS pod diagnostics can use either the Python Kubernetes client or kubectl.
For Python client testing:
pip install -e ".[dev,eks]"
For kubectl fallback testing, make sure kubectl is on PATH and the current kubeconfig can read pods in the target EMR on EKS namespace. Harrier will still investigate EMR on EKS metadata and logs when Kubernetes access is unavailable; it reports the missing pod access as a recoverable warning.
Run the local MCP server:
../scripts/local-run.sh
Diagnosis report golden snapshots live in:
mcp-server/tests/golden/diagnosis_reports/
Run the golden tests with:
cd mcp-server
python3 -m pytest tests/test_diagnosis_golden_reports.py
When a deliberate renderer change alters the human report format, regenerate the snapshots and review the diff:
cd mcp-server
HARRIER_UPDATE_GOLDENS=1 python3 -m pytest tests/test_diagnosis_golden_reports.py
Local investigation reports are written to the OS temp directory by default:
<tmp>/harrier-emr-mcp/investigations
Override that location with:
export HARRIER_LOCAL_STORE_DIR=/path/to/harrier-investigations
Enable real GitHub PR creation only for a local allowlisted target:
export HARRIER_ALLOW_PR_CREATION=true
export HARRIER_PR_REPO_ALLOWLIST=owner/name
export HARRIER_GITHUB_TOKEN=ghp_...
Then call harrier_prepare_pr with dry_run=false and allow_pr_creation=true. Dry-run preview remains the default.