Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make health probe server more general purpose #1079

Merged
merged 30 commits into from
Jan 23, 2024

Commits on Sep 17, 2023

  1. Make health probe server more general purpose

    This removes the health check logic from the ProbeServer and renames the
    ProbeServer to UtilityServer that accepts any Rack based app.
    
    The health check and catchall logic are moved into simple Rack middleware
    that can be composed by users however they like and be used to preserve
    existing health check behavior while transitioning to a more general
    purpose utility server.
    
    All and all this pattern will allow users to add whatever functionality
    they like to GoodJob's web server by composing Rack apps and using
    GoodJob's configuration to pass in users' Rack apps. IE:
    
    ```
    config.good_job.middleware = Rack::Builder.app do
      use GoodJob::Middleware::MyCustomMiddleware
      use GoodJob::Middleware::PrometheusExporter
      use GoodJob::Middleware::Healthcheck
      run GoodJob::Middleware::CatchAll
    end
    config.good_job.middleware_port = 7001
    ```
    
    This could help resolve:
    
    * bensheldon#750
    * bensheldon#532
    jklina committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    51aaf5e View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. Configuration menu
    Copy the full SHA
    ff1c8ad View commit details
    Browse the repository at this point in the history
  2. Use new API

    jklina committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    7a2ee38 View commit details
    Browse the repository at this point in the history
  3. Revert server name change

    We decided to leave the original ProbeServer name better sets
    expectations. See:
    
    bensheldon#1079 (review)
    
    This also splits out middleware testing into separate specs.
    jklina committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    eb63619 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. Restore original naming

    This also helps ensure that the existing behavior and API remain intact.
    jklina committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    ea9a964 View commit details
    Browse the repository at this point in the history
  2. Appease linters

    jklina committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    6535288 View commit details
    Browse the repository at this point in the history
  3. Add required message for mock

    jklina committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    8ff54d7 View commit details
    Browse the repository at this point in the history
  4. Make test description relevant

    jklina committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a6ee6db View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. Configuration menu
    Copy the full SHA
    d5520aa View commit details
    Browse the repository at this point in the history
  2. Add WEBrick WEBrick handler

    jklina committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    ac2885c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f92de5b View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2024

  1. Configuration menu
    Copy the full SHA
    911798d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed08af0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cd59f43 View commit details
    Browse the repository at this point in the history
  4. Namespace server handlers

    jklina committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    54955d1 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2024

  1. Warn and fallback when WEBrick isn't loadable

    Since the probe server has the option to use WEBrick as a server
    handler, but this library doesn't have WEBrick as a dependency,
    we want to throw a warning when WEBrick is configured, but not in the
    load path. This will also gracefully fallback to the built in HTTP
    server.
    jklina committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    59486a1 View commit details
    Browse the repository at this point in the history
  2. inspect load path

    jklina committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    59efbe9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0239a9b View commit details
    Browse the repository at this point in the history
  4. try removing load path test

    jklina committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    c0d66ce View commit details
    Browse the repository at this point in the history
  5. For error on require to initiate test

    As opposed to manipulating the load path.
    jklina committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    4226b27 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Configuration menu
    Copy the full SHA
    0b8375f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    be6bb19 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0615186 View commit details
    Browse the repository at this point in the history
  4. Appease linter

    jklina committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    3359a1d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ecca37 View commit details
    Browse the repository at this point in the history
  6. retrigger CI

    jklina committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    5a1fdcd View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2024

  1. Rename probe_server_app to probe_app; make handler name a symbol;…

    … rename Rack middleware/app for clarity
    bensheldon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    5429fd7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c67ba6 View commit details
    Browse the repository at this point in the history
  3. Fix readme grammar

    bensheldon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    206660a View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    2d9a4d2 View commit details
    Browse the repository at this point in the history