Skip to content

Commit 688b40d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into issue52207
2 parents 6758bd7 + c9a250a commit 688b40d

File tree

455 files changed

+2235
-1445
lines changed

Some content is hidden

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

455 files changed

+2235
-1445
lines changed

.github/licenserc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,13 @@ header:
5454
- "pkg/disttask/**/mock/**/*_mock.go"
5555
- "pkg/util/sqlexec/mock/*_mock.go"
5656
- "pkg/extension/enterprise/"
57+
- "lightning/pkg/web/res_vfsdata.go"
58+
- "lightning/web/docs/api.yaml"
59+
- "lightning/web/public/index.html"
60+
- "lightning/web/webpack.config.js"
61+
- "pkg/lightning/checkpoints/checkpointspb/file_checkpoints.pb.go"
62+
- "pkg/lightning/manual/manual.go"
63+
- "pkg/lightning/manual/manual_nocgo.go"
64+
- "pkg/lightning/mydump/bytes.go"
65+
- "pkg/lightning/mydump/examples/metadata"
5766
comment: on-failure

Makefile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ errdoc:tools/bin/errdoc-gen
6464
lint:tools/bin/revive
6565
@echo "linting"
6666
@tools/bin/revive -formatter friendly -config tools/check/revive.toml $(FILES_TIDB_TESTS)
67-
@tools/bin/revive -formatter friendly -config tools/check/revive.toml ./br/pkg/lightning/...
67+
@tools/bin/revive -formatter friendly -config tools/check/revive.toml ./lightning/...
6868
go run tools/dashboard-linter/main.go pkg/metrics/grafana/overview.json
6969
go run tools/dashboard-linter/main.go pkg/metrics/grafana/performance_overview.json
7070
go run tools/dashboard-linter/main.go pkg/metrics/grafana/tidb.json
@@ -314,20 +314,20 @@ bench-daily:
314314

315315
build_tools: build_br build_lightning build_lightning-ctl
316316

317-
br_web:
318-
@cd br/web && npm install && npm run build
317+
lightning_web:
318+
@cd lightning/web && npm install && npm run build
319319

320320
build_br:
321321
CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(BR_BIN) ./br/cmd/br
322322

323323
build_lightning_for_web:
324-
CGO_ENABLED=1 $(GOBUILD) -tags dev $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) br/cmd/tidb-lightning/main.go
324+
CGO_ENABLED=1 $(GOBUILD) -tags dev $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) lightning/cmd/tidb-lightning/main.go
325325

326326
build_lightning:
327-
CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) ./br/cmd/tidb-lightning
327+
CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) ./lightning/cmd/tidb-lightning
328328

329329
build_lightning-ctl:
330-
CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_CTL_BIN) ./br/cmd/tidb-lightning-ctl
330+
CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_CTL_BIN) ./lightning/cmd/tidb-lightning-ctl
331331

