mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:31:48 +00:00
Embeddings: move out of enterprise (#54621)
This moves `enterprise/internal/embeddings` to `internal/embeddings` to simplify organization after the license changes
This commit is contained in:
parent
6e57b82f0a
commit
d808af7961
2
enterprise/cmd/embeddings/qa/BUILD.bazel
generated
2
enterprise/cmd/embeddings/qa/BUILD.bazel
generated
@ -7,8 +7,8 @@ go_library(
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/cmd/embeddings/qa",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings",
|
||||
"//internal/api",
|
||||
"//internal/embeddings",
|
||||
"//lib/errors",
|
||||
],
|
||||
)
|
||||
|
||||
@ -6,8 +6,8 @@ go_library(
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/cmd/embeddings/qa/embed_queries",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/embed",
|
||||
"//internal/conf",
|
||||
"//internal/embeddings/embed",
|
||||
"//internal/jsonc",
|
||||
"//lib/errors",
|
||||
"//schema",
|
||||
|
||||
@ -24,8 +24,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/jsonc"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
"github.com/sourcegraph/sourcegraph/schema"
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
10
enterprise/cmd/embeddings/shared/BUILD.bazel
generated
10
enterprise/cmd/embeddings/shared/BUILD.bazel
generated
@ -20,9 +20,6 @@ go_library(
|
||||
"//enterprise/internal/authz",
|
||||
"//enterprise/internal/authz/subrepoperms",
|
||||
"//enterprise/internal/database",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//enterprise/internal/embeddings/embed",
|
||||
"//internal/actor",
|
||||
"//internal/api",
|
||||
"//internal/authz",
|
||||
@ -31,6 +28,9 @@ go_library(
|
||||
"//internal/database",
|
||||
"//internal/database/connections/live",
|
||||
"//internal/debugserver",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/embeddings/embed",
|
||||
"//internal/env",
|
||||
"//internal/errcode",
|
||||
"//internal/featureflag",
|
||||
@ -89,10 +89,10 @@ go_test(
|
||||
], # keep
|
||||
deps = [
|
||||
"//enterprise/cmd/embeddings/qa",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/api",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/endpoint",
|
||||
"//internal/types",
|
||||
"//internal/uploadstore/mocks",
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
|
||||
emb "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
emb "github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/env"
|
||||
)
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/cmd/embeddings/qa"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
uploadstoremocks "github.com/sourcegraph/sourcegraph/internal/uploadstore/mocks"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -11,20 +11,20 @@ import (
|
||||
"github.com/sourcegraph/log"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/globals"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
|
||||
eiauthz "github.com/sourcegraph/sourcegraph/enterprise/internal/authz"
|
||||
srp "github.com/sourcegraph/sourcegraph/enterprise/internal/authz/subrepoperms"
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
connections "github.com/sourcegraph/sourcegraph/internal/database/connections/live"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/errcode"
|
||||
"github.com/sourcegraph/sourcegraph/internal/featureflag"
|
||||
"github.com/sourcegraph/sourcegraph/internal/goroutine"
|
||||
|
||||
@ -9,8 +9,8 @@ import (
|
||||
"github.com/sourcegraph/log/logtest"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/endpoint"
|
||||
)
|
||||
|
||||
|
||||
@ -13,10 +13,10 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/trace"
|
||||
)
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/types"
|
||||
)
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/trace"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"github.com/weaviate/weaviate-go-client/v4/weaviate/graphql"
|
||||
"github.com/weaviate/weaviate/entities/models"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/featureflag"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -13,13 +13,13 @@ go_library(
|
||||
"//cmd/frontend/backend",
|
||||
"//cmd/frontend/envvar",
|
||||
"//cmd/frontend/graphqlbackend",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/api",
|
||||
"//internal/api/internalapi",
|
||||
"//internal/auth",
|
||||
"//internal/conf",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/extsvc",
|
||||
"//internal/gitserver",
|
||||
"//internal/httpcli",
|
||||
@ -40,7 +40,7 @@ go_test(
|
||||
srcs = ["progress_test.go"],
|
||||
embed = [":resolvers"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//lib/pointers",
|
||||
],
|
||||
)
|
||||
|
||||
@ -19,13 +19,13 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/backend"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/envvar"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api/internalapi"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/httpcli"
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
"math"
|
||||
"sync"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/types"
|
||||
"github.com/sourcegraph/sourcegraph/lib/pointers"
|
||||
)
|
||||
|
||||
@ -3,7 +3,7 @@ package resolvers
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/lib/pointers"
|
||||
)
|
||||
|
||||
|
||||
@ -10,10 +10,10 @@ go_library(
|
||||
"//enterprise/cmd/frontend/internal/context/resolvers",
|
||||
"//enterprise/internal/codycontext:context",
|
||||
"//enterprise/internal/database",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//internal/codeintel",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/observation",
|
||||
"//internal/search/client",
|
||||
],
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/context/resolvers"
|
||||
codycontext "github.com/sourcegraph/sourcegraph/enterprise/internal/codycontext"
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/codeintel"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
"github.com/sourcegraph/sourcegraph/internal/search/client"
|
||||
)
|
||||
|
||||
@ -31,13 +31,13 @@ go_test(
|
||||
"//cmd/frontend/graphqlbackend",
|
||||
"//enterprise/internal/codycontext:context",
|
||||
"//enterprise/internal/database",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//internal/actor",
|
||||
"//internal/api",
|
||||
"//internal/authz",
|
||||
"//internal/conf",
|
||||
"//internal/database",
|
||||
"//internal/database/dbtest",
|
||||
"//internal/embeddings",
|
||||
"//internal/featureflag",
|
||||
"//internal/gitserver",
|
||||
"//internal/observation",
|
||||
|
||||
@ -13,13 +13,13 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend"
|
||||
codycontext "github.com/sourcegraph/sourcegraph/enterprise/internal/codycontext"
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/featureflag"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
|
||||
@ -8,11 +8,11 @@ go_library(
|
||||
deps = [
|
||||
"//cmd/frontend/enterprise",
|
||||
"//enterprise/cmd/frontend/internal/embeddings/resolvers",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/codeintel",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/gitserver",
|
||||
"//internal/observation",
|
||||
],
|
||||
|
||||
@ -5,11 +5,11 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/enterprise"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/embeddings/resolvers"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/codeintel"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
)
|
||||
|
||||
@ -14,13 +14,13 @@ go_library(
|
||||
"//cmd/frontend/graphqlbackend",
|
||||
"//cmd/frontend/graphqlbackend/graphqlutil",
|
||||
"//enterprise/internal/cody",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/api",
|
||||
"//internal/auth",
|
||||
"//internal/authz",
|
||||
"//internal/conf",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/errcode",
|
||||
"//internal/gitserver",
|
||||
"//internal/gqlutil",
|
||||
@ -38,14 +38,14 @@ go_test(
|
||||
embed = [":resolvers"],
|
||||
deps = [
|
||||
"//cmd/frontend/graphqlbackend",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//enterprise/internal/licensing",
|
||||
"//internal/actor",
|
||||
"//internal/api",
|
||||
"//internal/authz",
|
||||
"//internal/conf",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/featureflag",
|
||||
"//internal/gitserver",
|
||||
"//internal/types",
|
||||
|
||||
@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/graphqlutil"
|
||||
repobg "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
repobg "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/errcode"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gqlutil"
|
||||
|
||||
@ -15,13 +15,13 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/graphqlutil"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/cody"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
repobg "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
repobg "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
)
|
||||
|
||||
|
||||
@ -10,14 +10,14 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/licensing"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/featureflag"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/types"
|
||||
|
||||
@ -18,9 +18,6 @@ go_library(
|
||||
"//cmd/worker/shared/init/db",
|
||||
"//enterprise/cmd/worker/shared/init/codeintel",
|
||||
"//enterprise/internal/database",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//enterprise/internal/embeddings/embed",
|
||||
"//internal/actor",
|
||||
"//internal/api",
|
||||
"//internal/api/internalapi",
|
||||
@ -29,6 +26,9 @@ go_library(
|
||||
"//internal/conf",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/database",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/embeddings/embed",
|
||||
"//internal/env",
|
||||
"//internal/featureflag",
|
||||
"//internal/gitserver",
|
||||
@ -51,10 +51,10 @@ go_test(
|
||||
srcs = ["handler_test.go"],
|
||||
embed = [":repo"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/embed",
|
||||
"//internal/api",
|
||||
"//internal/authz",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/embeddings/embed",
|
||||
"//internal/gitserver",
|
||||
"@com_github_google_go_cmp//cmp",
|
||||
],
|
||||
|
||||
@ -7,14 +7,14 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/searcher/diff"
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
bgrepo "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
codeintelContext "github.com/sourcegraph/sourcegraph/internal/codeintel/context"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
bgrepo "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/featureflag"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/paths"
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/job"
|
||||
workerdb "github.com/sourcegraph/sourcegraph/cmd/worker/shared/init/db"
|
||||
repoembeddingsbg "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
repoembeddingsbg "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/env"
|
||||
"github.com/sourcegraph/sourcegraph/internal/goroutine"
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
|
||||
@ -6,10 +6,10 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/job"
|
||||
workerdb "github.com/sourcegraph/sourcegraph/cmd/worker/shared/init/db"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/env"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/goroutine"
|
||||
|
||||
@ -8,10 +8,10 @@ import (
|
||||
workerdb "github.com/sourcegraph/sourcegraph/cmd/worker/shared/init/db"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/cmd/worker/shared/init/codeintel"
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
repoembeddingsbg "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
repoembeddingsbg "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/env"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/goroutine"
|
||||
|
||||
4
enterprise/internal/codycontext/BUILD.bazel
generated
4
enterprise/internal/codycontext/BUILD.bazel
generated
@ -7,9 +7,9 @@ go_library(
|
||||
visibility = ["//enterprise:__subpackages__"],
|
||||
deps = [
|
||||
"//enterprise/internal/database",
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/embed",
|
||||
"//internal/api",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/embed",
|
||||
"//internal/metrics",
|
||||
"//internal/observation",
|
||||
"//internal/search",
|
||||
|
||||
@ -14,9 +14,9 @@ import (
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
edb "github.com/sourcegraph/sourcegraph/enterprise/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed"
|
||||
"github.com/sourcegraph/sourcegraph/internal/metrics"
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
"github.com/sourcegraph/sourcegraph/internal/search"
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "client",
|
||||
srcs = ["client.go"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client",
|
||||
visibility = ["//enterprise:__subpackages__"],
|
||||
)
|
||||
@ -142,8 +142,8 @@ func TestExternalServicesStore_ValidateConfig(t *testing.T) {
|
||||
wantErr: "<nil>",
|
||||
},
|
||||
{
|
||||
name: "1 error - Bitbucket.org",
|
||||
kind: extsvc.KindBitbucketCloud,
|
||||
name: "1 error - Bitbucket.org",
|
||||
kind: extsvc.KindBitbucketCloud,
|
||||
// Invalid UUID, using + instead of -
|
||||
config: `{"url": "https://bitbucket.org", "username": "ceo", "appPassword": "abc", "exclude": [{"uuid":"{fceb73c7+cef6-4abe-956d-e471281126bd}"}]}`,
|
||||
wantErr: `exclude.0.uuid: Does not match pattern '^\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}$'`,
|
||||
|
||||
@ -20,15 +20,15 @@ go_library(
|
||||
"types.go",
|
||||
"uploadstore.go",
|
||||
],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings",
|
||||
visibility = ["//enterprise:__subpackages__"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/embeddings",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/api",
|
||||
"//internal/codeintel/types",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/conf/deploy",
|
||||
"//internal/database",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/endpoint",
|
||||
"//internal/env",
|
||||
"//internal/gitserver",
|
||||
@ -70,11 +70,11 @@ go_test(
|
||||
"requires-network",
|
||||
],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//internal/api",
|
||||
"//internal/codeintel/types",
|
||||
"//internal/database",
|
||||
"//internal/database/dbtest",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/gitserver",
|
||||
"//internal/types",
|
||||
"//internal/uploadstore",
|
||||
@ -8,7 +8,7 @@ go_library(
|
||||
"store.go",
|
||||
"types.go",
|
||||
],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo",
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//internal/api",
|
||||
@ -17,7 +17,7 @@ import (
|
||||
|
||||
// MockRepoEmbeddingJobsStore is a mock implementation of the
|
||||
// RepoEmbeddingJobsStore interface (from the package
|
||||
// github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo)
|
||||
// github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo)
|
||||
// used for unit testing.
|
||||
type MockRepoEmbeddingJobsStore struct {
|
||||
// CancelRepoEmbeddingJobFunc is an instance of a mock function object
|
||||
@ -8,19 +8,19 @@ go_library(
|
||||
"files.go",
|
||||
"iface.go",
|
||||
],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed",
|
||||
visibility = ["//enterprise:__subpackages__"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/embeddings/embed",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings",
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//enterprise/internal/embeddings/embed/client",
|
||||
"//enterprise/internal/embeddings/embed/client/openai",
|
||||
"//enterprise/internal/embeddings/embed/client/sourcegraph",
|
||||
"//internal/api",
|
||||
"//internal/binary",
|
||||
"//internal/codeintel/context",
|
||||
"//internal/codeintel/types",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/embeddings",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/embeddings/embed/client",
|
||||
"//internal/embeddings/embed/client/openai",
|
||||
"//internal/embeddings/embed/client/sourcegraph",
|
||||
"//internal/httpcli",
|
||||
"//internal/paths",
|
||||
"//lib/errors",
|
||||
@ -38,11 +38,11 @@ go_test(
|
||||
],
|
||||
embed = [":embed"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/background/repo",
|
||||
"//enterprise/internal/embeddings/embed/client",
|
||||
"//internal/api",
|
||||
"//internal/codeintel/context",
|
||||
"//internal/codeintel/types",
|
||||
"//internal/embeddings/background/repo",
|
||||
"//internal/embeddings/embed/client",
|
||||
"//lib/errors",
|
||||
"@com_github_sourcegraph_log//:log",
|
||||
"@com_github_stretchr_testify//require",
|
||||
8
internal/embeddings/embed/client/BUILD.bazel
generated
Normal file
8
internal/embeddings/embed/client/BUILD.bazel
generated
Normal file
@ -0,0 +1,8 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "client",
|
||||
srcs = ["client.go"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client",
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
||||
@ -4,8 +4,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "openai",
|
||||
srcs = ["client.go"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client/openai",
|
||||
visibility = ["//enterprise:__subpackages__"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client/openai",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//internal/conf/conftypes",
|
||||
"//lib/errors",
|
||||
@ -3,12 +3,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "sourcegraph",
|
||||
srcs = ["client.go"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client/sourcegraph",
|
||||
visibility = ["//enterprise:__subpackages__"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client/sourcegraph",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//enterprise/internal/embeddings/embed/client",
|
||||
"//internal/codygateway",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/embeddings/embed/client",
|
||||
"//internal/httpcli",
|
||||
"//lib/errors",
|
||||
],
|
||||
@ -12,9 +12,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client"
|
||||
"github.com/sourcegraph/sourcegraph/internal/codygateway"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client"
|
||||
"github.com/sourcegraph/sourcegraph/internal/httpcli"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
@ -5,15 +5,15 @@ import (
|
||||
|
||||
"github.com/sourcegraph/log"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings"
|
||||
bgrepo "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client/openai"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client/sourcegraph"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
codeintelContext "github.com/sourcegraph/sourcegraph/internal/codeintel/context"
|
||||
"github.com/sourcegraph/sourcegraph/internal/codeintel/types"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings"
|
||||
bgrepo "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client/openai"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client/sourcegraph"
|
||||
"github.com/sourcegraph/sourcegraph/internal/httpcli"
|
||||
"github.com/sourcegraph/sourcegraph/internal/paths"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
@ -8,11 +8,11 @@ import (
|
||||
"github.com/sourcegraph/log"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
bgrepo "github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed/client"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
codeintelContext "github.com/sourcegraph/sourcegraph/internal/codeintel/context"
|
||||
"github.com/sourcegraph/sourcegraph/internal/codeintel/types"
|
||||
bgrepo "github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/embed/client"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
@ -15,8 +15,8 @@ import (
|
||||
|
||||
// MockContextService is a mock implementation of the ContextService
|
||||
// interface (from the package
|
||||
// github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed)
|
||||
// used for unit testing.
|
||||
// github.com/sourcegraph/sourcegraph/internal/embeddings/embed) used for
|
||||
// unit testing.
|
||||
type MockContextService struct {
|
||||
// SplitIntoEmbeddableChunksFunc is an instance of a mock function
|
||||
// object controlling the behavior of the method
|
||||
@ -12,9 +12,8 @@ import (
|
||||
)
|
||||
|
||||
// MockClient is a mock implementation of the Client interface (from the
|
||||
// package
|
||||
// github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings) used
|
||||
// for unit testing.
|
||||
// package github.com/sourcegraph/sourcegraph/internal/embeddings) used for
|
||||
// unit testing.
|
||||
type MockClient struct {
|
||||
// IsContextRequiredForChatQueryFunc is an instance of a mock function
|
||||
// object controlling the behavior of the method
|
||||
@ -3,9 +3,9 @@ package embeddings
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"github.com/sourcegraph/log/logtest"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
|
||||
"github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo"
|
||||
"github.com/sourcegraph/sourcegraph/internal/gitserver"
|
||||
"github.com/sourcegraph/sourcegraph/internal/types"
|
||||
)
|
||||
@ -129,11 +129,11 @@
|
||||
path: github.com/sourcegraph/sourcegraph/enterprise/internal/github_apps/store
|
||||
interfaces:
|
||||
- GitHubAppsStore
|
||||
- filename: enterprise/internal/embeddings/mocks_temp.go
|
||||
path: github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings
|
||||
- filename: internal/embeddings/mocks_temp.go
|
||||
path: github.com/sourcegraph/sourcegraph/internal/embeddings
|
||||
interfaces:
|
||||
- Client
|
||||
- filename: enterprise/internal/embeddings/background/repo/mocks_temp.go
|
||||
path: github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/background/repo
|
||||
- filename: internal/embeddings/background/repo/mocks_temp.go
|
||||
path: github.com/sourcegraph/sourcegraph/internal/embeddings/background/repo
|
||||
interfaces:
|
||||
- RepoEmbeddingJobsStore
|
||||
|
||||
@ -388,8 +388,8 @@
|
||||
- path: github.com/Khan/genqlient/graphql
|
||||
interfaces:
|
||||
- Client
|
||||
- filename: enterprise/internal/embeddings/embed/mocks_test.go
|
||||
path: github.com/sourcegraph/sourcegraph/enterprise/internal/embeddings/embed
|
||||
- filename: internal/embeddings/embed/mocks_test.go
|
||||
path: github.com/sourcegraph/sourcegraph/internal/embeddings/embed
|
||||
interfaces:
|
||||
- ContextService
|
||||
- filename: internal/redispool/mocks.go
|
||||
|
||||
@ -271,7 +271,7 @@ commands:
|
||||
- lib
|
||||
- internal
|
||||
- enterprise/cmd/embeddings
|
||||
- enterprise/internal/embeddings
|
||||
- internal/embeddings
|
||||
worker:
|
||||
cmd: |
|
||||
export SOURCEGRAPH_LICENSE_GENERATION_KEY=$(cat ../dev-private/enterprise/dev/test-license-generation-key.pem)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user