Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Pings service

This directory contains source code for the Pings service. This document describes details for local development of the service.

The following command should boot up a running service:

$ sg run pings
...
[          pings] INFO pings shared/main.go:47 service ready {"address": ":10086"}

The default configuration can be found in the sg.config.yaml file.

To send a test request:

curl http://localhost:10086/updates?site=df0eed23-0e8c-4721-9849-147d20d59911&version=0.0.0

A "200 OK" status code is expected.

Note

To test a more realistic request:

  1. Grab the ping request from /site-admin/pings of any Sourcegraph instance and save to a file named ping.json
  2. Do curl -X POST -H "Content-Type: application/json" -d @ping.json http://localhost:10086/updates

This would send an entry to the GCP Pub/Sub topic server-update-checks-test, and once processed, should be available in the BigQuery table sourcegraph_analytics.update_checks_test. You need to make the Entitle request to access this page.

When there is an error processing the Pub/Sub message, the entry would be instead sent to another BigQuery table sourcegraph_analytics.update_checks_test_error_records.