332332
build_for_br_integration_test:
333333
@make failpoint-enable
@@ -336,13 +336,13 @@ build_for_br_integration_test:
336336
-o $(BR_BIN).test \
337337
github.com/pingcap/tidb/br/cmd/br && \
338338
$(GOTEST) -c -cover -covermode=count \
339-
-coverpkg=github.com/pingcap/tidb/br/... \
339+
-coverpkg=github.com/pingcap/tidb/lightning/...,github.com/pingcap/tidb/pkg/lightning/... \
340340
-o $(LIGHTNING_BIN).test \
341-
github.com/pingcap/tidb/br/cmd/tidb-lightning && \
341+
github.com/pingcap/tidb/lightning/cmd/tidb-lightning && \
342342
$(GOTEST) -c -cover -covermode=count \
343-
-coverpkg=github.com/pingcap/tidb/br/... \
343+
-coverpkg=github.com/pingcap/tidb/lightning/...,github.com/pingcap/tidb/pkg/lightning/... \
344344
-o $(LIGHTNING_CTL_BIN).test \
345-
github.com/pingcap/tidb/br/cmd/tidb-lightning-ctl && \
345+
github.com/pingcap/tidb/lightning/cmd/tidb-lightning-ctl && \
346346
$(GOBUILD) $(RACE_FLAG) -o bin/locker br/tests/br_key_locked/*.go && \
347347
$(GOBUILD) $(RACE_FLAG) -o bin/gc br/tests/br_z_gc_safepoint/*.go && \
348348
$(GOBUILD) $(RACE_FLAG) -o bin/oauth br/tests/br_gcs/*.go && \
@@ -384,9 +384,9 @@ mock_s3iface: mockgen
384384

385385
# mock interface for lightning and IMPORT INTO
386386
mock_lightning: mockgen
387-
tools/bin/mockgen -package mock github.com/pingcap/tidb/br/pkg/lightning/backend Backend,EngineWriter,TargetInfoGetter,ChunkFlushStatus > br/pkg/mock/backend.go
388-
tools/bin/mockgen -package mock github.com/pingcap/tidb/br/pkg/lightning/backend/encode Encoder,EncodingBuilder,Rows,Row > br/pkg/mock/encode.go
389-
tools/bin/mockgen -package mocklocal github.com/pingcap/tidb/br/pkg/lightning/backend/local DiskUsage,TiKVModeSwitcher,StoreHelper > br/pkg/mock/mocklocal/local.go
387+
tools/bin/mockgen -package mock github.com/pingcap/tidb/pkg/lightning/backend Backend,EngineWriter,TargetInfoGetter,ChunkFlushStatus > br/pkg/mock/backend.go
388+
tools/bin/mockgen -package mock github.com/pingcap/tidb/pkg/lightning/backend/encode Encoder,EncodingBuilder,Rows,Row > br/pkg/mock/encode.go
389+
tools/bin/mockgen -package mocklocal github.com/pingcap/tidb/pkg/lightning/backend/local DiskUsage,TiKVModeSwitcher,StoreHelper > br/pkg/mock/mocklocal/local.go
390390
tools/bin/mockgen -package mock github.com/pingcap/tidb/br/pkg/utils TaskRegister > br/pkg/mock/task_register.go
391391

392392
gen_mock: mockgen
@@ -426,9 +426,9 @@ br_bins:
426426
@echo '// Code generated by ragel DO NOT EDIT.' | cat - tmp_parser.go | sed 's|//line |//.... |g' > $@
427427
@rm tmp_parser.go
428428

429-
data_parsers: tools/bin/vfsgendev br/pkg/lightning/mydump/parser_generated.go br_web
430-
PATH="$(GOPATH)/bin":"$(PATH)":"$(TOOLS)" protoc -I. -I"$(GOPATH)/src" br/pkg/lightning/checkpoints/checkpointspb/file_checkpoints.proto --gogofaster_out=.
431-
tools/bin/vfsgendev -source='"github.com/pingcap/tidb/br/pkg/lightning/web".Res' && mv res_vfsdata.go br/pkg/lightning/web/
429+
data_parsers: tools/bin/vfsgendev pkg/lightning/mydump/parser_generated.go lightning_web
430+
PATH="$(GOPATH)/bin":"$(PATH)":"$(TOOLS)" protoc -I. -I"$(GOPATH)/src" pkg/lightning/checkpoints/checkpointspb/file_checkpoints.proto --gogofaster_out=.
431+
tools/bin/vfsgendev -source='"github.com/pingcap/tidb/lightning/pkg/web".Res' && mv res_vfsdata.go lightning/pkg/web/
432432

433433
build_dumpling:
434434
$(DUMPLING_GOBUILD) $(RACE_FLAG) -tags codes -o $(DUMPLING_BIN) dumpling/cmd/dumpling/main.go

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ go_download_sdk(
6464
"https://mirrors.aliyun.com/golang/{}",
6565
"https://dl.google.com/go/{}",
6666
],
67-
version = "1.21.6",
67+
version = "1.21.8",
6868
)
6969

7070
go_register_toolchains(

br/pkg/lightning/backend/kv/types.go

Lines changed: 0 additions & 3 deletions
This file was deleted.

br/pkg/logutil/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ go_library(
1010
importpath = "github.com/pingcap/tidb/br/pkg/logutil",
1111
visibility = ["//visibility:public"],
1212
deps = [
13-
"//br/pkg/lightning/metric",
1413
"//pkg/kv",
14+
"//pkg/lightning/metric",
1515
"//pkg/util/redact",
1616
"@com_github_google_uuid//:uuid",
1717
"@com_github_pingcap_errors//:errors",

br/pkg/logutil/rate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/pingcap/log"
10-
"github.com/pingcap/tidb/br/pkg/lightning/metric"
10+
"github.com/pingcap/tidb/pkg/lightning/metric"
1111
"github.com/prometheus/client_golang/prometheus"
1212
"go.uber.org/zap"
1313
)

br/pkg/mock/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ go_library(
1313
importpath = "github.com/pingcap/tidb/br/pkg/mock",
1414
visibility = ["//visibility:public"],
1515
deps = [
16-
"//br/pkg/lightning/backend",
17-
"//br/pkg/lightning/backend/encode",
18-
"//br/pkg/lightning/verification",
1916
"//pkg/config",
2017
"//pkg/domain",
2118
"//pkg/kv",
19+
"//pkg/lightning/backend",
20+
"//pkg/lightning/backend/encode",
21+
"//pkg/lightning/verification",
2222
"//pkg/parser/model",
2323
"//pkg/server",
2424
"//pkg/session",

br/pkg/mock/backend.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

br/pkg/mock/encode.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

br/pkg/mock/mocklocal/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ go_library(
66
importpath = "github.com/pingcap/tidb/br/pkg/mock/mocklocal",
77
visibility = ["//visibility:public"],
88
deps = [
9-
"//br/pkg/lightning/backend",
9+
"//pkg/lightning/backend",
1010
"@com_github_pingcap_kvproto//pkg/import_sstpb",
1111
"@com_github_tikv_client_go_v2//tikv",
1212
"@org_uber_go_mock//gomock",

0 commit comments

Comments
 (0)