Skip to content

Conversation

@zszabo-rh
Copy link
Contributor

@zszabo-rh zszabo-rh commented Sep 25, 2025

Description

Current readiness probe couldn't detect configuration loading failures due to unresolved environment variables, because the application crashed before the probe endpoint was available. Also there were no validation of template placeholder resolution and no comprehensive application initialization tracking.

Enhanced readiness probe detects unresolved template placeholders using generic pattern matching, monitors initialization steps (config loading, llama client, MCP servers, etc.) while maintaining existing LLM provider health functionality. It also returns detailed reason in readiness probe response for troubleshooting.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

Tested by building and running local assisted-chat stack.
Readiness probe response when using bad config: (HTTP 503 Service Unavailable)

{
  "ready": false,
  "reason": "Configuration loading failed: 2 validation errors for Configuration\nauthentication.jwk_config.jwt_configuration.role_rules\n  Input should be a valid list [type=list_type, input_value='${{AUTHN_ROLE_RULES}}', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/list_type\nauthorization.access_rules\n  Input should be a valid list [type=list_type, input_value='${{AUTHN_ACCESS_RULES}}', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/list_type",
  "providers": []
}

Same with proper config:

{
  "ready": true,
  "reason": "Application fully initialized and ready",
  "providers": []
}

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zszabo-rh zszabo-rh mentioned this pull request Sep 25, 2025
18 tasks
try:
from models.config import ServiceConfiguration
diagnostic_port = int(os.getenv("DIAGNOSTIC_PORT", "8090"))
start_diagnostic_uvicorn(ServiceConfiguration(host="0.0.0.0", port=diagnostic_port))

Check warning

Code scanning / Bandit

Possible binding to all interfaces. Warning

Possible binding to all interfaces.
try:
from models.config import ServiceConfiguration
diagnostic_port = int(os.getenv("DIAGNOSTIC_PORT", "8090"))
start_diagnostic_uvicorn(ServiceConfiguration(host="0.0.0.0", port=diagnostic_port))

Check warning

Code scanning / Bandit

Possible binding to all interfaces. Warning

Possible binding to all interfaces.
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