Explicitly handle class constant references
What does this MR do?
-
Updates
ReactiveCachingWorker
to useString#constantize
instead ofKernel#const_get
.Why: After a
reload!
, callingKernel.const_get("Clusters::Applications::Prometheus")
returns the modulePrometheus
instead of the classClusters::Applications::Prometheus
(likely due to lack of support for nesting inKernel#const_get
). -
Updates every reference to the
Metrics
class withinlib/gitlab/metrics
is explicitly called referenced as::Gitlab::Metrics
Why: Rails can't find which
Metrics
class is required after reload. Plus some consistency is nice.
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/54320
Does this MR meet the acceptance criteria?
- [-] Changelog entry added, if necessary
- [-] Documentation created/updated via this MR
- [-] Documentation reviewed by technical writer or follow-up review issue created
-
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Sarah Yasonik