Skip to content

Commit

Permalink
sqlproxyccl: remove unused denylist implementations
Browse files Browse the repository at this point in the history
The viper and mock denylist formats are no longer used as of #66137. I'm refactoring
the denylist for issue #65694. Removing the unused format simplifies the refactoring.

Release note: None
  • Loading branch information
jeffswenson committed Jun 11, 2021
1 parent 0a61eb7 commit fa77232
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 269 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ require (
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.1
github.com/twpayne/go-geom v1.3.7-0.20210228220813-9d9885b50d3e
github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
Expand Down
24 changes: 2 additions & 22 deletions pkg/ccl/sqlproxyccl/denylist/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@bazel_gomock//:gomock.bzl", "gomock")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

# gazelle:exclude service.go
Expand All @@ -12,32 +11,22 @@ go_library(

go_library(
name = "denylist",
srcs = [
"file.go",
"local_file.go",
":mocks_denylist", # keep
],
srcs = ["file.go"],
embed = [":service"], # keep
importpath = "github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl/denylist",
visibility = ["//visibility:public"],
deps = [
"//pkg/util",
"//pkg/util/log",
"//pkg/util/syncutil",
"//pkg/util/timeutil",
"@com_github_cockroachdb_errors//:errors",
"@com_github_golang_mock//gomock", # keep
"@com_github_spf13_viper//:viper",
"@in_gopkg_yaml_v2//:yaml_v2",
],
)

go_test(
name = "denylist_test",
srcs = [
"file_test.go",
"local_file_test.go",
],
srcs = ["file_test.go"],
embed = [":denylist"],
deps = [
"//pkg/util/leaktest",
Expand All @@ -46,12 +35,3 @@ go_test(
"@in_gopkg_yaml_v2//:yaml_v2",
],
)

gomock(
name = "mocks_denylist",
out = "mocks_generated.go",
interfaces = ["Service"],
library = ":service",
package = "denylist",
self_package = "github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl/denylist",
)
104 changes: 0 additions & 104 deletions pkg/ccl/sqlproxyccl/denylist/local_file.go

This file was deleted.

90 changes: 0 additions & 90 deletions pkg/ccl/sqlproxyccl/denylist/local_file_test.go

This file was deleted.

49 changes: 0 additions & 49 deletions pkg/ccl/sqlproxyccl/denylist/mocks_generated.go

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/ccl/sqlproxyccl/denylist/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ package denylist

import "strings"

//go:generate mockgen -package=denylist -destination=mocks_generated.go -source=service.go . Service

// Entry records the reason for putting an item on the denylist.
// TODO(spaskob): add codes for different denial reasons.
type Entry struct {
Expand Down
2 changes: 1 addition & 1 deletion vendor
Submodule vendor updated 1 files
+0 −1 modules.txt

0 comments on commit fa77232

Please sign in to comment.