Commit Graph

16 Commits

Author SHA1 Message Date
Camden Cheek
1ead945267
Docs: update links to point to new site (#60381)
We have a number of docs links in the product that point to the old doc site. 

Method:
- Search the repo for `docs.sourcegraph.com`
- Exclude the `doc/` dir, all test fixtures, and `CHANGELOG.md`
- For each, replace `docs.sourcegraph.com` with `sourcegraph.com/docs`
- Navigate to the resulting URL ensuring it's not a dead link, updating the URL if necessary

Many of the URLs updated are just comments, but since I'm doing a manual audit of each URL anyways, I felt it was worth it to update these while I was at it.
2024-02-13 00:23:47 +00:00
Jean-Hadrien Chabran
bc6a791710
bazel: fix remaining backend tests (#47961)
This PR fixes the last round of backend tests that are getting in the
way.

While most fixes are pertaining to adapting the code to deal with the
sandbox, or adjusting targets in some cases, we had to ignore the tests
from the database stitch migration (see
123cb55005)
(cc @efritz) because they are making strong assumptions toward running
inside the Sourcegraph repository, which is kinda non trivial to adapt.

Another one, albeit non consequential is the disabling of some tests
peforming external requests, which I think should be deleted anyway
(c83d8ebba8)

Fix https://github.com/sourcegraph/sourcegraph/issues/46837
Fix https://github.com/sourcegraph/sourcegraph/issues/46856
Fix https://github.com/sourcegraph/sourcegraph/issues/46862
Fix https://github.com/sourcegraph/sourcegraph/issues/46864
Fix https://github.com/sourcegraph/sourcegraph/issues/46833
Fix https://github.com/sourcegraph/sourcegraph/issues/46835
Fix https://github.com/sourcegraph/sourcegraph/issues/46836
Fix https://github.com/sourcegraph/sourcegraph/issues/46847
Fix https://github.com/sourcegraph/sourcegraph/issues/46838
Fix https://github.com/sourcegraph/sourcegraph/issues/46843
Fix https://github.com/sourcegraph/sourcegraph/issues/46845
Fix https://github.com/sourcegraph/sourcegraph/issues/46849
Fix https://github.com/sourcegraph/sourcegraph/issues/46851
Fix https://github.com/sourcegraph/sourcegraph/issues/46855
Fix https://github.com/sourcegraph/sourcegraph/issues/46857
Fix https://github.com/sourcegraph/sourcegraph/issues/46858
Fix https://github.com/sourcegraph/sourcegraph/issues/46859
Fix https://github.com/sourcegraph/sourcegraph/issues/46861
Fix https://github.com/sourcegraph/sourcegraph/issues/46863
Fix https://github.com/sourcegraph/sourcegraph/issues/46865
Fix https://github.com/sourcegraph/sourcegraph/issues/46867
Fix https://github.com/sourcegraph/sourcegraph/issues/46853

## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

Ran locally with bazel.

---------

Co-authored-by: davejrt <davetry@gmail.com>
2023-03-01 17:03:01 +00:00
Jean-Hadrien Chabran
bc5490c4bb
bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
Erik Seliger
b50a1fe27f
Finish work inlining most assets (#19279)
There were a couple more things to be inlined and a few references in docs which aren't up to date anymore.
2021-03-22 23:41:13 +01:00
Keegan Carruthers-Smith
4c40a06df1
gomod: update all (#11345)
Had to pin two dependencies.

github.com/golang/protobuf@v1.3.5 - It seems to be enforcing something
to do with resource names. This is causing our use of our k8s client to
panic.

github.com/aws/aws-sdk-go-v2@v0.20.0 - They removed some types in the
endpoint package we relied on. Unsure how to fix yet, so punting until
the next time someone tries to update dependencies.
2020-06-08 17:15:42 +02:00
Keegan Carruthers-Smith
49ce84462c
gomod: update all (#9037) 2020-03-16 16:22:30 +02:00
Tomás Senart
601c2f80ce
redis: Tune settings for cache and store (#8235)
* redis: Make redis-cache persistent again

This commit reverts the part of #8114 that made `redis-cache` not
persistent. Sourcegraph cannot work well with a cold cache, so we
need to persist this cached data to prevent cold starts (e.g. for
GitHub and GitLab cached user permissions).

* fixup! Improvements

* fixup! generate

* fixup! explicit appendonly no
2020-02-03 12:11:59 +01:00
Tomás Senart
a5828b8a65
server: Redis persistence optimizations (#8114)
* redis-pool: Use BGREWRITEAOF as sysreq command

This commit makes the sysreq check for redis store and cache run a
`BGREWRITEAOF` command rather than a simple `PING`. This ensures that
the AOF file doesn't grow unbounded due to frequent container restarts
(with the server image). The command itself is non-blocking and
best-effort.

The reason I didn't add this command to be ran from a Procline in the
server process manager is that it would require Redis to already by up,
and that would be substantially harder to wire together than this.

Fixes #3300

* server: Redis persistence optimizations

This commit optimizes how we do Redis persistence in the server image by:

1. Upgrading Redis to version 5.0.7 so that we can use the
`aof-use-rdb-preamble` setting which substantially speeds up the server
image start-up time in certain scenarios (see #3300).
2. Making `redis-cache` truly ephemeral by not storing any snapshots or
append only log to disk.

* doc: Update Redis version

* Update CHANGELOG

* server: Always rewrite redis config

* fixup! ./dev/generate

* Update CHANGELOG.md

Co-Authored-By: Keegan Carruthers-Smith <keegan.csmith@gmail.com>

Co-authored-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>
2020-01-31 13:44:44 +01:00
Keegan Carruthers-Smith
cc76c1a955
gomod: Update go-bindata (#6207)
Noticed a new release which deals with a staticcheck complaint. Luckily we are
not running into it (yet), but did the work to update anyways so lets ship this.
2019-10-25 16:10:53 +02:00
Thorsten Ball
c9d3a78438
Use 2 Redis instances in Server image, redis-cache & redis-store (#5040)
* Use 2 Redis instances in Server image, redis-cache & redis-store

This fixes #5015 by changing the Server image configuration to launch
two Redis instances, one to be used as a cache and one as a store.

The cache instance runs on port 6380 (unused according to [1])
and has `maxmemory-policy allkeys-lru`, which allows us to get rid of
TTLs on the cache keys (which I want to do as a separate follow-up PR).

After looking at the usage of Redis on my local Sourcegraph instance, I
decided to give the cache instance 800mb of memory and the store
instance 200mb (1GB was the maxmemory value used before). If someone has
better suggestions for this ratio, let me know.

I built and ran the server image locally and tested that both Redis
instances get used by `docker exec`ing into the Server image and running
`redis-cli -p <port> MONITOR` two times.

Let me know if there's anything I forgot or should add.

[1]: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

* Give both Redis instances in server image 1GB of memory

* Increase rcache.dataVersion to allow Redis migration in server image

* Use old data dir for redis-store instance to migrate data

* Add Redis migration to server to delete old rcache keys

* Retry connecting to Redis in Server

* Simplify handling Redis migration

* Turn deleting old cache data in Redis into generic migration

* Add a warning message to check Redis cache eviction policy

* Move cleanup logic for old rcache data to rcache package

* Fix involuntarily changed maxmemory-policy

* Use lua script to delete old cache data in Redis
2019-08-07 10:33:58 +02:00
Thorsten Ball
9f06d891f6
Regenerate bindata after nginx.conf change (#4860)
This fixes the CI build after #4849 introduced a change to the
nginx.conf that broke the build.
2019-07-12 10:55:19 +02:00
Beyang Liu
f9f5842b78
Increase nginx proxy_buffers size (#4849)
* nginx: increase acceptable response header size
* ci: build server image in docker-images-patch-notest case
2019-07-11 15:42:54 -07:00
Keegan Carruthers-Smith
e6d353a1a6
server: Specify nginx backend using ip rather than localhost (#1909)
This is an issue we have encountered before were docker doesn't correctly
resolve localhost, but does resolve 127.0.0.1 correctly.

We also move this bit of config into the sourcegraph controlled config, since
this is already an example where we want to be able to mutate this config.
2019-01-17 07:35:41 +02:00
Beyang Liu
1a83b5b195 generate 2019-01-16 17:20:04 -08:00
Beyang Liu
89d3e6873f fix nginx include directives 2019-01-16 16:49:24 -08:00
Keegan Carruthers-Smith
17b4c897e4
server: Use include directives for nginx to create an upgrade path (#1907)
We currently generate the nginx.conf for users, but then it is controlled by
users. If we want to change a setting in nginx.conf (such as changing a proxy
timeout), we then have to rely on user instructions to update the config.

Instead we can hook into the config via well placed include directives.
2019-01-16 12:42:20 +02:00