From 9a64ff29094c966ad75f6f314ccbe2293655e4da Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Wed, 5 Jun 2019 18:47:30 -0700 Subject: [PATCH] cmd/server: update syntect_server env vars (#4275) * cmd/server: update syntect_server env vars And warn anyone updating the image that they need to be kept in sync so as to avoid this in the future. Fixes #4269 * CHANGELOG * changelog: move submodule fix to 3.4.3 --- CHANGELOG.md | 3 ++- cmd/server/Dockerfile | 4 ++++ cmd/server/shared/shared.go | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a2845b98261..b03e88781c542 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,6 @@ All notable changes to Sourcegraph are documented in this file. - Fixed repository search patterns which contain `.*`. Previously our optimizer would ignore `.*`, which in some cases would lead to our repository search excluding some repositories from the results. - Fixed an issue where the Phabricator native integration would be broken on recent Phabricator versions. This fix depends on v1.2 of the [Phabricator extension](https://github.com/sourcegraph/phabricator-extension). - Fixed an issue where the "Empty repository" banner would be shown on a repository page when starting to clone a repository. -- Repositories containing submodules not on Sourcegraph will now load without error (#2947) - Prevent data inconsistency on cached archives due to restarts. (#4366) ## 3.4.3 (unreleased) @@ -42,6 +41,8 @@ All notable changes to Sourcegraph are documented in this file. - Improved performance of the /site-admin/repositories page significantly (prevents timeouts). [#4063](https://github.com/sourcegraph/sourcegraph/issues/4063) - Fixed an issue where Gitolite repositories would be inaccessible to non-admin users after upgrading to 3.3.0+ from an older version. [#4263](https://github.com/sourcegraph/sourcegraph/issues/4263) - Repository names are now treated as case-sensitive, fixing an issue where users saw `pq: duplicate key value violates unique constraint \"repo_name_unique\"` [#4283](https://github.com/sourcegraph/sourcegraph/issues/4283) +- Fixed an issue with `sourcegraph/server` Docker deployments where syntax highlighting could produce `server closed idle connection` errors. [#4269](https://github.com/sourcegraph/sourcegraph/issues/4269) +- Repositories containing submodules not on Sourcegraph will now load without error [#2947](https://github.com/sourcegraph/sourcegraph/issues/2947) ## 3.4.2 diff --git a/cmd/server/Dockerfile b/cmd/server/Dockerfile index d789ad434b132..98521697f5ead 100644 --- a/cmd/server/Dockerfile +++ b/cmd/server/Dockerfile @@ -46,9 +46,13 @@ RUN apk update && apk add --no-cache \ 'redis=3.2.12-r0' bind-tools ca-certificates git@edge \ mailcap nginx openssh-client su-exec tini +# IMPORTANT: If you update the syntect_server version below, you MUST confirm +# the ENV variables from its Dockerfile (https://github.com/sourcegraph/syntect_server/blob/master/Dockerfile) +# have been appropriately set in cmd/server/shared/shared.go. # hadolint ignore=DL3022 COPY --from=sourcegraph/syntect_server:5e1efbb@sha256:6ec136246b302a6c8fc113f087a66d5f9a89a9f5b851e9abb917c8b5e1d8c4b1 /syntect_server /usr/local/bin/ COPY --from=ctags /usr/local/bin/universal-* /usr/local/bin/ + # hadolint ignore=DL3022 COPY --from=libsqlite3-pcre /sqlite3-pcre/pcre.so /libsqlite3-pcre.so ENV LIBSQLITE3_PCRE /libsqlite3-pcre.so diff --git a/cmd/server/shared/shared.go b/cmd/server/shared/shared.go index bc48c3342d378..3878f2fe484de 100644 --- a/cmd/server/shared/shared.go +++ b/cmd/server/shared/shared.go @@ -144,7 +144,7 @@ func Main() { `searcher: searcher`, `github-proxy: github-proxy`, `repo-updater: repo-updater`, - `syntect_server: sh -c 'env QUIET=true ROCKET_LIMITS='"'"'{json=10485760}'"'"' ROCKET_PORT=9238 ROCKET_ADDRESS='"'"'"127.0.0.1"'"'"' ROCKET_ENV=production syntect_server | grep -v "Rocket has launched" | grep -v "Warning: environment is"'`, + `syntect_server: sh -c 'env QUIET=true ROCKET_ENV=production ROCKET_PORT=9238 ROCKET_LIMITS='"'"'{json=10485760}'"'"' ROCKET_SECRET_KEY='"'"'SeerutKeyIsI7releuantAndknvsuZPluaseIgnorYA='"'"' ROCKET_KEEP_ALIVE=0 ROCKET_ADDRESS='"'"'"127.0.0.1"'"'"' syntect_server | grep -v "Rocket has launched" | grep -v "Warning: environment is"'`, } procfile = append(procfile, ProcfileAdditions...) if line, err := maybeRedisProcFile(); err != nil {