Skip to content

Conversation

@ppippi-dev
Copy link
Contributor

📌 Summary

This PR fixes three configuration validation errors in the Helm chart (values.yaml) that prevent the application from starting when deployed via Helm. These issues were introduced in PR #1400.

🔁 Reproduction Steps

  1. Deploy mcp-context-forge using Helm with the current values.yaml
  2. Application fails to start with Pydantic validation errors:

Error 1: OBSERVABILITY_EXCLUDE_PATHS
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) pydantic_settings.exceptions.SettingsError: error parsing value for field "observability_exclude_paths"

Error 2: PLUGINS_CLI_MARKUP_MODE
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings plugins_cli_markup_mode Input should be 'markdown', 'rich' or 'disabled' [type=literal_error, input_value='', input_type=str]

🐞 Root Cause

Issue 1: OBSERVABILITY_EXCLUDE_PATHS was set as a comma-separated string ("/health,/healthz,/ready,/metrics,/static/.*"), but the field in mcpgateway/config.py:741 is defined as List[str], which requires JSON array format.

Issue 2: PLUGINS_CLI_MARKUP_MODE was set as an empty string (""), but the field in mcpgateway/config.py:950 is defined as Literal["markdown", "rich", "disabled"] | None, which doesn't accept empty strings.

Issue 3: fast-time-server version was set to "0.9.0", but the latest stable release is "0.8.0".

💡 Fix Description

Fix 1: OBSERVABILITY_EXCLUDE_PATHS

  • Changed from: "/health,/healthz,/ready,/metrics,/static/.*" (comma-separated string)
  • Changed to: '["/health", "/healthz", "/ready", "/metrics", "/static/.*"]' (JSON array)

Fix 2: PLUGINS_CLI_MARKUP_MODE

  • Changed from: "" (empty string)
  • Changed to: "rich" (matching the default in .env.example)

Fix 3: fast-time-server version

  • Changed from: "0.9.0"
  • Changed to: "0.8.0" (latest stable release)

🧪 Verification

Check Command Status
Lint suite make lint ⚠️ N/A (Helm chart only)
Unit tests make test ⚠️ N/A (Helm chart only)
Coverage ≥ 90 % make coverage ⚠️ N/A (Helm chart only)
Manual regression no longer fails Helm deployment ⏳ Needs testing

Expected Results:

  • ✅ Gunicorn config loads without JSON parsing errors
  • ✅ Pydantic settings validation passes
  • ✅ Application starts successfully when deployed via Helm

📐 MCP Compliance (if relevant)

  • No MCP spec changes
  • No breaking change to MCP clients

✅ Checklist

  • Code formatted (Helm chart YAML only)
  • No secrets/credentials committed
  • Commit is signed-off (DCO)
  • Configuration values match expected Pydantic types
  • Changes follow existing patterns in .env.example

🔗 Related Issues

This commit fixes three configuration validation issues in the Helm chart
introduced in PR IBM#1400:

1. OBSERVABILITY_EXCLUDE_PATHS: Changed from comma-separated string to
   JSON array format to match Pydantic List[str] type expectations
   - Before: "/health,/healthz,/ready,/metrics,/static/.*"
   - After: '["\/health", "\/healthz", "\/ready", "\/metrics", "\/static\/.*"]'
   - Error fixed: json.decoder.JSONDecodeError and pydantic_settings.SettingsError

2. PLUGINS_CLI_MARKUP_MODE: Set default value to "rich" instead of
   empty string to satisfy Pydantic Literal type validation
   - Before: ""
   - After: "rich"
   - Valid options: "markdown", "rich", "disabled", or None
   - Error fixed: pydantic_core._pydantic_core.ValidationError

3. fast-time-server version: Updated to latest stable release
   - Before: "0.9.0"
   - After: "0.8.0"

These changes prevent validation errors during application startup
when deploying via Helm.

Signed-off-by: ppippi <wjdqlsdlsp@naver.com>
Signed-off-by: ppippi-dev <wjdqlsdlsp@naver.com>
@crivetimihai crivetimihai self-assigned this Nov 11, 2025
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.

2 participants