Skip to content

pkg/alertmanager: add URL validation checks for Incident.io receiver#8228

Merged
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
tomlin7:feat/url-validation-incidentio
Jan 7, 2026
Merged

pkg/alertmanager: add URL validation checks for Incident.io receiver#8228
simonpasquier merged 1 commit intoprometheus-operator:mainfrom
tomlin7:feat/url-validation-incidentio

Conversation

@tomlin7
Copy link
Contributor

@tomlin7 tomlin7 commented Dec 31, 2025

Description

This PR adds test coverage to verify URL validation logic for the Incidentio receiver in Alertmanager configuration. The validation ensures that the url field, when provided, is a well-formed URL.

Relates to #8193

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

  • Ran tests: go test ./pkg/alertmanager -run TestSanitizeIncidentioConfig
  • Verified that invalid URLs return an appropriate error.

Changelog entry

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

Add URL validation for Incident.io receiver secrets

This PR adds test coverage to verify URL validation logic for the Incidentio receiver in Alertmanager
configuration. The validation ensures that the url field, when provided, is a well-formed URL.
@tomlin7 tomlin7 requested a review from a team as a code owner December 31, 2025 12:46
@tomlin7 tomlin7 changed the title pkg/alertmanager: Add URL validation checks for Incident.io receiver pkg/alertmanager: add URL validation checks for Incident.io receiver Dec 31, 2025
Copy link
Member

@heliapb heliapb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - I guess just fix the description as the url check was already added just missing a test check

@simonpasquier simonpasquier merged commit 6c78d42 into prometheus-operator:main Jan 7, 2026
22 checks passed
@tomlin7
Copy link
Contributor Author

tomlin7 commented Jan 7, 2026

Thanks for taking the action for me, @simonpasquier.

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.

3 participants