Skip to content

Make health check autodetectable.#77

Open
rubys wants to merge 1 commit intolinqueta:masterfrom
rubys:master
Open

Make health check autodetectable.#77
rubys wants to merge 1 commit intolinqueta:masterfrom
rubys:master

Conversation

@rubys
Copy link

@rubys rubys commented Feb 7, 2023

Background: Rails 7.1 will be adding health checks. I work for Fly.io as a Rails Speciality and would like to make Fly.io automatically detect the presence of health checks and pre-configure applications to enable these health checks if I can detect them. The problem is that health checks can vary on paths and implementation, so I'm proposing the following way to detect checks:

bin/rails runner "p Rails.application.routes.url_helpers.rails_health_check_path"

This pull request will add as: :rails_healh_check to the route. Additionally the generator will comment out any Rails 7.1 health check that might be present.

See also:

Also have generator comment out Rails 7.1 health check.

See also:
* superfly/flyctl#1678
* rails/rails#47217
* rails/rails#46936
@rubys
Copy link
Author

rubys commented Feb 21, 2023

More background on this request: https://fly.io/ruby-dispatch/health-checks/

@linqueta
Copy link
Owner

linqueta commented May 8, 2023

Hey @rubys , I did some tests using your PR as reference, I thought great the idea but the statement comment_lines isn't working on config/routes.rb.

Did you test it in some way?

Having it understood, we can move to commit your PR.

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