Skip to content
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

Failing to correctly group ArgoCD slack notifications with groupingKey #21351

Open
tamillaumudova opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working component:notifications Related to notifications subsystem version:2.11 Latest confirmed affected version is 2.11

Comments

@tamillaumudova
Copy link

Checklist:

  • [+] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • [+] I've included steps to reproduce the bug.
  • [+] I've pasted the output of argocd version.

Describe the bug

We want to group out slack notifications in the same thread when an automatic sync starts and succeeds/fails. Initially, I used the groupingKey "{{.app.status.sync.revision}}" (as well as this one "{{.app.status.operationState.syncResult.revision}}") specified in this doc, however, it wouldn't group the messages in the thread.

I also attempted to group them with groupingKey set to "{{.app.status.operationState.operation.id}}", {{.app.status.operationState.operation.revision}} which also did not work.

On top of this, I also tried to add a unique identifier of application name {{.app.metadata.name}} to the groupingKey such as "{{.app.metadata.name}}-{{.app.status.operationState.operation.revision}}" which also didn't help.

To Reproduce

This is our logic for sending out start, success and fail notifications (without groupingKey included)

- when: app.status.operationState != nil and app.status.operationState.phase in ['Running']
  description: Application is being synced
  send: [app-sync-running]
  oncePer: app.status.operationState.syncResult.revision
- when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
  description: Application is synced and healthy. Triggered once per commit.
  # since dora metrics are currently in closed beta, this will not actually send anything until we're added to the beta, or it's GA
  send: [dora, app-sync-status]
  oncePer: app.status.operationState.syncResult.revision
- when: app.status.operationState != nil and app.status.operationState.phase in ['Error', 'Failed']
  description: Application syncing has failed
  send: [app-sync-failed]
  oncePer: app.status.operationState.syncResult.revision

Expected behavior

For an application, we have the slack messages for a sync operation (start + success or fail) being sent as a single thread

Screenshots

Version

Paste the output from `argocd version` here.
v2.11.2

Logs

Paste any relevant application logs here.
@tamillaumudova tamillaumudova added the bug Something isn't working label Jan 3, 2025
@nitishfy nitishfy added component:notifications Related to notifications subsystem version:2.11 Latest confirmed affected version is 2.11 labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:notifications Related to notifications subsystem version:2.11 Latest confirmed affected version is 2.11
Projects
None yet
Development

No branches or pull requests

2 participants