Skip to content

Commit

Permalink
Revert "Add Vald standard internal/sync package (#2153)"
Browse files Browse the repository at this point in the history
This reverts commit 5689309.
  • Loading branch information
ykadowak committed Nov 30, 2023
1 parent 84109b8 commit 31cee29
Show file tree
Hide file tree
Showing 222 changed files with 1,643 additions and 5,112 deletions.
14 changes: 0 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ linters:
- path: internal/test/comparator/standard\.go
linters:
- depguard
- path: internal/sync/alias\.go
linters:
- depguard
- path: hack/benchmark/src/singleflight/singleflight_bench_test\.go
linters:
- depguard
linters-settings:
gocritic:
enabled-checks:
Expand All @@ -175,14 +169,6 @@ linters-settings:
rules:
main:
deny:
- pkg: "sync"
desc: "sync is allowed only by internal/sync"
- pkg: "golang.org/x/sync"
desc: "golang.org/x/sync is allowed only by internal/sync"
- pkg: "golang.org/x/sync/singleflight"
desc: "golang.org/x/sync/singleflight is allowed only by internal/sync/singleflight"
- pkg: "golang.org/x/sync/semaphore"
desc: "golang.org/x/sync/semaphore is allowed only by internal/sync/semaphore"
- pkg: "errors"
desc: "errors is allowed only by internal/errors"
- pkg: "k8s.io/apimachinery/pkg/api/errors"
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4750,7 +4750,7 @@
- :white_check_mark: add internal/config/ngt test ([#554](https://github.com/vdaas/vald/pull/554))
- :white_check_mark: internal/cache/cacher test ([#553](https://github.com/vdaas/vald/pull/553))
- :white_check_mark: Add test case for `internal/file` ([#550](https://github.com/vdaas/vald/pull/550))
- :white_check_mark: add internal/sync/singleflight test ([#542](https://github.com/vdaas/vald/pull/542))
- :white_check_mark: add internal/singleflight test ([#542](https://github.com/vdaas/vald/pull/542))
- not to force rebuild gotests ([#548](https://github.com/vdaas/vald/pull/548))
- :pencil: Add use case document ([#482](https://github.com/vdaas/vald/pull/482))
- :white_check_mark: add internal/log/mock/retry test ([#549](https://github.com/vdaas/vald/pull/549))
Expand Down Expand Up @@ -5272,7 +5272,7 @@
- internal gRPC client for Vald
- Cassandra NewConvictionPolicy
- dicoverer now returns clone object
- new internal/sync/singleflight package
- new internal/singleflight package
- new internal/net package
- coding guideline

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
ORG ?= vdaas
NAME = vald
GOPKG = github.com/$(ORG)/$(NAME)
GOPRIVATE = $(GOPKG),$(GOPKG)/apis,$(GOPKG)-client-go
DATETIME = $(eval DATETIME := $(shell date -u +%Y/%m/%d_%H:%M:%S%z))$(DATETIME)
TAG ?= latest
CRORG ?= $(ORG)
Expand All @@ -38,8 +39,7 @@ VERSION ?= $(eval VERSION := $(shell cat versions/VALD_VERSION))$(VERSION)
NGT_VERSION := $(eval NGT_VERSION := $(shell cat versions/NGT_VERSION))$(NGT_VERSION)
NGT_REPO = github.com/yahoojapan/NGT

GOPRIVATE = $(GOPKG),$(GOPKG)/apis,$(GOPKG)-client-go
GOPROXY = "https://proxy.golang.org,direct"
GOPROXY=direct
GOPATH := $(eval GOPATH := $(shell go env GOPATH))$(GOPATH)
GO_VERSION := $(eval GO_VERSION := $(shell cat versions/GO_VERSION))$(GO_VERSION)
GOARCH := $(eval GOARCH := $(shell go env GOARCH))$(GOARCH)
Expand Down Expand Up @@ -361,7 +361,7 @@ clean:
license:
GOPRIVATE=$(GOPRIVATE) \
MAINTAINER=$(MAINTAINER) \
go run -mod=readonly hack/license/gen/main.go $(ROOTDIR)
go run -mod=readonly hack/license/gen/main.go ./

.PHONY: init
## initialize development environment
Expand Down
2 changes: 1 addition & 1 deletion Makefile.d/dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ update/chaos-mesh:
.PHONY: update/go
## update go version
update/go:
curl --silent https://go.dev/VERSION?m=text | head -n 1 | sed -e 's/go//g' > $(ROOTDIR)/versions/GO_VERSION
curl --silent https://go.dev/VERSION?m=text | sed -e 's/go//g' > $(ROOTDIR)/versions/GO_VERSION

.PHONY: update/golangci-lint
## update golangci-lint version
Expand Down
1 change: 0 additions & 1 deletion Makefile.d/proto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ $(PBGOS): \
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%google.golang.org/grpc/codes%github.com/vdaas/vald/internal/net/grpc/codes%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%google.golang.org/grpc/status%github.com/vdaas/vald/internal/net/grpc/status%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%\"io\"%\"github.com/vdaas/vald/internal/io\"%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%\"sync\"%\"github.com/vdaas/vald/internal/sync\"%g"

$(SWAGGERS): \
$(PROTOS) \
Expand Down
2 changes: 1 addition & 1 deletion Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ gotests/patch:
@$(call green, "apply patches to go test files...")
find $(ROOTDIR)/internal/k8s/* -name '*_test.go' | xargs sed -i -E "s%k8s.io/apimachinery/pkg/api/errors%github.com/vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%cockroachdb/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%golang.org/x/sync/errgroup%github.com/vdaas/vald/internal/sync/errgroup%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%golang.org/x/sync/errgroup%github.com/vdaas/vald/internal/errgroup%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%pkg/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%go-errors/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%go.uber.org/goleak%github.com/vdaas/vald/internal/test/goleak%g"
Expand Down
Loading

0 comments on commit 31cee29

Please sign in to comment.