Skip to content

Extend OkComputer to enable a HEAD check#4

Merged
jason-raitz merged 5 commits intomainfrom
okcomputer_head_request
Feb 4, 2026
Merged

Extend OkComputer to enable a HEAD check#4
jason-raitz merged 5 commits intomainfrom
okcomputer_head_request

Conversation

@jason-raitz
Copy link
Contributor

@jason-raitz jason-raitz commented Feb 2, 2026

Many of our applications now use the OkComputer gem for health checks. This is great for health checks that use GET requests. However, there are some connections where a full GET request takes too long and/or has too much overhead when all we want to know is that the URI returns a HTTP status of 200 OK.

OkComputer uses the open-uri library, so it is not able to make HEAD requests. To extend that ability, this PR will add a HeadCheck class that extends HttpCheck to add an override for OkComputer's perform_request method that uses this gem's wrapper for the rest-client gem.

Supports recent and active tickets like AP-534 & AP-536.

Copy link
Member

@awilfox awilfox left a comment

Choose a reason for hiding this comment

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

Looks good. r+ after comment removal.

@awilfox
Copy link
Member

awilfox commented Feb 2, 2026

This also supports AP-534, if you want to note that somewhere.

@jason-raitz jason-raitz self-assigned this Feb 2, 2026
Copy link
Member

@anarchivist anarchivist left a comment

Choose a reason for hiding this comment

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

looking good - i'm hoping we can address the timeout. this might require some changes to BerkeleyLibrary::Util::URIs::Requester. r+ pending addressing/discussing that.

@jason-raitz jason-raitz marked this pull request as ready for review February 4, 2026 17:03
@jason-raitz jason-raitz requested a review from awilfox February 4, 2026 17:03
Copy link
Member

@awilfox awilfox left a comment

Choose a reason for hiding this comment

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

Looks good to me. r+

@jason-raitz jason-raitz merged commit 18da2f5 into main Feb 4, 2026
8 checks passed
@jason-raitz jason-raitz deleted the okcomputer_head_request branch February 4, 2026 19:00
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