Skip to content

Implement health and version API endpoints#233

Open
pranavisrikanth wants to merge 3 commits into
mainfrom
backend/health-version-endpoints
Open

Implement health and version API endpoints#233
pranavisrikanth wants to merge 3 commits into
mainfrom
backend/health-version-endpoints

Conversation

@pranavisrikanth
Copy link
Copy Markdown
Collaborator

Summary

Implemented lightweight backend API endpoints for service health and version visibility.

Endpoints added:

  • GET /health
  • GET /version

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code cleanup
  • Documentation
  • CI/CD / infrastructure
  • Security

Affected Components

  • /backend-api
  • /frontend
  • /engine (collectors / policies)
  • /security
  • /infrastructure
  • /.github/workflows
  • /docs

Motivation

Health and version endpoints support backend operational visibility and can be used for deployment validation, monitoring, and service status checks.

Testing Done

  • Unit tests pass locally
  • Tested manually — describe how:
  • No tests required — explain why:

Verified the new route definitions in backend-api/app/main.py.

Security Considerations

No sensitive data is exposed. Endpoints only return basic operational metadata.

Breaking Changes

  • No breaking changes
  • Yes — describe below:

Rollback Plan

  • Revert commit is sufficient
  • Requires additional steps — describe below:

Checklist

  • Code follows project conventions
  • No secrets, credentials, or tokens committed
  • Relevant documentation updated (if applicable)
  • CI/CD workflows pass on this branch
  • PR is focused on one thing

Screenshots

No.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bc22b01ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend-api/app/main.py Outdated
Copy link
Copy Markdown
Collaborator

@du-dhartley du-dhartley left a comment

Choose a reason for hiding this comment

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

@pranavisrikanth I understand the point of the health check, but why is /version here?
That will return the version that's specified in this file, which hasn't been updated nor will return a useful value if there's more than one available API version.

In addition to this, the code in the /health endpoint is actually more of a liveness check than it is a health check. Health checks would typically rely on dependencies to return successful checks before returning healthy here; this endpoint has effectively the same functionality as the root / endpoint above it.

I'd suggest removing /version, and either changing /health to /liveness or consider removing it also. There's no real functionality gain here.

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