-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
Summary
This issue concerns the argocd-notifications GitHub CheckRun integration.
When sending CheckRun notifications to GitHub, the controller fails due to two main problems:
- Incorrect time parsing format for the
started_atandcompleted_atfields. - Missing fields (
statusandconclusion) in the CheckRun payload, even though they are specified in the notification template.
Observed Behavior
1. Timestamp parsing error
- The controller attempts to parse the started_at and completed_at fields using the following invalid layout:
"YYYY-MM-DDTHH:MM:SSZ" - This is not compatible with Go's time.Parse() function, which expects a layout like time.RFC3339
Logs output:
{"level":"error","msg":"Failed to notify recipient {github } defined in resource argocd/guestbook: parsing time \"2025-07-10T07:46:07Z\" as \"YYYY-MM-DDTHH:MM:SSZ\": cannot parse \"2025-07-10T07:46:07Z\" as \"YYYY-MM-DDTHH:MM:SSZ\" using the configuration in namespace argocd","resource":"argocd/guestbook","time":"2025-07-11T08:12:25Z"}
2. Missing Fields that exists in the payload:status and conclusion
- Even though the status and conclusion values are defined in the notification template, they were not passed through to the GitHub API payload, leading to a validation failure.
Logs:
{"level":"error","msg":"Failed to notify recipient {github } defined in resource argocd/guestbook: POST https://api.github.com/repos/mahdibouaziz/argo-lab/check-runs: 422 Validation Failed [{Resource:CheckRun Field:conclusion Code:missing_field Message:}] using the configuration in namespace argocd","resource":"argocd/guestbook","time":"2025-07-11T13:49:28Z"}Configured Template Example
Below is the relevant portion of the argocd-notifications-cm.yaml template being used:
template.github-app-deploy-notification: |
message: |
Application {{.app.metadata.name}} is now running new version of deployments manifests.
github:
status:
state: success
label: "argo-cd/{{.app.metadata.name}}"
checkRun:
name: "continuous-delivery/{{.app.metadata.name}}"
details_url: "https://6fb99af6d16c.ngrok-free.app/applications/{{.app.metadata.name}}?operation=true"
status: completed
conclusion: success
started_at: "{{.app.status.operationState.startedAt}}"
completed_at: "{{.app.status.operationState.finishedAt}}"
output:
title: "Deployment of {{.app.metadata.name}} on ArgoCD"
summary: "Application {{.app.metadata.name}} is now running new version of deployments manifests."
text: |
Application {{.app.metadata.name}} is now running new version of deployments manifests.
See more here: https://6fb99af6d16c.ngrok-free.app/applications/{{.app.metadata.name}}?operation=trueExpected Behavior
- The controller should correctly parse timestamps using
time.RFC3339. - The
statusandconclusionfields should be included in the payload sent to GitHub.
zied-jt, yelaissaoui, rasta-rocket and evheniyt-pillar
Metadata
Metadata
Assignees
Labels
No labels