Skip to content

Feat: add validation test cases for Rocketchat receiver - #8856

Merged
simonpasquier merged 44 commits into
prometheus-operator:mainfrom
nutmos:feat/rocketchat-validation
Oct 21, 2026
Merged

simonpasquier merged 44 commits into
prometheus-operator:mainfrom
nutmos:feat/rocketchat-validation

Conversation

@nutmos

@nutmos nutmos commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds the test coverage for Rocketchat receiver in AlertmanagerConfig.

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

Unit Testing

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

Add validation test cases for Rocketchat receiver

simonpasquier
simonpasquier previously approved these changes Sep 29, 2026
to cover all rocket chat URLs
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Sep 29, 2026
@nutmos
nutmos marked this pull request as ready for review September 29, 2026 09:13
@nutmos
nutmos requested a review from a team as a code owner September 29, 2026 09:13
@heliapb

heliapb commented Oct 20, 2026

Copy link
Copy Markdown
Member

@nutmos seems the automerge failed, can you check the merge conflicts? thanks

dependabot Bot and others added 18 commits October 21, 2026 07:18
Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.314.0 to 0.315.0.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.314.0...v0.315.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-version: 0.315.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps the github-actions-deps group with 1 update: [github/codeql-action/upload-sarif](https://github.com/github/codeql-action).


Updates `github/codeql-action/upload-sarif` from 4.38.1 to 4.38.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@1c5b675...2892aa5)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-deps
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Commits](prometheus/exporter-toolkit@v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Converting an AlertmanagerConfig between v1beta1 and v1alpha1 panicked
when an email receiver didn't set threading, because the converters
dereferenced the pointer without a nil check. Since threading is
optional, the conversion webhook failed for most email receivers.

Return nil when threading is unset, and add the first unit tests for
the conversion functions.

Part of prometheus-operator#8841

Signed-off-by: Sanchit2662 <[email protected]>
…-bot-token-cr

Feat: Add botToken support for Telegram in Alertmanager global config CR
Reuse the configuration resource status sync to report accepted and
rejected ServiceMonitors, remove stale bindings after deselection, and clean
up bindings before deleting the Agent.

Add feature-gated end-to-end coverage for status transitions, multiple
Agents, deselection, and deletion.

Signed-off-by: whiskey-coder <[email protected]>
…-separate-webhook-test

Feat: enhance Webhook config test cases in operator test
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.71.0 to 0.72.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](prometheus/common@v0.71.0...v0.72.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-version: 0.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
The ttl field exists on PushoverConfig in both v1beta1 and v1alpha1, but
the converters never copied it. Because v1alpha1 is the storage version,
a ttl set through v1beta1 was silently dropped before it reached the
operator, and a ttl set through v1alpha1 was lost when the object was
read and written back as v1beta1.

Copy the field in both directions and add a test case for it.

Closes prometheus-operator#8841

Signed-off-by: Sanchit2662 <[email protected]>
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.23.0 to 0.24.0.
- [Commits](golang/sync@v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps the github-actions-deps group with 1 update: [helm/kind-action](https://github.com/helm/kind-action).


Updates `helm/kind-action` from 1.15.0 to 1.15.1
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](helm/kind-action@06c1ae1...1544676)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-version: 1.15.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-deps
...

Signed-off-by: dependabot[bot] <[email protected]>
AymanZahran and others added 22 commits October 21, 2026 07:18
Prometheus runs as a non-root user and the operator doesn't set a Pod
security context by default. When the root directory of a persistent
volume (e.g. NFS or CephFS) is owned by root, Prometheus can't write to
it and crash loops. Explain how to set fsGroup in the securityContext
field and when it doesn't take effect.

Closes prometheus-operator#5354

Signed-off-by: Ayman Zahran <[email protected]>
This commit ensures that the referenced `routingKey` and `serviceKey`
values aren't empty which Alertmanager would reject.

Signed-off-by: Simon Pasquier <[email protected]>
This commit ensures that when updating a PrometheusRule, the test will
retry if the rule has been updated by another actor in the meantime.

Signed-off-by: Simon Pasquier <[email protected]>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.25.0/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.24.1...v1.25.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-version: 1.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.59.0 to 0.61.0.
- [Commits](golang/net@v0.59.0...v0.61.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.61.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps the github-actions-deps group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action/upload-sarif](https://github.com/github/codeql-action).


Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@043fb46...cf430e0)

Updates `github/codeql-action/upload-sarif` from 4.38.2 to 4.38.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@2892aa5...24c5418)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-deps
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.38.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-deps
...

Signed-off-by: dependabot[bot] <[email protected]>
…gram-validation

feat: add Telegram receiver validation
…rometheus-operator#8865)

* alertmanager: add route to the secret config

to support new feature introduced in AM 0.34.0

* alertmanager: update test case

fix version def

* alertmanager: update logger warning message

* alertmanager: update test file

to match the result
…rometheus-operator#8810)

* pkg/prometheus: add extraScrapeMetrics to the global configuration

Prometheus supports extra_scrape_metrics in the global section since
v3.10.0, and the --enable-feature=extra-scrape-metrics flag is being
phased out in favor of it. Expose the setting on the shared
CommonPrometheusFields so both Prometheus and PrometheusAgent can set
it globally instead of repeating it in every scrape config. The field
is version-gated to Prometheus >= 3.10.0, following the same pattern
as the other global scrape settings.

Regenerated CRDs, bundle.yaml, jsonnet, api-reference docs, deepcopy
and client applyconfiguration.

Fixes prometheus-operator#8809

Signed-off-by: longyuxiang <[email protected]>

* address review: inject extra-scrape-metrics feature flag for older versions

- Drop the "can be overridden per scrape config" wording until the
  scrape CRDs (ServiceMonitor, PodMonitor, Probe, ScrapeConfig) gain
  the field; that stays a follow-up to keep this PR narrow.
- For Prometheus >= v2.32.0 and < v3.10.0, inject
  --enable-feature=extra-scrape-metrics so the setting also works on
  versions that only support the feature flag; >= v3.10.0 keeps using
  the global config field. User-provided enableFeatures entries are
  not duplicated.
- Sync the generated applyconfiguration wrappers (PrometheusSpec,
  PrometheusAgentSpec) and regenerate the API reference docs.

Signed-off-by: longyuxiang <[email protected]>

* address review: simplify flag injection and silence version warning

- Drop the duplicate check before injecting extra-scrape-metrics into
  enable-feature: Prometheus handles duplicate values fine.
- appendExtraScrapeMetrics now skips silently below v3.10.0 instead of
  going through WithMinimumVersion, which would log a misleading
  warning: those versions honor the setting thanks to the injected
  feature flag argument.
- Simplify the field doc to 'It requires Prometheus >= v2.32.0.' as
  suggested.
- Regenerate CRDs, bundle.yaml, jsonnet and api-reference docs.

Signed-off-by: longyuxiang <[email protected]>

---------

Signed-off-by: longyuxiang <[email protected]>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.72.0 to 0.72.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](prometheus/common@v0.72.0...v0.72.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-version: 0.72.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Follow-up to the global extraScrapeMetrics setting: allow configuring
extra_scrape_metrics per scrape config via ServiceMonitor, PodMonitor,
Probe and ScrapeConfig, as requested in review. Like the other
per-scrape settings the field is version-gated to Prometheus >= v3.10.0
(per-scrape overrides are not honored on older versions, so the
version warning applies here).

Regenerated deepcopy, client applyconfigurations, CRDs, bundle.yaml,
jsonnet and the API reference docs.

Signed-off-by: longyuxiang <[email protected]>
…15.0

when using Prometheus version 3.15.0 or higher, configure the log level
in the runtime config section instead of using the command-line argument.

Signed-off-by: Christoph Maser <[email protected]>
…-kubernetes-sd-examples

docs: add Kubernetes service discovery examples for ScrapeConfig
…metheus-operator#8878)

* docs: clarify that ServiceMonitor targets must be backed by Pods

Signed-off-by: Ayman Zahran <[email protected]>

* chore: regenerate apply configurations

Signed-off-by: Ayman Zahran <[email protected]>

* docs: address review on ServiceMonitor Pod-backed note

Signed-off-by: Ayman Zahran <[email protected]>

* docs: clarify ServiceMonitor targets not backed by Pods

Address review feedback: scraping Service targets without a Pod reference
requires 'port' instead of 'targetPort' and 'filterRunning: false';
manually created Pods have no such restriction. ScrapeConfig is now
suggested as an option rather than a requirement.

Signed-off-by: Ayman Zahran <[email protected]>

---------

Signed-off-by: Ayman Zahran <[email protected]>
Co-authored-by: Ayman Zahran <[email protected]>
Keep BusyBox images as the default while adding separately tagged distroless variants for the operator, config reloader, and admission webhook.

Build, publish, sign, and validate the variants in CI.

Relates to prometheus-operator#8748

Signed-off-by: Sidheshwar Sarangal <[email protected]>
…sound-drop

Feat: update Pushover CR conversion and check
Alertmanager refuses a configuration with two time intervals of the same
name, which blocks every change until the object is fixed. Validate the
names like the receiver names are validated, for v1alpha1 and v1beta1.

Fixes prometheus-operator#8887

Signed-off-by: Aryan Deshmukh <[email protected]>
Bumps [github.com/go-test/deep](https://github.com/go-test/deep) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/go-test/deep/releases)
- [Changelog](https://github.com/go-test/deep/blob/main/CHANGES.md)
- [Commits](go-test/deep@v1.1.1...v1.1.2)

---
updated-dependencies:
- dependency-name: github.com/go-test/deep
  dependency-version: 1.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps the github-actions-deps group with 2 updates: [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) and [streetsidesoftware/cspell-action](https://github.com/streetsidesoftware/cspell-action).


Updates `github/codeql-action/upload-sarif` from 4.38.3 to 4.39.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@24c5418...6f2ac81)

Updates `streetsidesoftware/cspell-action` from 9.1.0 to 9.2.0
- [Release notes](https://github.com/streetsidesoftware/cspell-action/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell-action/blob/main/CHANGELOG.md)
- [Commits](streetsidesoftware/cspell-action@6f3c77c...ce1816e)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-deps
- dependency-name: streetsidesoftware/cspell-action
  dependency-version: 9.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-deps
...

Signed-off-by: dependabot[bot] <[email protected]>
auto-merge was automatically disabled October 20, 2026 23:28

Head branch was pushed to by a user without write access

@nutmos

nutmos commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@heliapb Fixed

@simonpasquier
simonpasquier merged commit a4f958d into prometheus-operator:main Oct 21, 2026
23 checks passed
@nutmos
nutmos deleted the feat/rocketchat-validation branch November 5, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.