mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:51:44 +00:00
Code AI platform with Code Search & Cody
* Frontend no longer embeds the assets intead it reads from the local filesystem assets. * Generally the frontend and server cmd targets will use the `//client/web/dist:copy_bundle` target to create a tarball for the oci_image. `copy_bundle` puts all the assets at `assets-dist` * For integration tests, frontend and server have the `no_client_bundle` target variants. For these oci_images, instead of the `tar_bundle` which is just a tar'd `copy_bundle` we use the `tar_dummy_manifest` which is just a tar that contains a dummy manifest. * By default we expect assets to be at `/assets-dist` * Renamed DevProvider to DirProvider ## Why By 'breaking' the dependency of frontend requiring assets to be built we essentially stop a common cache invalidation scenario that happens: - someone makes a frontend change = assets need to be rebuilt By decoupling assets from the frontend binary and moving the packing of assets to the building of the frontend and server images we will have a better cache hit rate (theoretically). Thus with this change, when: * client/web is change and nothing else ... only assets will have to rebuilt and cached versions of the backend will be used * if only backend code has changed ... cached assets will be used Closes DINF-115 ## Test plan ✅ sg start - web app opens and can search. Local dev assets get loaded ✅ sg test bazel-integration-test - server image gets built with **only** dummy web manifest. Also verified by running `sg bazel run //cmd/server:no_client_bundle.image` and then inspect container ✅ sg test bazel-e2e - server image gets built with bundle and all tests pass ✅ [main dry run](https://buildkite.com/sourcegraph/sourcegraph/builds/284042#0190e54c-14d9-419e-95ca-1198dc682048) ## Changelog - frontend: assets are no longer bundled with binary through `go:embed`. Instead assets are now added to the frontend container at `assets-dist`. |
||
|---|---|---|
| .apko | ||
| .aspect | ||
| .buildkite | ||
| .github | ||
| .vscode | ||
| client | ||
| cmd | ||
| dev | ||
| doc | ||
| docker-images | ||
| internal | ||
| lib | ||
| migrations | ||
| monitoring | ||
| schema | ||
| testing | ||
| third_party | ||
| third-party-licenses | ||
| tools | ||
| ui/assets | ||
| wolfi-images | ||
| wolfi-packages | ||
| .bazel_fix_commands.json | ||
| .bazelignore | ||
| .bazeliskrc | ||
| .bazelrc | ||
| .bazelversion | ||
| .dockerignore | ||
| .editorconfig | ||
| .eslintrc.js | ||
| .gitattributes | ||
| .gitignore | ||
| .graphqlrc.yml | ||
| .hadolint.yaml | ||
| .mailmap | ||
| .mocharc.js | ||
| .npmrc | ||
| .pre-commit-config.yaml | ||
| .prettierignore | ||
| .stylelintignore | ||
| .stylelintrc.json | ||
| .swcrc | ||
| .tool-versions | ||
| .trivyignore | ||
| BUILD.bazel | ||
| CHANGELOG.md | ||
| CODENOTIFY | ||
| CONTRIBUTING.md | ||
| deps.bzl | ||
| doc.go | ||
| eslint-relative-formatter.js | ||
| flake.lock | ||
| flake.nix | ||
| gen.go | ||
| go.mod | ||
| go.sum | ||
| graphql-schema-linter.config.js | ||
| LICENSE | ||
| LICENSE.enterprise | ||
| linter_deps.bzl | ||
| mockgen.temp.yaml | ||
| mockgen.test.yaml | ||
| mockgen.yaml | ||
| nogo_config.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| postcss.config.js | ||
| prettier.config.js | ||
| README.md | ||
| release.yaml | ||
| renovate.json | ||
| SECURITY.md | ||
| service-catalog.yaml | ||
| sg.config.yaml | ||
| shell.nix | ||
| stamp_tags.bzl | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.shared.ts | ||
| vitest.workspace.ts | ||
| WORKSPACE | ||
Docs •
Contributing •
Twitter •
Discord
Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.
- Code search: Search all of your repositories across all branches and all code hosts.
- Code intelligence: Navigate code, find references, see code owners, trace history, and more.
- Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.
Getting started
Development
Refer to the Developing Sourcegraph guide to get started.
Documentation
The doc directory has additional documentation for developing and understanding Sourcegraph:
- Architecture: high-level architecture
- Database setup: database best practices
- Go style guide
- Documentation style guide
- GraphQL API: useful tips when modifying the GraphQL API
- Contributing
License
This repository contains primarily non-OSS-licensed files. See LICENSE.
Copyright (c) 2018-present Sourcegraph Inc.