notifications-engine icon indicating copy to clipboard operation
notifications-engine copied to clipboard

Shared map modification

Open alkur-gh opened this issue 10 months ago • 0 comments

Hi. I have a problem with argocd-notifications-controller sending wrong labels from different notification to alertmanager.

Could it be because of this line? https://github.com/argoproj/notifications-engine/blob/e3fe62649285afb289b2eb760e6bf8bd6819e639/pkg/services/alertmanager.go#L103

From my understanding n is a shared object (original template) in https://github.com/argoproj/notifications-engine/blob/e3fe62649285afb289b2eb760e6bf8bd6819e639/pkg/api/api.go#L29-L31 https://github.com/argoproj/notifications-engine/blob/e3fe62649285afb289b2eb760e6bf8bd6819e639/pkg/api/api.go#L93 https://github.com/argoproj/notifications-engine/blob/e3fe62649285afb289b2eb760e6bf8bd6819e639/pkg/templates/service.go#L25-L26

And because of this, shared n.Labels gets modified in https://github.com/argoproj/notifications-engine/blob/e3fe62649285afb289b2eb760e6bf8bd6819e639/pkg/services/alertmanager.go#L153

alkur-gh avatar Apr 17 '25 11:04 alkur-gh