Skip to content

Conversation

@Riscky
Copy link

@Riscky Riscky commented Oct 23, 2025

This adds a /health endpoint, which checks the application health. For now it only checks if the queues are full.

I've also moved /metrics to the main port. I don't think there is a good reason to advertise two separate ports.

@Riscky Riscky requested a review from isomorpheme October 23, 2025 15:08
@Riscky Riscky force-pushed the riscky/healthcheck branch from d886a3d to 4659bd7 Compare October 23, 2025 15:12
Copy link

@isomorpheme isomorpheme left a comment

Choose a reason for hiding this comment

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

Big +1 on just having the metrics endpoint on the same port and in the same server thread, I think having that separate buys us very little.

Looks good overall, just some style comments, and I think we do want to keep using wai-middleware-prometheus if possible (see other comment).

@Riscky Riscky force-pushed the riscky/healthcheck branch 3 times, most recently from ca9ff8c to 6867243 Compare October 27, 2025 10:43
@Riscky Riscky requested a review from isomorpheme October 27, 2025 10:43
Copy link

@isomorpheme isomorpheme left a comment

Choose a reason for hiding this comment

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

:shipit:

ghQueueFull <- atomically $ isFullTBQueue ghQueue
projectQueuesFull <- mapM (atomically . isFullTBQueue) $ fmap projectThreadQueue projectThreadState

return $ not $ ghQueueFull || or projectQueuesFull

Choose a reason for hiding this comment

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

Reading the || or slightly confused me for a second. I'm not sure if I actually prefer this, but you could skip the || like so:

Suggested change
return $ not $ ghQueueFull || or projectQueuesFull
return $ not $ or $ ghQueueFull : projectQueuesFull

Copy link
Author

Choose a reason for hiding this comment

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

projectQueuesFull isn't a list, so we can't even nicely rewrite this 🙃

@Riscky
Copy link
Author

Riscky commented Oct 28, 2025

@OpsBotPrime merge

@OpsBotPrime
Copy link

Rebased as 8780d43, waiting for CI …

@OpsBotPrime
Copy link

CI job 🟡 started.

@OpsBotPrime OpsBotPrime merged commit 8780d43 into master Oct 28, 2025
1 check was pending
@OpsBotPrime OpsBotPrime deleted the riscky/healthcheck branch October 28, 2025 11:08
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.

3 participants