[Notifications] Make GH Check Runs part of ArgoCD Notifications natively #19256
Labels
bug/enhancement
component:notifications
Related to notifications subsystem
enhancement
New feature or request
type:enhancement
Summary
ArgoCD Notifications currently support the following GitHub notification bits out of the box:
Since this was created, GitHub has introduced the check runs, which is essentially commit statuses on steroids. This will allow us to have more customizability on reporting back to GitHub and start making use of check suites as well. This is a great SO answer explaining the differences between commit statuses and check runs (and check suites).
Motivation
At my current company, we are making use of ArgoCD and ArgoCD notifications for the deployment process. In an effort to split off the CI from the CD, we want CI to only build and test, after which ArgoCD takes care of the deploying and reporting back on the status. However, some of the projects have testing to be ran after deployments are up-and-running, referring to them as
post-deployment
.As of now, we deploy a monorepo with groups of services that depend on each other. When we deploy such a group, there is a possibility that a service has a post-deployment stage that needs to be ran. However, we usually deploy these groups of services together, because they have changes that depend on each other. So we can only start the post-deployment stage(s) after each and every service has been deployed correctly. Here lies the problem.
Since we split up the CI and CD, once we get to CD, we lose the ability to track whether we deploy in groups; we simply deploy a service and it reports back to GitHub. Thus, we end up with a bunch of commit statuses telling us that we deployed service X, Y and Z correctly. Now technically we could have a workflow running that checks whether all of the commit statuses with a certain name are green and then execute the post-deployment, but that would be highly inefficient and costly. What we would rather have, is check runs and check suites.
If we were to create check runs, instead of having a workflow that keeps polling the status, we could have a workflow that is triggered whenever a check suite completes, which makes it way more efficient and less costly. It will also allows us to extend the information of the deployment towards the GitHub UI through Markdown, which is a big plus.
Another big motivation behind this proposal is that GitHub itself notes that the check runs API can only be used to write to using a GitHub App, which is impossible to do with ArgoCD Notifications without native support. Link to GH API docs
Proposal
We can add the check runs possibility side-by-side with the commit statuses. They are different APIs and can be used independently of each other. I think most, if not all of the possible values of creating a check run can be implemented and passed potentially. We can also start off simple and add only the basics, such as
details_url
,status
,conclusion
andoutput
, implementing things likeactions
et cetera at a later stage.The standard overview of possibilities look like the following now:
I propose to expand it to:
Simply as a start!
The text was updated successfully, but these errors were encountered: