Skip to content

Conversation

@are-ces
Copy link
Contributor

@are-ces are-ces commented Sep 4, 2025

Description

Updated endpoint to never return 503 (cannot return it if service is unreachable). Updated tests and openapi docs accordingly.

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

  • Related Issue # LCORE-286
  • Closes # LCORE-286

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

  • Please provide detailed steps to perform tests related to this code change.
  • make test-integration

Summary by CodeRabbit

  • Documentation

    • OpenAPI docs: liveness endpoint (GET /liveness) now documents only a 200 response; the 503 response was removed.
    • Generated docs updated to remove the 503 row for liveness responses.
    • Example for FeedbackStatusUpdateResponse enhanced with a timestamp field.
  • Tests

    • OpenAPI JSON tests updated to expect only a 200 response for the liveness endpoint.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 4, 2025

Walkthrough

Removed the 503 response for the liveness endpoint (GET /liveness) across OpenAPI spec, docs, and tests; updated the endpoint’s documented responses mapping accordingly. Also adjusted docs/output.md by adding a timestamp field to a FeedbackStatusUpdateResponse example. No handler or runtime logic changes.

Changes

Cohort / File(s) Summary of Changes
OpenAPI liveness documentation
docs/openapi.json, docs/openapi.md, docs/output.md
Removed 503 response from /liveness documentation; retained 200. In docs/output.md, added a timestamp field to FeedbackStatusUpdateResponse example and a minor formatting tweak (trailing comma).
Endpoint response mapping
src/app/endpoints/health.py
Removed 503 from the liveness endpoint OpenAPI responses mapping and added a comment indicating 503 will not be returned when unreachable. No change to handler logic.
OpenAPI tests
tests/integration/test_openapi_json.py
Updated expected /liveness responses set from {"200", "503"} to {"200"} in the test expectations.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • LCORE-632: updated doc #499 — Modifies the FeedbackStatusUpdateResponse documentation example (adds a timestamp and formatting), overlapping with docs/output.md changes.

Poem

Little hare taps docs with care,
Snips out 503—lighter air.
Liveness hums a steady 200,
Tests now match, tidy and sunny.
A timestamp hops into the guide—thump! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 72cc592 and 1bc75dc.

📒 Files selected for processing (5)
  • docs/openapi.json (0 hunks)
  • docs/openapi.md (0 hunks)
  • docs/output.md (1 hunks)
  • src/app/endpoints/health.py (1 hunks)
  • tests/integration/test_openapi_json.py (1 hunks)
💤 Files with no reviewable changes (2)
  • docs/openapi.md
  • docs/openapi.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/app/endpoints/health.py
  • docs/output.md
  • tests/integration/test_openapi_json.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-pr
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Updated endpoint to never return 503 (cannot return it if service is unreachable). Updated tests and openapi docs accordingly
Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@tisnik tisnik merged commit e42062c into lightspeed-core:main Sep 4, 2025
19 checks passed
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