fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix archive URL for ranking test (#809)

The `sourcegraph/sourcegraph` repo is now private, so we switch to
`sourcegraph-public-snapshot` for these tests. Eventually, we'll move the
relevant tests to the sourcegraph repo itself.

+50 -50
+7 -7
internal/e2e/e2e_rank_test.go
··· 39 39 requireCTags(t) 40 40 41 41 archiveURLs := []string{ 42 - "https://github.com/sourcegraph/sourcegraph/tree/v5.2.2", 42 + "https://github.com/sourcegraph/sourcegraph-public-snapshot/tree/v5.2.2", 43 43 "https://github.com/golang/go/tree/go1.21.4", 44 44 "https://github.com/sourcegraph/cody/tree/vscode-v0.14.5", 45 45 // The commit before ranking e2e tests were added to avoid matching ··· 57 57 q("time compare\\(", "github.com/golang/go/src/time/time.go"), 58 58 59 59 // sourcegraph/sourcegraph 60 - q("graphql type User", "github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/schema.graphql"), 61 - q("Get database/user", "github.com/sourcegraph/sourcegraph/internal/database/users.go"), 62 - q("InternalDoer", "github.com/sourcegraph/sourcegraph/internal/httpcli/client.go"), 63 - q("Repository metadata Write rbac", "github.com/sourcegraph/sourcegraph/internal/rbac/constants.go"), // unsure if this is the best doc? 60 + q("graphql type User", "github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/graphqlbackend/schema.graphql"), 61 + q("Get database/user", "github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/users.go"), 62 + q("InternalDoer", "github.com/sourcegraph/sourcegraph-public-snapshot/internal/httpcli/client.go"), 63 + q("Repository metadata Write rbac", "github.com/sourcegraph/sourcegraph-public-snapshot/internal/rbac/constants.go"), // unsure if this is the best doc? 64 64 65 65 // cody 66 66 q("generate unit test", "github.com/sourcegraph/cody/lib/shared/src/chat/recipes/generate-test.ts"), ··· 70 70 q("zoekt searcher", "github.com/sourcegraph/zoekt/api.go"), 71 71 72 72 // exact phrases 73 - q("assets are not configured for this binary", "github.com/sourcegraph/sourcegraph/ui/assets/assets.go"), 74 - q("sourcegraph/server docker image build", "github.com/sourcegraph/sourcegraph/dev/tools.go"), 73 + q("assets are not configured for this binary", "github.com/sourcegraph/sourcegraph-public-snapshot/ui/assets/assets.go"), 74 + q("sourcegraph/server docker image build", "github.com/sourcegraph/sourcegraph-public-snapshot/dev/tools.go"), 75 75 76 76 // symbols split up 77 77 q("bufio flush writer", "github.com/golang/go/src/net/http/transfer.go"), // bufioFlushWriter
+6 -6
internal/e2e/testdata/Get_databaseuser.txt
··· 2 2 query: (and case_substr:"Get" substr:"database/user") 3 3 targetRank: 3 4 4 5 - github.com/sourcegraph/sourcegraph/internal/database/user_emails.go 5 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/user_emails.go 6 6 161:func (s *userEmailsStore) Get(ctx context.Context, userID int32, email string) (emailCanonicalCase string, verified bool, err error) { 7 7 50: Get(ctx context.Context, userID int32, email string) (emailCanonicalCase string, verified bool, err error) 8 8 91:func (s *userEmailsStore) GetInitialSiteAdminInfo(ctx context.Context) (email string, tosAccepted bool, err error) { 9 9 hidden 14 more line matches 10 10 11 - github.com/sourcegraph/sourcegraph/internal/database/user_roles.go 11 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/user_roles.go 12 12 35: GetUserRoleOpts UserRoleOpts 13 13 358:func (r *userRoleStore) GetByUserID(ctx context.Context, opts GetUserRoleOpts) ([]*types.UserRole, error) { 14 14 365:func (r *userRoleStore) GetByRoleID(ctx context.Context, opts GetUserRoleOpts) ([]*types.UserRole, error) { 15 15 hidden 8 more line matches 16 16 17 - **github.com/sourcegraph/sourcegraph/internal/database/users.go** 17 + **github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/users.go** 18 18 940:func (u *userStore) GetByID(ctx context.Context, id int32) (*types.User, error) { 19 19 947:func (u *userStore) GetByVerifiedEmail(ctx context.Context, email string) (*types.User, error) { 20 20 951:func (u *userStore) GetByUsername(ctx context.Context, username string) (*types.User, error) { 21 21 hidden 17 more line matches 22 22 23 - github.com/sourcegraph/sourcegraph/internal/database/user_credentials.go 23 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/user_credentials.go 24 24 248:func (s *userCredentialsStore) GetByID(ctx context.Context, id int64) (*UserCredential, error) { 25 25 271:func (s *userCredentialsStore) GetByScope(ctx context.Context, scope UserCredentialScope) (*UserCredential, error) { 26 26 108: GetByID(ctx context.Context, id int64) (*UserCredential, error) 27 27 hidden 8 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/internal/database/user_emails_test.go 29 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/user_emails_test.go 30 30 56:func TestUserEmails_Get(t *testing.T) { 31 31 106:func TestUserEmails_GetPrimary(t *testing.T) { 32 32 585:func TestUserEmails_GetLatestVerificationSentEmail(t *testing.T) { 33 33 hidden 10 more line matches 34 34 35 - github.com/sourcegraph/sourcegraph/internal/database/users_test.go 35 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/database/users_test.go 36 36 628:func TestUsers_GetByVerifiedEmail(t *testing.T) { 37 37 664:func TestUsers_GetByUsername(t *testing.T) { 38 38 711:func TestUsers_GetByUsernames(t *testing.T) {
+6 -6
internal/e2e/testdata/InternalDoer.txt
··· 2 2 query: case_substr:"InternalDoer" 3 3 targetRank: 1 4 4 5 - **github.com/sourcegraph/sourcegraph/internal/httpcli/client.go** 5 + **github.com/sourcegraph/sourcegraph-public-snapshot/internal/httpcli/client.go** 6 6 217:var InternalDoer, _ = InternalClientFactory.Doer() 7 7 215:// InternalDoer is a shared client for internal communication. This is a 8 8 9 - github.com/sourcegraph/sourcegraph/internal/api/internalapi/client.go 9 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/api/internalapi/client.go 10 10 144: resp, err := httpcli.InternalDoer.Do(req.WithContext(ctx)) 11 11 12 - github.com/sourcegraph/sourcegraph/enterprise/cmd/embeddings/qa/context_data.tsv 12 + github.com/sourcegraph/sourcegraph-public-snapshot/enterprise/cmd/embeddings/qa/context_data.tsv 13 13 3:In the sourcegraph repository, what does InternalDoer do? internal/httpcli/client.go 14 14 4:In my codebase, what does InternalDoer do? internal/httpcli/client.go 15 15 16 - github.com/sourcegraph/sourcegraph/cmd/frontend/internal/app/badge.go 16 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/internal/app/badge.go 17 17 23: totalRefs, err := backend.CountGoImporters(r.Context(), httpcli.InternalDoer, routevar.ToRepo(mux.Vars(r))) 18 18 19 - github.com/sourcegraph/sourcegraph/internal/batches/webhooks/webhooks.go 19 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/batches/webhooks/webhooks.go 20 20 67: Enqueue(ctx, logger, db, eventType, marshalBatchChange, id, httpcli.InternalDoer) 21 21 74: Enqueue(ctx, logger, db, eventType, marshalChangeset, id, httpcli.InternalDoer) 22 22 23 - github.com/sourcegraph/sourcegraph/cmd/frontend/internal/app/resolvers/app.go 23 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/internal/app/resolvers/app.go 24 24 53: doer: httpcli.InternalDoer, 25 25 354: cli := httpcli.InternalDoer 26 26 424: cli := httpcli.InternalDoer
+5 -5
internal/e2e/testdata/Repository_metadata_Write_rbac.txt
··· 2 2 query: (and case_substr:"Repository" substr:"metadata" case_substr:"Write" substr:"rbac") 3 3 targetRank: -1 4 4 5 - github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/repository_metadata.go 5 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/graphqlbackend/repository_metadata.go 6 6 54:func (r *schemaResolver) AddRepoMetadata(ctx context.Context, args struct { 7 7 95:func (r *schemaResolver) UpdateRepoMetadata(ctx context.Context, args struct { 8 8 134:func (r *schemaResolver) DeleteRepoMetadata(ctx context.Context, args struct { 9 9 hidden 30 more line matches 10 10 11 - github.com/sourcegraph/sourcegraph/client/web/src/repo/tree/TreePageContent.tsx 11 + github.com/sourcegraph/sourcegraph-public-snapshot/client/web/src/repo/tree/TreePageContent.tsx 12 12 666:interface RepositoryContributorNodeProps extends QuerySpec { 13 13 10:import { RepoMetadata } from '@sourcegraph/branded' 14 14 16:import { RepositoryType, SearchPatternType, type TreeFields } from '@sourcegraph/shared/src/graphql-operations' 15 15 hidden 46 more line matches 16 16 17 - github.com/sourcegraph/sourcegraph/doc/admin/repo/metadata.md 17 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/admin/repo/metadata.md 18 18 1:# Custom repository metadata 19 19 18:## Adding metadata 20 20 8:### Repository owners 21 21 hidden 14 more line matches 22 22 23 - github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/repository_metadata_test.go 23 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/graphqlbackend/repository_metadata_test.go 24 24 26:func TestRepositoryMetadata(t *testing.T) { 25 25 17: "github.com/sourcegraph/sourcegraph/internal/rbac" 26 26 23: rtypes "github.com/sourcegraph/sourcegraph/internal/rbac/types" 27 27 hidden 25 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/client/web/src/repo/repoContainerRoutes.tsx 29 + github.com/sourcegraph/sourcegraph-public-snapshot/client/web/src/repo/repoContainerRoutes.tsx 30 30 3:import { canWriteRepoMetadata } from '../util/rbac' 31 31 5:import { RepositoryChangelistPage } from './commit/RepositoryCommitPage' 32 32 9:const RepositoryCommitPage = lazyComponent(() => import('./commit/RepositoryCommitPage'), 'RepositoryCommitPage')
+6 -6
internal/e2e/testdata/assets_are_not_configured_for_this_binary.txt
··· 2 2 query: (and substr:"assets" substr:"are" substr:"not" substr:"configured" substr:"for" substr:"this" substr:"binary") 3 3 targetRank: 1 4 4 5 - **github.com/sourcegraph/sourcegraph/ui/assets/assets.go** 5 + **github.com/sourcegraph/sourcegraph-public-snapshot/ui/assets/assets.go** 6 6 33:func (p FailingAssetsProvider) Assets() http.FileSystem { 7 7 14: Assets() http.FileSystem 8 8 1:package assets 9 9 hidden 12 more line matches 10 10 11 - github.com/sourcegraph/sourcegraph/schema/schema.go 11 + github.com/sourcegraph/sourcegraph-public-snapshot/schema/schema.go 12 12 492:type BrandAssets struct { 13 13 1530:type Notice struct { 14 14 1538:type Notifications struct { 15 15 hidden 668 more line matches 16 16 17 - github.com/sourcegraph/sourcegraph/doc/admin/executors/deploy_executors.md 17 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/admin/executors/deploy_executors.md 18 18 118:## Confirm executors are working 19 19 194:### Configuring the auth config for use in executors 20 20 216:### Adding certificates to a binary deployment 21 21 hidden 47 more line matches 22 22 23 - github.com/sourcegraph/sourcegraph/doc/getting-started/github-vs-sourcegraph.md 23 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/getting-started/github-vs-sourcegraph.md 24 24 8:## Which is best for you? 25 25 110:### Searching repositories, branches, and forks 26 26 18:As your codebase grows in complexity, the value of code search quickly increases. Sourcegraph may be a good fit for your team if: 27 27 hidden 66 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/doc/admin/executors/deploy_executors_terraform.md 29 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/admin/executors/deploy_executors_terraform.md 30 30 1:# Deploying Sourcegraph executors using Terraform on AWS or GCP 31 31 56:## Terraform Version 32 32 415:### **Step 1:** Update the source version of the terraform modules 33 33 hidden 68 more line matches 34 34 35 - github.com/sourcegraph/sourcegraph/doc/dev/background-information/sg/reference.md 35 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/dev/background-information/sg/reference.md 36 36 496:### sg lint format 37 37 505:### sg lint format 38 38 1:<!-- DO NOT EDIT: generated via: go generate ./dev/sg -->
+2 -2
internal/e2e/testdata/generate_unit_test.txt
··· 2 2 query: (and substr:"generate" substr:"unit" substr:"test") 3 3 targetRank: 11 4 4 5 - github.com/sourcegraph/sourcegraph/cmd/frontend/internal/insights/resolvers/insight_series_resolver.go 5 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/internal/insights/resolvers/insight_series_resolver.go 6 6 300:func (j *seriesResolverGenerator) Generate(ctx context.Context, series types.InsightViewSeries, baseResolver baseInsightResolver, filters types.InsightViewFilters, options types.SeriesDisplayOptions) ([]graphqlbackend.InsightSeriesResolver, error) { 7 7 275: Generate(ctx context.Context, series types.InsightViewSeries, baseResolver baseInsightResolver, filters types.InsightViewFilters, options types.SeriesDisplayOptions) ([]graphqlbackend.InsightSeriesResolver, error) 8 8 286: generateResolver resolverGenerator ··· 14 14 75: SampleUnit string // Unit for the sample data from the profile. 15 15 hidden 48 more line matches 16 16 17 - github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing/internal/inference/lua/test.lua 17 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/codeintel/autoindexing/internal/inference/lua/test.lua 18 18 9: generate = function(_, paths) 19 19 6: patterns = { pattern.new_path_basename "sg-test" }, 20 20 8: -- Invoked as part of unit tests for the autoindexing service
+6 -6
internal/e2e/testdata/graphql_type_User.txt
··· 2 2 query: (and substr:"graphql" substr:"type" case_substr:"User") 3 3 targetRank: 1 4 4 5 - **github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/schema.graphql** 5 + **github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/graphqlbackend/schema.graphql** 6 6 6376:type User implements Node & SettingsSubject & Namespace { 7 7 3862: type: GitRefType 8 8 5037: type: GitRefType! 9 9 hidden 460 more line matches 10 10 11 - github.com/sourcegraph/sourcegraph/internal/types/types.go 11 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/types/types.go 12 12 850:type User struct { 13 13 1372: Type *SearchCountStatistics 14 14 1766: Type string 15 15 hidden 234 more line matches 16 16 17 - github.com/sourcegraph/sourcegraph/client/web/src/enterprise/insights/core/backend/gql-backend/methods/get-dashboard-owners.ts 17 + github.com/sourcegraph/sourcegraph-public-snapshot/client/web/src/enterprise/insights/core/backend/gql-backend/methods/get-dashboard-owners.ts 18 18 22: type: InsightsDashboardOwnerType.Global, 19 19 32: type: InsightsDashboardOwnerType.Personal, 20 20 18: const { currentUser, site } = data 21 21 hidden 8 more line matches 22 22 23 - github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/apitest/types.go 23 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/graphqlbackend/apitest/types.go 24 24 47:type User struct { 25 25 9: Typename string `json:"__typename"` 26 26 32: Typename string `json:"__typename"` 27 27 hidden 11 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/cmd/frontend/internal/batches/resolvers/apitest/types.go 29 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/frontend/internal/batches/resolvers/apitest/types.go 30 30 52:type User struct { 31 31 364: User *User 32 32 393: Type string 33 33 hidden 68 more line matches 34 34 35 - github.com/sourcegraph/sourcegraph/internal/extsvc/github/common.go 35 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/extsvc/github/common.go 36 36 2030:type User struct { 37 37 66: User *Actor `json:"User,omitempty"` 38 38 527: Type string
+6 -6
internal/e2e/testdata/sourcegraphserver_docker_image_build.txt
··· 2 2 query: (and substr:"sourcegraph/server" substr:"docker" substr:"image" substr:"build") 3 3 targetRank: 14 4 4 5 - github.com/sourcegraph/sourcegraph/dev/sg/internal/images/images.go 5 + github.com/sourcegraph/sourcegraph-public-snapshot/dev/sg/internal/images/images.go 6 6 458: Build int 7 7 234:type ImageReference struct { 8 8 352:type ErrNoImage struct { 9 9 hidden 118 more line matches 10 10 11 - github.com/sourcegraph/sourcegraph/doc/admin/external_services/postgres.md 11 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/admin/external_services/postgres.md 12 12 41:### sourcegraph/server 13 13 192:### sourcegraph/server 14 14 53:### Docker Compose 15 15 hidden 19 more line matches 16 16 17 - github.com/sourcegraph/sourcegraph/internal/conf/deploy/deploytype.go 17 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/conf/deploy/deploytype.go 18 18 66:func IsDeployTypePureDocker(deployType string) bool { 19 19 12: SingleDocker = "docker-container" 20 20 13: DockerCompose = "docker-compose" 21 21 hidden 19 more line matches 22 22 23 - github.com/sourcegraph/sourcegraph/schema/schema.go 23 + github.com/sourcegraph/sourcegraph-public-snapshot/schema/schema.go 24 24 2621: ExecutorsBatcheshelperImage string `json:"executors.batcheshelperImage,omitempty"` 25 25 2627: ExecutorsLsifGoImage string `json:"executors.lsifGoImage,omitempty"` 26 26 2631: ExecutorsSrcCLIImage string `json:"executors.srcCLIImage,omitempty"` 27 27 hidden 22 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/internal/updatecheck/handler.go 29 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/updatecheck/handler.go 30 30 40: latestReleaseDockerServerImageBuild = newPingResponse("5.1.8") 31 31 45: latestReleaseKubernetesBuild = newPingResponse("5.1.8") 32 32 50: latestReleaseDockerComposeOrPureDocker = newPingResponse("5.1.8") 33 33 hidden 19 more line matches 34 34 35 - github.com/sourcegraph/sourcegraph/doc/admin/deploy/docker-single-container/index.md 35 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/admin/deploy/docker-single-container/index.md 36 36 1:# Docker Single Container Deployment 37 37 294:### Insiders build 38 38 238:### File system performance on Docker for Mac
+1 -1
internal/e2e/testdata/test_server.txt
··· 26 26 2925:type serverHandler struct { 27 27 hidden 180 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/cmd/gitserver/server/server.go 29 + github.com/sourcegraph/sourcegraph-public-snapshot/cmd/gitserver/server/server.go 30 30 132:type Server struct { 31 31 2:package server 32 32 741:func (s *Server) serverContext() (context.Context, context.CancelFunc) {
+2 -2
internal/e2e/testdata/time_compare.txt
··· 8 8 271:func (t Time) Compare(u Time) int { 9 9 hidden 250 more line matches 10 10 11 - github.com/sourcegraph/sourcegraph/internal/api/api.go 11 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/api/api.go 12 12 127:func (r ExternalRepoSpec) Compare(s ExternalRepoSpec) int { 13 13 7: "time" 14 14 170: CreatedAt time.Time // the date when this settings value was created 15 15 16 - github.com/sourcegraph/sourcegraph/client/shared/src/codeintel/scip.ts 16 + github.com/sourcegraph/sourcegraph-public-snapshot/client/shared/src/codeintel/scip.ts 17 17 117: public compare(other: Range): number { 18 18 53: return this.compare(other) < 0 19 19 56: return this.compare(other) <= 0
+3 -3
internal/e2e/testdata/zoekt_searcher.txt
··· 14 14 37:func (s *Searcher) Search(ctx context.Context, args *SearchArgs, reply *SearchReply) error { 15 15 hidden 9 more line matches 16 16 17 - github.com/sourcegraph/sourcegraph/doc/admin/observability/dashboards.md 17 + github.com/sourcegraph/sourcegraph-public-snapshot/doc/admin/observability/dashboards.md 18 18 16264:## Searcher 19 19 19728:## Zoekt 20 20 16371:### Searcher: Cache store 21 21 hidden 713 more line matches 22 22 23 - github.com/sourcegraph/sourcegraph/monitoring/definitions/searcher.go 23 + github.com/sourcegraph/sourcegraph-public-snapshot/monitoring/definitions/searcher.go 24 24 12:func Searcher() *monitoring.Dashboard { 25 25 14: containerName = "searcher" 26 26 15: grpcServiceName = "searcher.v1.SearcherService" 27 27 hidden 31 more line matches 28 28 29 - github.com/sourcegraph/sourcegraph/internal/search/job/job.go 29 + github.com/sourcegraph/sourcegraph-public-snapshot/internal/search/job/job.go 30 30 73: Zoekt zoekt.Streamer 31 31 74: SearcherURLs *endpoint.Map 32 32 75: SearcherGRPCConnectionCache *defaults.ConnectionCache