Skip to content

deployment-lag-notifier: automatically detect deployment drift between cloud deployments and main

Administrator requested to merge dd/slack-deployment-lag-notifer into main

Created by: danieldides

Part of https://github.com/sourcegraph/sourcegraph/issues/32878

This is the application portion of the efforts to automatically compare the running version of Sourcegraph in Cloud (preprod/prod) and trigger a notification on Slack when it differs too greatly from the tip of sourcegraph/sourcegraph@main.

The code is pretty simple and was largely inspired by sg live cloud. Unfortunately, most of the code that sg uses is contained in an internal, non-importable package and requires a full checkout of sourcegraph/sourcegraph. Instead, I used the public REST API endpoints of Github to fetch the latest 20 commits and compare them locally. This is a little more portable and doesn't require Git operations.

Test plan

Basic unit test included, mostly manual testing

Merge request reports

Loading