Skip to content

Commit 5d75f87

Browse files
authored
feat: support backup/restore on operator v2 (#6080)
1 parent 986fd4b commit 5d75f87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+54218
-93
lines changed

.golangci.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ linters-settings:
2626
- FIXME
2727
gofmt:
2828
rewrite-rules:
29-
- pattern: 'interface{}'
30-
replacement: 'any'
29+
- pattern: "interface{}"
30+
replacement: "any"
3131
goimports:
3232
local-prefixes: github.com/pingcap/tidb-operator
3333
mnd:
@@ -38,10 +38,11 @@ linters-settings:
3838
- condition
3939
- return
4040
ignored-numbers:
41-
- '0'
42-
- '1'
43-
- '2'
44-
- '3'
41+
- "0"
42+
- "1"
43+
- "2"
44+
- "3"
45+
- "4"
4546
ignored-functions:
4647
- strings.SplitN
4748
ignored-files:
@@ -52,7 +53,7 @@ linters-settings:
5253
govet:
5354
enable:
5455
- nilness
55-
- shadow
56+
# - shadow # TODO(ideascf): recover it
5657
errorlint:
5758
asserts: false
5859
lll:
@@ -63,15 +64,17 @@ linters-settings:
6364
- "importas" # linter name
6465
nolintlint:
6566
allow-unused: false # report any unused nolint directives
66-
require-explanation: true # require an explanation for nolint directives
67-
require-specific: true # require nolint directives to be specific about which linter is being skipped
67+
# TODO(ideascf): recover the following two rules
68+
# require-explanation: true # require an explanation for nolint directives
69+
# require-specific: true # require nolint directives to be specific about which linter is being skipped
6870
revive:
6971
rules:
70-
- name: indent-error-flow
7172
- name: unexported-return
7273
disabled: true
73-
- name: unused-parameter
74-
- name: unused-receiver
74+
# TODO(ideascf): recover the following three rules
75+
# - name: indent-error-flow
76+
# - name: unused-parameter
77+
# - name: unused-receiver
7578

7679
linters:
7780
disable-all: true
@@ -84,7 +87,7 @@ linters:
8487
- gocheckcompilerdirectives
8588
- goconst
8689
# - gochecknoinits
87-
- gocritic
90+
# - gocritic // TODO(ideascf): recover it
8891
- gocyclo
8992
- godox
9093
- gofmt
@@ -95,17 +98,17 @@ linters:
9598
- gosimple
9699
- govet
97100
- ineffassign
98-
- lll
101+
# - lll # TODO(ideascf): recover it
99102
- misspell
100103
- nakedret
101104
- noctx
102-
- nolintlint
105+
# - nolintlint # TODO(ideascf): recover it
103106
- revive
104-
- stylecheck
107+
# - stylecheck # TODO(ideascf): recover it
105108
- staticcheck
106109
- testifylint
107110
- unconvert
108-
- unparam
111+
# - unparam # TODO(ideascf): recover it
109112
- unused
110113
- whitespace
111114

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ KIND_VERSION ?= v0.24.0
2727
# TODO: use kubectl in _output
2828
KUBECTL = kubectl -n tidb-admin --context kind-tidb-operator
2929

30-
ALL_CMD = operator prestop-checker testing-workload
30+
ALL_CMD = operator prestop-checker testing-workload backup-manager
3131
.PHONY: build
3232
build: $(addprefix build/,$(ALL_CMD))
3333
build/%:
@@ -117,6 +117,10 @@ verify/%:
117117
lint: bin/golangci-lint
118118
$(GOLANGCI_LINT) run ./...
119119

120+
.PHONY: lint-fix
121+
lint-fix: bin/golangci-lint
122+
$(GOLANGCI_LINT) run ./... --fix
123+
120124
.PHONY: unit
121125
unit:
122126
go test $$(go list -e ./... | grep -v cmd | grep -v tools | grep -v tests | grep -v third_party) \

0 commit comments

Comments
 (0)