Skip to content

Updating sourcegraph.com Search Links #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/admin/audit_log.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Here's a word-by-word breakout to demonstrate how the captured entry aligns with
### What is audited?

- [Security events](./security_event_logs)
- [Gitserver access](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/gitserver/internal/accesslog/accesslog.go?L100-104)
- [GraphQL requests](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/frontend/internal/httpapi/graphql.go?L226-244)
- [Gitserver access](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/cmd/gitserver/internal/accesslog/accesslog.go?L100-104)
- [GraphQL requests](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/cmd/frontend/internal/httpapi/graphql.go?L226-244)

This list is expected to grow in the future.

Expand Down Expand Up @@ -125,7 +125,7 @@ If you are interested to use this feature or to stream to a different destinatio

## Developing

The single entry point to the audit logging API is made via the [`audit.Log`](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/internal/audit/audit.go?L19) function. This internal function can be used from any place in the app, and nothing else needs to be done for the logged entry to appear in the audit log.
The single entry point to the audit logging API is made via the [`audit.Log`](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/internal/audit/audit.go?L19) function. This internal function can be used from any place in the app, and nothing else needs to be done for the logged entry to appear in the audit log.

Example call:
```
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/config/advanced_config_file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Where `extsvc.json` contains a JSON object that specifies _all_ of your code hos
}
```

