Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

gossion
Copy link
Member

@gossion gossion commented Oct 21, 2025

This pull request refactors the health check endpoint implementation by moving it from the OAuth endpoint manager to the main server service. The health endpoint is now always available, independent of OAuth configuration, and its response has been expanded to include additional fields. Corresponding tests and endpoint documentation have been updated to reflect these changes.

Health Endpoint Refactor:

  • The /health endpoint and its handler have been removed from EndpointManager in internal/auth/oauth/endpoints.go, and all related tests have been deleted or updated. [1] [2] [3] [4] [5]
  • A new healthHandler is implemented in Service (internal/server/server.go), making the health endpoint always available regardless of OAuth configuration. The handler now returns additional fields: version and transport alongside status and OAuth info.

Server Routing and Documentation Updates:

  • The /health endpoint is registered in both HTTP and SSE servers, and routing logic is updated so /health is always handled and documented in 404 responses. Endpoint descriptions are updated to include /health. [1] [2] [3] [4] [5] [6] [7]

Test Updates:

  • Tests for the HTTP and SSE servers are updated to expect the /health endpoint to return a healthy status and the new response format, including checks for version, transport, and OAuth fields. [1] [2] [3] [4] [5] [6]

Copy link
Member

@mainred mainred left a comment

Choose a reason for hiding this comment

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

Does this require doc change since it's a user-facing change.

@gossion gossion added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit d449c8a Oct 21, 2025
9 checks passed
@gossion gossion deleted the guwe/health branch October 21, 2025 08:18
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