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

require prometheus client libs in mail_fetcher #2327

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Commits on Sep 16, 2024

  1. require prometheus client libs in mail_fetcher

    This is job is currently erroring in all environments, albeit after it's
    already done all the important work.
    
        {"@timestamp":"2024-09-16T13:05:05.605Z","message":"Finished running MailFetcher in production mode - 2024-09-16 13:05:05 UTC","level":"INFO","tags":["rails"]}
    		script/mail_fetcher:58:in `<main>': uninitialized constant Prometheus::Client::Push (NameError)
    		Prometheus::Client::Push.new(
    
    Note the "Finished running MailFetcher in production mode" log before the error
    - the script has still done everything it needs to, it just hasn't sent the
    metrics, which fortunately is on the very last line of the script.
    
    This looks like the same mistake I made when doing metrics for publishing-api:
    
        alphagov/publishing-api@3037457
    
    We need to explicitly require the push library to use it. I'm not 100% sure if
    we really need the other two imports (client and registry), but publishing-api
    has them, so we may as well be consistent. Can't hurt, surely.
    richardTowers committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ac1d7fb View commit details
    Browse the repository at this point in the history