mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 18:51:59 +00:00
Don't import soap package across cmds (#57304)
It lived in cmd/worker, meaning it should never be imported from any other command. I've moved it into internal instead, to break the cross-cmd dependency.
This commit is contained in:
parent
b5adf483e2
commit
21b99c7e0d
@ -243,7 +243,6 @@ go_library(
|
||||
"//cmd/frontend/hubspot/hubspotutil",
|
||||
"//cmd/frontend/internal/processrestart",
|
||||
"//cmd/frontend/internal/search/logs",
|
||||
"//cmd/worker/shared/sourcegraphoperator",
|
||||
"//internal/actor",
|
||||
"//internal/adminanalytics",
|
||||
"//internal/api",
|
||||
@ -324,6 +323,7 @@ go_library(
|
||||
"//internal/service/servegit",
|
||||
"//internal/settings",
|
||||
"//internal/siteid",
|
||||
"//internal/sourcegraphoperator",
|
||||
"//internal/src-prometheus",
|
||||
"//internal/suspiciousnames",
|
||||
"//internal/symbols",
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
"github.com/graph-gophers/graphql-go"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/graphqlbackend/graphqlutil"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/authz/permssync"
|
||||
@ -16,6 +15,7 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
gext "github.com/sourcegraph/sourcegraph/internal/extsvc/gerrit/externalaccount"
|
||||
"github.com/sourcegraph/sourcegraph/internal/repoupdater/protocol"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@ go_library(
|
||||
"//cmd/frontend/auth",
|
||||
"//cmd/frontend/external/session",
|
||||
"//cmd/frontend/internal/auth/openidconnect",
|
||||
"//cmd/worker/shared/sourcegraphoperator",
|
||||
"//internal/actor",
|
||||
"//internal/auth",
|
||||
"//internal/auth/providers",
|
||||
@ -24,6 +23,7 @@ go_library(
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/database",
|
||||
"//internal/extsvc",
|
||||
"//internal/sourcegraphoperator",
|
||||
"//lib/errors",
|
||||
"//schema",
|
||||
"@com_github_sourcegraph_log//:log",
|
||||
@ -47,7 +47,6 @@ go_test(
|
||||
"//cmd/frontend/auth",
|
||||
"//cmd/frontend/external/session",
|
||||
"//cmd/frontend/internal/auth/openidconnect",
|
||||
"//cmd/worker/shared/sourcegraphoperator",
|
||||
"//internal/actor",
|
||||
"//internal/auth",
|
||||
"//internal/auth/providers",
|
||||
@ -57,6 +56,7 @@ go_test(
|
||||
"//internal/database/dbmocks",
|
||||
"//internal/database/dbtest",
|
||||
"//internal/extsvc",
|
||||
"//internal/sourcegraphoperator",
|
||||
"//internal/types",
|
||||
"//lib/errors",
|
||||
"//schema",
|
||||
|
||||
@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth/providers"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ import (
|
||||
|
||||
"github.com/sourcegraph/log/logtest"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth/providers"
|
||||
@ -20,6 +19,7 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/dbmocks"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/types"
|
||||
)
|
||||
|
||||
|
||||
@ -6,12 +6,12 @@ import (
|
||||
"github.com/sourcegraph/log"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/internal/auth/openidconnect"
|
||||
osssourcegraphoperator "github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth/providers"
|
||||
"github.com/sourcegraph/sourcegraph/internal/cloud"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
)
|
||||
|
||||
// GetOIDCProvider looks up the registered Sourcegraph Operator authentication
|
||||
@ -49,7 +49,7 @@ func Init() {
|
||||
providers.Update(auth.SourcegraphOperatorProviderType, []providers.Provider{p})
|
||||
|
||||
// Register enterprise handler implementation in OSS
|
||||
osssourcegraphoperator.RegisterAddSourcegraphOperatorExternalAccountHandler(addSourcegraphOperatorExternalAccount)
|
||||
sourcegraphoperator.RegisterAddSourcegraphOperatorExternalAccountHandler(addSourcegraphOperatorExternalAccount)
|
||||
}
|
||||
|
||||
func validateConfig(c conftypes.SiteConfigQuerier) (problems conf.Problems) {
|
||||
|
||||
@ -11,11 +11,11 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/auth"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/external/session"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/frontend/internal/auth/openidconnect"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
internalauth "github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth/providers"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@ go_library(
|
||||
deps = [
|
||||
"//cmd/worker/job",
|
||||
"//cmd/worker/shared/init/db",
|
||||
"//cmd/worker/shared/sourcegraphoperator",
|
||||
"//internal/actor",
|
||||
"//internal/auth",
|
||||
"//internal/cloud",
|
||||
@ -18,6 +17,7 @@ go_library(
|
||||
"//internal/errcode",
|
||||
"//internal/goroutine",
|
||||
"//internal/observation",
|
||||
"//internal/sourcegraphoperator",
|
||||
"//lib/errors",
|
||||
"@com_github_keegancsmith_sqlf//:sqlf",
|
||||
],
|
||||
@ -33,12 +33,12 @@ go_test(
|
||||
"requires-network",
|
||||
],
|
||||
deps = [
|
||||
"//cmd/worker/shared/sourcegraphoperator",
|
||||
"//internal/auth",
|
||||
"//internal/cloud",
|
||||
"//internal/database",
|
||||
"//internal/database/dbtest",
|
||||
"//internal/extsvc",
|
||||
"//internal/sourcegraphoperator",
|
||||
"@com_github_sourcegraph_log//logtest",
|
||||
"@com_github_stretchr_testify//assert",
|
||||
"@com_github_stretchr_testify//require",
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/job"
|
||||
workerdb "github.com/sourcegraph/sourcegraph/cmd/worker/shared/init/db"
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/cloud"
|
||||
@ -17,6 +16,7 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/internal/errcode"
|
||||
"github.com/sourcegraph/sourcegraph/internal/goroutine"
|
||||
"github.com/sourcegraph/sourcegraph/internal/observation"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/lib/errors"
|
||||
)
|
||||
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/cloud"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
|
||||
"github.com/sourcegraph/sourcegraph/internal/extsvc"
|
||||
"github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator"
|
||||
)
|
||||
|
||||
func TestSourcegraphOperatorCleanHandler(t *testing.T) {
|
||||
|
||||
@ -6,8 +6,8 @@ go_library(
|
||||
"account.go",
|
||||
"associate.go",
|
||||
],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/cmd/worker/shared/sourcegraphoperator",
|
||||
visibility = ["//visibility:public"],
|
||||
importpath = "github.com/sourcegraph/sourcegraph/internal/sourcegraphoperator",
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//internal/auth",
|
||||
"//internal/auth/providers",
|
||||
Loading…
Reference in New Issue
Block a user