Move override_rails_constants.rb to another location
What does this MR do and why?
This is an add-on to !74997 (comment 750290557) where we discussed moving some code. The previous MR was merged before this was done, so it is now in this MR.
Please read !74997 (comment 750290557) for full context.
How to set up and validate locally
Everything should work as expected, as we're shuffling code around. The setup-test-env
is used in pipelines, so that will be tested by the pipelines. The code in metrics_server/settings_overrides.rb
can be validated this way:
We will have to overwrite the default settings for Settings.monitoring.sidekiq_health_checks.port
, since they default to Settings.monitoring.sidekiq_exporter.port
. If those are the same, we can't run both. With gdk you can change the gitlab.yml
and set Settings.monitoring.sidekiq_health_checks.port
to any other number. e.g.
sidekiq_exporter:
enabled: true
address: 127.0.0.1
port: 3807
sidekiq_health_checks:
port: 3907
- Open rails console
- Start the metrics server:
require_relative 'metrics_server/metrics_server'
MetricsServer.spawn('sidekiq')
- See if the sidekiq workers are healthy
curl localhost:3907/liveness
- See if the metrics server is serving metrics
curl localhost:3807/metrics
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.