From 96f7944f472bc6ecf79f8e8fe0a1d5f8cd2bbdba Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Wed, 27 Jan 2021 19:04:30 -0700 Subject: [PATCH 1/2] dev/ci: do not set DEPLOY_TYPE=dev for backend integration tests These are effectively end-to-end tests, so setting this is very bad for the same reason described in #17731 Should also fix the current CI failure on `main`. Helps #17218 Signed-off-by: Stephen Gutekanst --- dev/ci/backend-integration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/ci/backend-integration.sh b/dev/ci/backend-integration.sh index b4bf494fa8cd..cf4e8663afff 100755 --- a/dev/ci/backend-integration.sh +++ b/dev/ci/backend-integration.sh @@ -17,7 +17,7 @@ if curl --output /dev/null --silent --head --fail $URL; then fi echo "--- Running a daemonized $IMAGE as the test subject..." -CONTAINER="$(docker container run -d -e DEPLOY_TYPE=dev -e GOTRACEBACK=all "$IMAGE")" +CONTAINER="$(docker container run -d -e GOTRACEBACK=all "$IMAGE")" trap 'kill $(jobs -p -r)'" ; docker logs --timestamps $CONTAINER ; docker container rm -f $CONTAINER ; docker image rm -f $IMAGE" EXIT docker exec "$CONTAINER" apk add --no-cache socat From a39fdc7950cd109552a2548668fa07b011a540bd Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Wed, 27 Jan 2021 19:05:55 -0700 Subject: [PATCH 2/2] code insights: do not run on sourcegraph/server Code Insights will not, at least initially, be supported on demo sourcegraph/server deployments. This codifies that. See #17222 Signed-off-by: Stephen Gutekanst --- enterprise/internal/insights/insights.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/enterprise/internal/insights/insights.go b/enterprise/internal/insights/insights.go index b64c20555c13..44e051cdfbc1 100644 --- a/enterprise/internal/insights/insights.go +++ b/enterprise/internal/insights/insights.go @@ -19,6 +19,10 @@ func Init(ctx context.Context, enterpriseServices *enterprise.Services) error { // TimescaleDB in those deployments. https://github.com/sourcegraph/sourcegraph/issues/17218 return nil } + if conf.IsDeployTypeSingleDockerContainer(conf.DeployType()) { + // Code insights is not supported in single-container Docker demo deployments. + return nil + } timescale, err := initializeCodeInsightsDB() if err != nil { return err