Closed ferwguerra closed 7 months ago
After a deployment, we are sending notification of Argo status as Github status.
To read the value of that state, we are using the Github API, waiting up to 9 minutes (the time in which the Argo notification should be reported).
Using metrics, we have seen that the Argo notification is taking up to 19 minutes to be pushed to Github.
The app repository and gitops are in different repositories (that's why we have a custom configuration in repoURLPath and revisionPath).
repoURLPath
revisionPath
The configuration for notifications is the following:
notifiers: service.github: | appID: ${appID} installationID: ${installationID} privateKey: $github-privateKey enterpriseBaseURL: https://${GITHUB_URL}/api/v3 templates: template.app-deployed: | message: | Application {{ printf "{{ .app.metadata.name }}" }} is now running new version of deployments manifests. github: repoURLPath: {{ printf "'{{ (index .app.spec.info 0).value }}'" }} revisionPath: {{ printf "'{{ (index .app.spec.info 1).value }}'" }} status: state: success label: "continuous-delivery/{{ printf "{{ .app.metadata.name }}" }}" targetURL: "{{ printf "{{ .context.argocdUrl }}" }}/applications/{{ printf "{{ .app.metadata.name }}" }}?operation=true" triggers: trigger.on-deployed: | - description: Application is synced and healthy. Triggered once per commit. oncePer: app.status.sync.revision when: "time.Now().Sub(time.Parse(app.status.operationState.finishedAt)).Minutes() >= 1 and app.status.operationState.phase in [ 'Succeeded' ] and app.status.health.status == 'Healthy'" send: [ app-deployed ] logLevel: debug
The POST that we can see in the logs from the notifications-engine is
notifications-engine
POST /api/v3/repos/{org}/{repoName}/statuses/{commit}
Is this a bug or is it an expected behavior? If this is an expected behaviour, how much is the time we have to wait for the state in Github?
After a deployment, we are sending notification of Argo status as Github status.
To read the value of that state, we are using the Github API, waiting up to 9 minutes (the time in which the Argo notification should be reported).
Using metrics, we have seen that the Argo notification is taking up to 19 minutes to be pushed to Github.
The app repository and gitops are in different repositories (that's why we have a custom configuration in
repoURLPath
andrevisionPath
).The configuration for notifications is the following:
The POST that we can see in the logs from the
notifications-engine
isIs this a bug or is it an expected behavior? If this is an expected behaviour, how much is the time we have to wait for the state in Github?