Skip to content

Instantly share code, notes, and snippets.

View efritz's full-sized avatar
:shipit:
Shipping from home

Eric Fritz efritz

:shipit:
Shipping from home
View GitHub Profile
#!/bin/sh -ex
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17372 -commit="$(git rev-parse HEAD~1984)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17391 -commit="$(git rev-parse HEAD~1593)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17392 -commit="$(git rev-parse HEAD~1465)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17400 -commit="$(git rev-parse HEAD~1465)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17415 -commit="$(git rev-parse HEAD~1465)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17442 -commit="$(git rev-parse HEAD~1417)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17540 -commit="$(git rev-parse HEAD~1417)"
SRC_ENDPOINT=https://sourcegraph.test:3443 src code-intel upload -root=root/17546 -commit="$(git rev-parse HEAD~1417)"

Instructions pre-upgrade

  1. Go to Site Admin > Site Configuration and ensure the following line exists:k
  • "codeIntelAutoIndexing.enabled": false
  1. Go to Site Admin > Code Graph > Inference and set the following contents into the text box:
return require("sg.autoindex.config").new({
-- Primary keys
ALTER TABLE access_tokens ADD CONSTRAINT IF NOT EXISTS access_tokens_pkey PRIMARY KEY (id);
ALTER TABLE critical_and_site_config ADD CONSTRAINT IF NOT EXISTS critical_and_site_config_pkey PRIMARY KEY (id);
ALTER TABLE event_logs ADD CONSTRAINT IF NOT EXISTS event_logs_pkey PRIMARY KEY (id);
ALTER TABLE external_services ADD CONSTRAINT IF NOT EXISTS external_services_pkey PRIMARY KEY (id);
ALTER TABLE gitserver_repos ADD CONSTRAINT IF NOT EXISTS gitserver_repos_pkey PRIMARY KEY (repo_id);
ALTER TABLE global_state ADD CONSTRAINT IF NOT EXISTS global_state_pkey PRIMARY KEY (site_id);
ALTER TABLE lsif_configuration_policies ADD CONSTRAINT IF NOT EXISTS lsif_configuration_policies_pkey PRIMARY KEY (id);
ALTER TABLE lsif_dependency_syncing_jobs ADD CONSTRAINT IF NOT EXISTS lsif_dependency_indexing_jobs_pkey PRIMARY KEY (id);
ALTER TABLE lsif_dirty_repositories ADD CONSTRAINT IF NOT EXISTS lsif_dirty_repositories_pkey PRIMARY KEY (repository_id);
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.10
-- Dumped by pg_dump version 12.10
SET statement_timeout = 0;
SET lock_timeout = 0;
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.2
-- Dumped by pg_dump version 14.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
@efritz
efritz / README.md
Last active May 15, 2017 21:26
Minimal buggy example of gRPC server (see https://groups.google.com/forum/#!topic/grpc-io/45LxvLyYVLk)

To setup environment:

virtualenv venv
source ./venv/bin/activate
pip install -r requirements.txt

To observe buggy behavior run the server with python server.py, and then the client with python client.py. Interrup the client with Ctrl+C and show that the server continues to process the subscription loop. Then