You can find a full list of [valid top-level keys here](https://sourcegraph.com/github.com/sourcegraph/sourcegraph-public-snapshot@b7ebb9024e3a95109fdedfb8057795b9a7c638bc/-/blob/cmd/frontend/graphqlbackend/schema.graphql#L1104-1110).
You can find a full list of [valid top-level keys here](TODO/UPDATE SOURCEGRAPH SEARCH LINK-public-snapshot@b7ebb9024e3a95109fdedfb8057795b9a7c638bc/-/blob/cmd/frontend/graphqlbackend/schema.graphql#L1104-1110).

If you want to _allow_ edits to be made through the web UI (which will be overwritten with what is in the file on a subsequent restart), you may additionally set `EXTSVC_CONFIG_ALLOW_EDITS=true`. **Note** that if you do enable this, it is your responsibility to ensure the configuration on your instance and in the file remain in sync.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/deploy/kubernetes/configure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Following these steps will allow Prometheus to successfully scrape metrics from

## Tracing

Sourcegraph exports traces in OpenTelemetry format. The OpenTelemetry collector, which must be configured as part of the deployment using the [otel component](#deploy-opentelemetry-collector), [collects and exports traces](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/opentelemetry-collector/configs/logging.yaml).
Sourcegraph exports traces in OpenTelemetry format. The OpenTelemetry collector, which must be configured as part of the deployment using the [otel component](#deploy-opentelemetry-collector), [collects and exports traces](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/opentelemetry-collector/configs/logging.yaml).

By default, Sourcegraph supports exporting traces to multiple backends including Jaeger.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/enterprise_getting_started_guide/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you're deploying a new Enterprise instance, this page covers our most frequen
- [GitHub integration](/integration/github)
- [All code host integrations (not GitLab or GitHub)](/integration/#integrations)
- [Full guide to site config options](/admin/config/site_config#auth-sessionExpiry)
- [Changelog](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/CHANGELOG) to track releases and updates
- [Changelog](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/CHANGELOG) to track releases and updates

### Docker-compose
- [Basic installation guide](/admin/deploy/docker-compose/)
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/executors/deploy_executors_binary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ If you use the systemd service, simply run `systemctl start executor`, otherwise
## Upgrading executors

Upgrading executors is relatively uninvolved. Simply follow the instructions below.
Also, check the [changelog](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@main/-/blob/CHANGELOG) for any Executors related breaking changes or new features that you might want to configure.
Also, check the [changelog](TODO/UPDATE SOURCEGRAPH SEARCH LINK@main/-/blob/CHANGELOG) for any Executors related breaking changes or new features that you might want to configure.

### **Step 1:** First, grab the executor binary for the new target Sourcegraph version.

Expand Down
4 changes: 2 additions & 2 deletions docs/admin/executors/deploy_executors_binary_offline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ To install the Firecracker sandbox image, import the image using `docker`.
$ docker pull <docker repository image for sourcegraph/ignite:v0.10.5>
```

> Note: Check the [version](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@main/-/blob/cmd/executor/internal/config/consts.go?L15) against the version of executors being installed.
> Note: Check the [version](TODO/UPDATE SOURCEGRAPH SEARCH LINK@main/-/blob/cmd/executor/internal/config/consts.go?L15) against the version of executors being installed.

If you are using a custom image instead of the Sourcegraph image, you will need to set the environment variable
`EXECUTOR_FIRECRACKER_SANDBOX_IMAGE` to match the image name.
Expand All @@ -181,7 +181,7 @@ To install the Firecracker Kernel image, import the image (`sourcegraph/ignite-k
$ ignite kernel import --runtime docker <docker repository image for sourcegraph/ignite-kernel:5.10.135-amd64>
```

> Note: Check the [version](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@main/-/blob/cmd/executor/internal/config/consts.go?L18) against the version of executors being installed.
> Note: Check the [version](TODO/UPDATE SOURCEGRAPH SEARCH LINK@main/-/blob/cmd/executor/internal/config/consts.go?L18) against the version of executors being installed.

If you are using a custom image instead of the Sourcegraph image, you will need to set the environment variable
`EXECUTOR_FIRECRACKER_KERNEL_IMAGE` to match the image name.
Expand Down
4 changes: 2 additions & 2 deletions docs/admin/executors/deploy_executors_kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Executors interact with the Kubernetes API to manage the lifecycle of individual
| `batch` | `jobs` | `create`, `delete` | Executors create Job pods to run processes. Once Jobs are completed, they are cleaned up. |
| | `pods`, `pods/log` | `get`, `list`, `watch` | Executors need to look up and steam logs from the Job Pods. |

See the [example Role YAML](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@main/-/blob/cmd/executor/kubernetes/batches/executor-batches.Role.yml) for more details on the exact RBAC requirements for native Kubernetes Executors.
See the [example Role YAML](TODO/UPDATE SOURCEGRAPH SEARCH LINK@main/-/blob/cmd/executor/kubernetes/batches/executor-batches.Role.yml) for more details on the exact RBAC requirements for native Kubernetes Executors.

## Deployment

Expand Down Expand Up @@ -94,5 +94,5 @@ The Executor Docker image is available on Docker Hub at [`sourcegraph/executor-k
### Example Configuration YAML

See
the [local development YAMLs](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@main/-/blob/cmd/executor/kubernetes)
the [local development YAMLs](TODO/UPDATE SOURCEGRAPH SEARCH LINK@main/-/blob/cmd/executor/kubernetes)
for an example of how to configure the Executor in Kubernetes.
2 changes: 1 addition & 1 deletion docs/admin/executors/firecracker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Executor can be fined tuned with the following environment variables,

## Known caveats

We [configure iptables](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/executor/internal/run/install.go?L229-255) to prevent Firecracker-isolated processes from talking on [Private IPv4 Addresses](https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses) (providing network-level isolation). They can talk to DNS and Sourcegraph only, which prevents users from talking to a 10.x.x.x, 172.x.x.x, or 192.168.x.x range IP.
We [configure iptables](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/cmd/executor/internal/run/install.go?L229-255) to prevent Firecracker-isolated processes from talking on [Private IPv4 Addresses](https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses) (providing network-level isolation). They can talk to DNS and Sourcegraph only, which prevents users from talking to a 10.x.x.x, 172.x.x.x, or 192.168.x.x range IP.
2 changes: 1 addition & 1 deletion docs/admin/how-to/dirty_database_pre_3_37.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ _Note: for codeintel the schema version table is called `codeintel_schema_migrat

### 2. Run the sql queries to finish incomplete migrations

Sourcegraph's migration files take for form of `sql` files following the snake case naming schema `<version>_<description>.<up or down>.sql` and can be found [here](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/tree/migrations) in subdirectories for the specific database. _Note frontend is the pgsql database_.
Sourcegraph's migration files take for form of `sql` files following the snake case naming schema `<version>_<description>.<up or down>.sql` and can be found [here](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/tree/migrations) in subdirectories for the specific database. _Note frontend is the pgsql database_.

1. **Find the up migration starting with the migration's version number identified in [step 1](#1-identify-incomplete-migration):** [https://github.com/sourcegraph/sourcegraph/tree/\<YOUR-SOURCEGRAPH-VERSION\>/migrations](https://github.com/sourcegraph/sourcegraph/tree/main/migrations), making sure to go to \<YOUR-SOURCEGRAPH-VERSION\>

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/how-to/monorepo-issues.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following bullets provide a general guidline to which service may require mo

If you are regularly seeing the `Processing symbols is taking longer than expected. Try again in a while` warning in your sidebar, its likely that your symbols and/or gitserver services are underprovisioned and need more CPU/mem resources.

The [symbols sidebar](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/client/web/src/repo/RepoRevisionSidebarSymbols.tsx?L42) is dependent on the symbols and gitserver services. Upon opening the symbols sidebar, a search query is made to the GraphQL API to retrieve the symbols associated with the current git commit. You can read more about the [symbol search behavior and performance](/code-search/types/symbol#symbol-search-behavior-and-performance).
The [symbols sidebar](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/client/web/src/repo/RepoRevisionSidebarSymbols.tsx?L42) is dependent on the symbols and gitserver services. Upon opening the symbols sidebar, a search query is made to the GraphQL API to retrieve the symbols associated with the current git commit. You can read more about the [symbol search behavior and performance](/code-search/types/symbol#symbol-search-behavior-and-performance).

To address this concern, allocate more resources to the symbols service (to provide more processing power for indexing operations) and allocate more resources to the gitserver (to provide for the extra load associated with responding to fetch requests from symbols, and speed up sending the large repo).

Expand Down
4 changes: 2 additions & 2 deletions docs/admin/how-to/redis_configmap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Reference Materials



1. Locate the original redis-cache configuration file: [https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/redis-cache/redis.conf](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/redis-cache/redis.conf) Use this as the “Default redis.conf file” content in the ConfigMap. Adding `requirepass` sets the password for Redis authentication.
1. Locate the original redis-cache configuration file: [TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/redis-cache/redis.conf](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/redis-cache/redis.conf) Use this as the “Default redis.conf file” content in the ConfigMap. Adding `requirepass` sets the password for Redis authentication.
2. Create the redis-cache-conf ConfigMap:

```
Expand Down Expand Up @@ -110,7 +110,7 @@ spec:
```


4. Locate the original redis-store configuration file. [https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/redis-store/redis.conf](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/redis-store/redis.conf) Use this as the “Default redis.conf file” content in the ConfigMap.
4. Locate the original redis-store configuration file. [TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/redis-store/redis.conf](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/redis-store/redis.conf) Use this as the “Default redis.conf file” content in the ConfigMap.

5. Create the redis-store-conf ConfigMap:

Expand Down
6 changes: 3 additions & 3 deletions docs/admin/observability/opentelemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This approach offers a great deal of flexibility.

## Configuration

Sourcegraph's OpenTelemetry Collector is deployed with a [custom image, `sourcegraph/opentelemetry-collector`](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/tree/docker-images/opentelemetry-collector), and is configured with a configuration YAML file.
Sourcegraph's OpenTelemetry Collector is deployed with a [custom image, `sourcegraph/opentelemetry-collector`](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/tree/docker-images/opentelemetry-collector), and is configured with a configuration YAML file.
By default, `sourcegraph/opentelemetry-collector` is configured to not do anything with the data it receives, but [exporters to various backends](#exporters) can be configured for each signal we currently support—**currently, only [traces data](#tracing) is supported**.

Refer to the [documentation](https://opentelemetry.io/docs/collector/configuration/) for an in-depth explanation of the parts that compose a full collector pipeline.
Expand All @@ -35,7 +35,7 @@ To learn more about Sourcegraph traces in general, refer to our [tracing documen
> NOTE: In case you require an additional exporter from the [`opentelemetry-collector-contrib` repository](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter), please [open an issue](https://github.com/sourcegraph/sourcegraph/issues).

Basic configuration for each tracing backend type is described below. Note that just adding a backend to the `exporters` block does not enable it—it must also be added to the `service` block.
Refer to the next snippet for a basic but complete example, which is the [default out-of-the-box configuration](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/opentelemetry-collector/configs/logging.yaml):
Refer to the next snippet for a basic but complete example, which is the [default out-of-the-box configuration](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/opentelemetry-collector/configs/logging.yaml):

```yaml
receivers:
Expand Down Expand Up @@ -215,7 +215,7 @@ Most Sourcegraph deployment methods still ship with an opt-in Jaeger instance—
- [Kubernetes with Helm](/admin/deploy/kubernetes/helm#enable-the-bundled-jaeger-deployment)
- [Docker Compose](/admin/deploy/docker-compose/operations#enable-the-bundled-jaeger-deployment)

If you wish to do additional configuration or connect to your own Jaeger instance, the deployed Collector image is bundled with a [basic configuration with Jaeger exporting](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/docker-images/opentelemetry-collector/configs/jaeger.yaml).
If you wish to do additional configuration or connect to your own Jaeger instance, the deployed Collector image is bundled with a [basic configuration with Jaeger exporting](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/docker-images/opentelemetry-collector/configs/jaeger.yaml).
If this configuration serves your needs, you do not have to provide a separate config—the Collector startup command can be set to `/bin/otelcol-sourcegraph --config=/etc/otel-collector/configs/jaeger.yaml`. Note that this requires the environment variable `$JAEGER_HOST` to be set on the Collector instance (i.e. the container in Kubernetes or Docker Compose):

```yaml
Expand Down
4 changes: 2 additions & 2 deletions docs/admin/pings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ The Cody app connects to Sourcegraph.com to send a limited selection of the ping

It may happen that Sourcegraph will stop sending critical telemetry to Sourcegraph.com, if this happens it may indicate a problem with Sourcegraphs frontend database, or a site settings misconfiguration. Below are some debugging steps.

Sourcegraph telemetry pings are handled by a goroutine running on Sourcegraphs frontend service called [`updatecheck`](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/frontend/internal/app/updatecheck/client.go?subtree=true), `updatecheck` is [started](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:%5Ecmd/frontend/internal/cli/serve_cmd%5C.go+updatecheck.Start%28db%29&patternType=literal) on container startup and periodically requests a variety of queries be run in the `pgsql` database.
Sourcegraph telemetry pings are handled by a goroutine running on Sourcegraphs frontend service called [`updatecheck`](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/cmd/frontend/internal/app/updatecheck/client.go?subtree=true), `updatecheck` is [started](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:%5Ecmd/frontend/internal/cli/serve_cmd%5C.go+updatecheck.Start%28db%29&patternType=literal) on container startup and periodically requests a variety of queries be run in the `pgsql` database.


### Misconfigured update.channel
The most common scenario in which Sourcegraph stops sending pings is a change to the `update.channel` setting in an instance's [site config](https://sourcegraph.com/docs/admin/config/site_config)
```
"update.channel": "release",
```
*This setting [must be set to "release"](https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/internal/updatecheck/client.go?L803-806) in order for the telemetry goroutine to run.*
*This setting [must be set to "release"](TODO/UPDATE SOURCEGRAPH SEARCH LINK/-/blob/internal/updatecheck/client.go?L803-806) in order for the telemetry goroutine to run.*


### Check if the goroutine is running
Expand Down
Loading
Loading