Code AI platform with Code Search & Cody
Go to file
Erik Seliger d04e821ceb
Experiment: Natively run SSBC in docker (#44034)
This adds an experimental code path that I will use to test a docker-only execution mode for server-side batch changes. This code path is never executed for customers until we make the switch when we deem it ready. This will allow me to dogfood this while it's not available to customer instances yet.

Ultimately, the goal of this is to make executors simply be "the job runner platform through a generic interface". Today, this depends on src-cli to do a good bunch of the work. This is a blocker for going full docker-based with executors, which will ultimately be a requirement on the road to k8s-based executors.

As this removes the dependency on src-cli, nothing but the job interface and API endpoints tie executor and Sourcegraph instance together. Ultimately, this will allow us to support larger version spans between the two (pending executors going GA and being feature-complete).

Known issues/limitations:

Steps skipped in between steps that run don't work yet
Skipping steps dynamically is inefficient as we cannot tell the executor to skip a step IF X, so we replace the script by exit 0
It is unclear if all variants of file mounts still work. Basic cases do work. Files used to be read-only in src-cli, they aren't now, but content is still reset in between steps.
The assumption that everything operates in /work is broken here, because we need to use what executors give us to persist out-of-repo state in between containers (like the step result from the previous step)
It is unclear if workspace mounts work
Cache keys are not correctly computed if using workspace mounts - the metadataretriever is nil
We still use log outputs to transfer the AfterStepResults to the Sourcegraph instance, this should finally become an artifact instead. Then, we don't have to rely on the execution_log_entires anymore and can theoretically prune those after some time. This column is currently growing indefinitely.
It depends on tee being available in the docker images to capture the cmd.stdout/cmd.stderr properly for template variable rendering
Env-vars are not rendered in their evaluated form post-execution
File permissions are unclear and might be similarly broken to how they are now - or even worse
Disclaimer: It's not feature complete today! But it is also not hitting any default code paths either. As development on this goes on, we can eventually remove the feature flag and run the new job format on all instances. This PR handles fallback of rendering old records correctly in the UI already.
2022-11-10 00:20:43 +01:00
.buildkite sg: fix lint issues for urls and shell (#43248) 2022-10-20 23:46:48 +02:00
.github progress_bot: use gcloud auth action (#44088) 2022-11-08 10:25:27 -07:00
.vscode chore: Run yarn format (#43031) 2022-10-17 08:30:32 +00:00
.yarn workflows: bump license_finder to v7.0.1 (#43787) 2022-11-03 11:27:06 +02:00
client Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
cmd Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
dev release: update release config for 4.2 (#44177) 2022-11-09 22:58:17 +00:00
doc Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
docker-images Revert "prometheus: increase scrape and evaluation intervals to 1m" (#44168) 2022-11-09 10:34:02 -08:00
enterprise Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
internal Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
lib Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
migrations Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
monitoring monitoring: change disk metrics sampling duration to 1m (#44166) 2022-11-09 19:19:51 +01:00
schema Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
third-party-licenses workflows: bump license_finder to v7.0.1 (#43787) 2022-11-03 11:27:06 +02:00
ui/assets Homepage cleanup (#43507) 2022-10-27 17:30:21 -06:00
.browserslistrc Performance: Update browserslist and drop broken Safari 13 support (#39349) 2022-08-10 11:02:32 +01:00
.dockerignore symbols: Build in Docker (#34335) 2022-04-25 16:03:55 -06:00
.editorconfig nix: migrate to Nix Flakes (#43668) 2022-10-31 15:08:06 +00:00
.eslintignore vscode: create integration test harness (#33921) 2022-04-22 09:54:35 -04:00
.eslintrc.js Restrict imports from any out/ directories (#41515) 2022-10-17 11:09:33 +02:00
.gitattributes chore: Mark __snapshots__ directories as generated. (#37546) 2022-06-27 08:23:35 +02:00
.gitignore web: add Analyzing the Bundlesize check failure docs (#41164) 2022-09-01 04:47:57 -07:00
.golangci.yml go + golangci: update to go to 1.19.3 and golanci to 1.50.1 (#43747) 2022-11-02 15:08:25 +02:00
.graphqlrc.yml Support multiple GraphQL schema files (#20077) 2021-04-19 14:35:49 +02:00
.hadolint.yaml bump comby version to 1.7.1 (#35830) 2022-05-20 20:12:01 -07:00
.mailmap mailmap: update replacements for Joe (#29614) 2022-01-12 10:56:56 +08:00
.mocharc.js Revert "regression-tests: update custom mocha reporter to exit rather… (#41542) 2022-09-08 19:48:01 +00:00
.percy.yml Update browser extention installation detection logic on web (#32449) 2022-03-14 23:29:39 +06:00
.prettierignore Fix VS Code extension issue by sending a different GQL query for VSCE (#40621) 2022-08-22 10:13:14 +02:00
.stylelintignore web: named Webpack chunks (#39481) 2022-07-28 20:22:05 -07:00
.stylelintrc.json web: drop bootstrap depenedency (#41401) 2022-09-07 03:11:26 -07:00
.tool-versions workflows: bump license_finder to v7.0.1 (#43787) 2022-11-03 11:27:06 +02:00
.trivyignore ci: ignore benign CVE-2021-43816 in prometheus (#31069) 2022-02-11 16:49:10 +00:00
.yarnrc.yml workflows: bump license_finder to v7.0.1 (#43787) 2022-11-03 11:27:06 +02:00
babel.config.js Remove d3 ignore (#40048) 2022-08-07 08:37:21 -05:00
CHANGELOG.md Add a changelog entry for #43344 (#44072) 2022-11-08 11:45:10 +00:00
CODENOTIFY api docs: bye (#34798) 2022-05-18 01:03:03 +00:00
CONTRIBUTING.md update broken links (#39673) 2022-07-29 09:05:41 -06:00
doc.go
flake.lock nix: migrate to Nix Flakes (#43668) 2022-10-31 15:08:06 +00:00
flake.nix nix: migrate to Nix Flakes (#43668) 2022-10-31 15:08:06 +00:00
gen.go mockgen: Reorganize (#43451) 2022-10-26 16:07:29 +02:00
go.mod ci: get token from github app (#42674) 2022-11-09 18:33:03 +01:00
go.sum ci: get token from github app (#42674) 2022-11-09 18:33:03 +01:00
graphql-schema-linter.config.js Support multiple GraphQL schema files (#20077) 2021-04-19 14:35:49 +02:00
gulpfile.js web: lint root *.js files (#34164) 2022-04-20 05:22:08 -07:00
jest.config.base.js Remove reactstrap (#41868) 2022-09-21 22:23:38 +03:00
jest.config.js tests: use glob for jest projects field (#29681) 2022-01-13 01:11:52 -08:00
LICENSE update licensing language (#25620) 2021-10-04 15:40:59 +01:00
LICENSE.apache Move all client code into client/ folder (#14480) 2020-10-07 22:23:53 +02:00
LICENSE.enterprise
lighthouserc.js Lighthouse: Fix protocol_timeout (#27565) 2021-12-10 15:56:16 +00:00
mockgen.temp.yaml insights: remove unused code for non-isolated settings migration (#43916) 2022-11-04 09:13:04 -07:00
mockgen.test.yaml codeintel: extract and decouple autoindexing background jobs from service (#44110) 2022-11-09 17:45:19 +00:00
mockgen.yaml mocks: Reorganize mock definitions into multiple files (#36967) 2022-06-27 20:59:16 +00:00
package.json Add format:changed command (#44028) 2022-11-08 11:36:30 -03:00
postcss.config.js extensibility: add featured extensions to registry (#21665) 2021-06-10 13:55:20 -04:00
prettier.config.js
README.md docs/update add GCE custom image deployment type (#42911) 2022-10-21 10:23:57 -07:00
renovate.json chore: add test plans to bot and release tool PRs (#31351) 2022-02-22 07:53:25 -08:00
SECURITY.md consolidate security policy (#7906) 2020-01-21 10:03:11 -08:00
sg.config.yaml Experiment: Natively run SSBC in docker (#44034) 2022-11-10 00:20:43 +01:00
shell.nix nix: migrate to Nix Flakes (#43668) 2022-10-31 15:08:06 +00:00
svgo.config.js Performance: Optimize static SVG assets with SVGO (#26285) 2021-10-27 15:27:36 +01:00
tsconfig.all.json web: create the observability-client package (#40398) 2022-08-17 01:57:00 -07:00
tsconfig.eslint.json web: lint root *.js files (#34164) 2022-04-20 05:22:08 -07:00
tsconfig.json web: flatten frontend packages inside of the client folder (#19378) 2021-03-26 15:35:26 +08:00
yarn.lock Code Insights: Improve dashboard card Voice Over navigation (#43970) 2022-11-08 11:33:53 -03:00

Sourcegraph 4.0

DocsContributingTwitter

Build status Scorecard Latest release Discord Contributors


Understand, fix, and automate across your codebase with Sourcegraph's code intelligence platform

 


4.0 Features

  • Understand usage and search structure with high-level aggregations of search results
  • A faster, simpler search experience
  • Configure precise code navigation for 9 languages (Ruby, Rust, Go, Java, Scala, Kotlin, Python, TypeScript, JavaScript) in a matter of minutes with auto-indexing
  • Your favorite extensions are now available by default
  • Quickly access answers within your codebase with a revamped reference panel

🏗️ High-leverage ways to improve your entire codebase

  • Make changes across all of your codebase at enterprise scale with server-side Batch Changes (beta)
    • Run large-scale or resource-intensive batch changes without clogging your local machine
    • Run large batch changes quickly by distributing them across an autoscaled pool of compute instances
    • Get a better debugging experience with the streaming of logs directly into Sourcegraph.

☁️ Dedicated Sourcegraph Cloud instances for enterprise

  • Sourcegraph Cloud now offers dedicated, single-tenant instances of Sourcegraph

📈 Advanced admin capabilities

  • Save time upgrading to Sourcegraph 4.0 with multi-version upgrades
  • View usage and measure the value of our platform with new and enhanced in-product analytics
  • Uncover developer time saved using Browser and IDE extensions
  • Easily export traces using OpenTelemetry
  • Quickly see the status on your repository and permissions syncing
  • Measure precise code navigation coverage with an enhanced analytics dashboard

Deploy Sourcegraph

Self-hosted

Local machine

Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains both OSS-licensed and non-OSS-licensed files. We maintain one repository rather than two separate repositories mainly for development convenience.

All files in the enterprise and client/web/src/enterprise fall under LICENSE.enterprise.

The remaining files fall under the Apache 2 license. Sourcegraph OSS is built only from the Apache-licensed files in this repository.