Conversation
| TLSCertFilePath: "/path/to/cert.pem", | ||
| TLSKeyFilePath: "/path/to/key.pem", | ||
| }, | ||
| PromConfig: &promconfig.Config{ |
There was a problem hiding this comment.
Prometheus library v0.308.0 populates additional default fields internally. Switched from exact struct comparison to field-by-field assertion to avoid test brittleness across library versions. Config loading behavior unchanged.
| "github.com/aws/amazon-cloudwatch-agent-operator/cmd/amazon-cloudwatch-agent-target-allocator/target" | ||
| ) | ||
|
|
||
| func init() { |
There was a problem hiding this comment.
Prometheus v0.308.0 changed default metric name validation. This aligns test validation scheme with prometheus-operator's config generation to prevent assertion mismatches.
| return nil, pmRetrieveErr | ||
| } | ||
|
|
||
| // Collect all namespaces from service monitors and pod monitors |
There was a problem hiding this comment.
prometheus-operator v0.87.0 changed GenerateServerConfiguration() to require a Prometheus CRD object. This constructs one dynamically using namespaces from discovered monitors. Functionally equivalent to the previous parameter-based approach.
There was a problem hiding this comment.
I might want to make sure this is covered too
| newLabels := make([]labels.Label, len(lbls)) | ||
| index := 0 | ||
| // helper function converts from model.LabelSet to labels.Labels. | ||
| func convertLabelToPromLabelSet(lbls model.LabelSet) labels.Labels { |
There was a problem hiding this comment.
I want to make sure the changes made here are covered with unit tests
|
If @okankoAMZ signs off on the two above changes I pointed out (since he wrote this portion), it's fine by me |
Issue #, if available:
The operator needs a dependency upgrade for prometheus for compliance reason.
Description of changes:
Updates base image and dependencies to latest versions. Major version bumps include prometheus-operator (v0.70.0 → v0.87.0), prometheus (v0.48.1 → v0.308.0), and otel collector featuregate (v0.77.0 → v1.45.0).
Adapts code to breaking API changes:
No functional changes.