argoproj / argoproj/notifications-engine
Incorrect Image Tag in Notifications & UTC to IST Time Conversion
- Dominant language
- Go
- Stars
- 334
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have implemented logic to include the new image tag in the notification when ArgoCD successfully syncs an application. However, sometimes the notification still shows the previous image tag instead of the updated one. The logic used for extracting the image tag is:
```
{
"title": "Image Tag",
"value": "{{ `{{ $image := index .app.status.summary.images 0 }}` }}{{ `{{ $parts := split ":" $image }}{{ $parts._1 }}` }}",
"short": true
}
```
Despite ensuring the logic fetches the latest image, the old tag appears intermittently. What could be causing this issue?
Additionally, I want to convert the
startedAt and finishedAt timestamps from UTC to IST in the notification. The current implementation is:
```
{
"title": "Finished At",
"value": "{{ `{{ .app.status.operationState.finishedAt }}` }}",
"short": true
},
{
"title": "Started At",
"value": "{{ `{{ .app.status.operationState.startedAt }}` }}",
"short": true
}
```
How can I ensure that these timestamps are correctly converted to IST before being displayed in the notification?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the notification using the expressions for .app.status.summary.images and .app.status.operationState.startedAt and finishedAt. Trace when those application status values are captured and rendered, then define done as consistently displaying the current image tag and correctly converted IST timestamps in the notification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100