Simplify the configuration loading
The code simplifies the ocm config loading. It also moves the env variables right to the start, so it is obvious when they are used.
JIRA: https://issues.redhat.com/browse/SREP-71
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: petrkotas Once this PR has been reviewed and has the lgtm label, please assign nikokolas3270 for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Codecov Report
Attention: Patch coverage is 0.44248% with 225 lines in your changes missing coverage. Please review.
Project coverage is 30.48%. Comparing base (
0445703) to head (36bc03c).
Additional details and impacted files
@@ Coverage Diff @@
## main #437 +/- ##
==========================================
- Coverage 32.08% 30.48% -1.60%
==========================================
Files 35 36 +1
Lines 2425 2529 +104
==========================================
- Hits 778 771 -7
- Misses 1587 1699 +112
+ Partials 60 59 -1
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...tigations/apierrorbudgetburn/apierrorbudgetburn.go | 0.00% <0.00%> (ø) |
|
| ...tions/insightsoperatordown/insightsoperatordown.go | 8.45% <0.00%> (ø) |
|
| ...e/machinehealthcheckunterminatedshortcircuitsre.go | 50.29% <0.00%> (ø) |
|
| ...cfailureover4hr/upgradeconfigsyncfailureover4hr.go | 20.28% <0.00%> (ø) |
|
| pkg/managedcloud/managedcloud.go | 0.00% <0.00%> (ø) |
|
| pkg/pagerduty/pagerduty.go | 63.33% <0.00%> (+1.03%) |
:arrow_up: |
| cadctl/cmd/root.go | 0.00% <0.00%> (ø) |
|
| ...rrorbudgetburn/clustermonitoringerrorbudgetburn.go | 10.86% <0.00%> (-0.50%) |
:arrow_down: |
| cadctl/main.go | 0.00% <0.00%> (ø) |
|
| pkg/logging/logging.go | 57.89% <20.00%> (-9.55%) |
:arrow_down: |
| ... and 6 more |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/retest
Looks good and generally makes sense to me. We have a couple more env variables flying around, but with this change it will be easy to integrate them later on or when needed.
Good stuff!
/retest
/retest
@petrkotas: all tests passed!
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
The latest review is mostly style/chore type changes. The one major issue I see is that the metrics are likely broken by moving the pushgateway push() to the start of the investigation run.