New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add summary to msteams #6206
feat: add summary to msteams #6206
Conversation
Looks like we'll need until Alertmanager 0.27 for this one |
b2c7c48
to
ba993e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey we need also add this new field to other places such as:
- https://github.com/prometheus-operator/prometheus-operator/blob/578e0c32d7db1a24a6c6adaaed7bec62e1b3c11e/pkg/apis/monitoring/v1beta1/conversion_to.go#L453C6-L453C28
func convertMSTeamsConfigTo(in MSTeamsConfig) v1alpha1.MSTeamsConfig {
I think worth also add some unit tests for this new field just to ensure we are not missing any other place on the config, you can find the unit tests available here:
func TestGenerateConfig(t *testing.T) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: #6365
pkg/alertmanager/operator.go
Outdated
if config.Summary != nil && amVersion.LT(semver.MustParse("0.27.0")) { | ||
return fmt.Errorf(`Summary only available in Alertmanager >= 0.27.0`) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to func (tc *msTeamsConfig) sanitize(amVersion semver.Version, logger log.Logger) error {...}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dongjiang1989 changed accordingly, could you review?
19c7e52
to
daaca51
Compare
daaca51
to
bb82662
Compare
@slashpai could you pls review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just a nit
@nicolastakashi Take a look if changes are good. IIUC merging is blocked since requested changes and you would need to approve to proceed :) |
Description
Fix issue #6131
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.)Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.