Skip to content

Conversation

drernie
Copy link
Member

@drernie drernie commented Sep 24, 2025

Summary

  • Adds a /health endpoint to the MCP server for monitoring and health checks
  • Implements comprehensive health monitoring with configurable checks
  • Includes debug script for troubleshooting health check issues

Changes

  • Added health.py module with health check endpoint implementation
  • Updated Dockerfile to include health check configuration
  • Added debug script scripts/debug_health.sh for troubleshooting
  • Comprehensive unit and integration tests for health checks
  • Updated version to 0.6.15

Test plan

  • Unit tests for health endpoint
  • Integration tests for Docker container health checks
  • Manual testing with debug script
  • Deploy to staging environment
  • Verify health checks in production-like environment

🤖 Generated with Claude Code

- Implement /health endpoint with FastMCP custom_route decorator
- Add health check handler returning server status and info
- Register health endpoint only for HTTP/SSE transport modes
- Add comprehensive tests for health check functionality
- Update Docker integration test to verify health endpoint

Addresses issue #197
- Bump patch version from 0.6.13 to 0.6.14
- Update CHANGELOG with health check endpoint feature
- Enhance health endpoint to report actual package version
- Use importlib.metadata for dynamic version detection
- Replace inline bash healthcheck with external Python script
- Externalize startup script from Dockerfile
- Add comprehensive tests for health check functionality
- Add test to verify Docker defaults to SSE transport
- Add test for ECS platform compatibility detection
- Document root cause of ECS deployment failure (ARM64 vs AMD64)

The Python health check script is more robust:
- Proper JSON validation
- Better error messages
- Testable with unit tests
- Configurable timeout and verbosity
- Remove syntax directive that was causing authentication issues
- Tests correctly detect ARM64 platform issue for ECS deployment
- Modified scripts/docker.py to use buildx for multi-platform builds (linux/amd64 and linux/arm64)
- Added buildx setup and fallback logic for environments without buildx
- Updated build_and_push to build all platforms when pushing to ECR
- Fixed tests to use Makefile docker-build target for consistency
- Added platform detection warnings for local builds
- Ensured production builds support ECS Fargate (requires linux/amd64)
…e path

- Fixed test_docker_container.py to properly verify the actual build process
- Tests now correctly find and use images built by scripts/docker.py
- Fixed docker.py command building bug where platform arg index was wrong
- All three Docker integration tests now pass reliably
- Set DOCKER_PLATFORM once at top of make.deploy (linux/amd64 for ECS)
- Docker builds default to local platform for development
- Production pushes explicitly use linux/amd64 via --platform flag
- Remove useless architecture test that fails on ARM Macs
- Update docker.py to properly handle platform specifications

This ensures consistent platform handling while allowing local builds
to use native architecture for faster development.
- New make docker-check target verifies pushed image architecture
- Fetches manifest from ECR and analyzes platforms
- Confirms compatibility with ECS Fargate (requires linux/amd64)
- Supports checking specific versions with VERSION=tag
- Includes Python script for robust manifest parsing
- Shows image size, push time, and digest information

Example usage:
  make docker-check              # Check current version
  VERSION=latest make docker-check  # Check specific tag
- Created docker-push-quilt-ecr action for multi-platform Docker builds
- Added deploy-quilt-ecr workflow for manual and automated deployments
- Integrated Quilt ECR deployment into production release workflow
- Supports multiple environments (dev, staging, production)
- Ensures linux/amd64 platform compatibility for ECS Fargate
- Addresses issue from spec/197-add-health-checks/04-failure.md
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