Skip to content

Commit

Permalink
Merge remote-tracking branch 'pingcap/master' into reorg-part-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss committed Nov 14, 2022
2 parents c9e47bd + bdcb850 commit 307d44d
Show file tree
Hide file tree
Showing 770 changed files with 38,220 additions and 17,680 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.1
5.3.2
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-br-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
check:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-compile-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
compile-windows:
if: github.event_name == 'push' || github.event_name == 'pull_request' && github.event.label.name == 'action/run-br-cross-platform-build'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-dumpling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
integration-test:
strategy:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
check:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to comment on pull-requests

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
129 changes: 105 additions & 24 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def go_deps():
sum = "h1:zeZSRqj5yCg28tCkIV/z/lWbwvNm5qnKVS15PI8nhD0=",
version = "v0.1.0",
)
go_repository(
name = "com_github_acarl005_stripansi",
build_file_proto_mode = "disable",
importpath = "github.com/acarl005/stripansi",
sum = "h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=",
version = "v0.0.0-20180116102854-5a71ef0e047d",
)

go_repository(
name = "com_github_ajg_form",
Expand Down Expand Up @@ -711,6 +718,21 @@ def go_deps():
sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
version = "v1.1.1",
)
go_repository(
name = "com_github_decred_dcrd_crypto_blake256",
build_file_proto_mode = "disable",
importpath = "github.com/decred/dcrd/crypto/blake256",
sum = "h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=",
version = "v1.0.0",
)
go_repository(
name = "com_github_decred_dcrd_dcrec_secp256k1_v4",
build_file_proto_mode = "disable",
importpath = "github.com/decred/dcrd/dcrec/secp256k1/v4",
sum = "h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4=",
version = "v4.1.0",
)

go_repository(
name = "com_github_denis_tingaikin_go_header",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -1235,6 +1257,14 @@ def go_deps():
sum = "h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=",
version = "v1.0.2",
)
go_repository(
name = "com_github_goccy_go_json",
build_file_proto_mode = "disable",
importpath = "github.com/goccy/go-json",
sum = "h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=",
version = "v0.9.11",
)

go_repository(
name = "com_github_godbus_dbus_v5",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -2239,6 +2269,49 @@ def go_deps():
sum = "h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg=",
version = "v1.1.0",
)
go_repository(
name = "com_github_lestrrat_go_blackmagic",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/blackmagic",
sum = "h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httpcc",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/httpcc",
sum = "h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httprc",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/httprc",
sum = "h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8=",
version = "v1.0.4",
)
go_repository(
name = "com_github_lestrrat_go_iter",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/iter",
sum = "h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=",
version = "v1.0.2",
)
go_repository(
name = "com_github_lestrrat_go_jwx_v2",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/jwx/v2",
sum = "h1:RlyYNLV892Ed7+FTfj1ROoF6x7WxL965PGTHso/60G0=",
version = "v2.0.6",
)
go_repository(
name = "com_github_lestrrat_go_option",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/option",
sum = "h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4=",
version = "v1.0.0",
)

go_repository(
name = "com_github_lib_pq",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -2818,15 +2891,15 @@ def go_deps():
name = "com_github_pingcap_kvproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/kvproto",
sum = "h1:ceg4xjEEXNgPsScTQ5dtidiltLF4h17Y/jUqfyLAy9E=",
version = "v0.0.0-20220929075948-06e08d5ed64c",
sum = "h1:ho5XUD8DVCnkpEj8oiTR57FXDTXnH6znyLe0gyrtzKk=",
version = "v0.0.0-20221103025916-e7e21f0e9cd9",
)
go_repository(
name = "com_github_pingcap_log",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/log",
sum = "h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8=",
version = "v1.1.0",
sum = "h1:T7e5Low0BU2ZazI2dz2mh3W1qv+w8wtvq1YR8DneA0c=",
version = "v1.1.1-0.20221110065318-21a4942860b3",
)
go_repository(
name = "com_github_pingcap_sysutil",
Expand Down Expand Up @@ -3205,8 +3278,8 @@ def go_deps():
name = "com_github_shurcool_vfsgen",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/vfsgen",
sum = "h1:y0cMJ0qjii33BnD6tMGcF/+gHYsoKQ6tbwQpy233OII=",
version = "v0.0.0-20180711163814-62bca832be04",
sum = "h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0=",
version = "v0.0.0-20181202132449-6a9ea43bcacd",
)
go_repository(
name = "com_github_sirupsen_logrus",
Expand Down Expand Up @@ -3422,15 +3495,15 @@ def go_deps():
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/client-go/v2",
sum = "h1:/13jzD/AR7v3dCLweFQ2JG8bihh3HLVIci2tbOHHGW0=",
version = "v2.0.1-0.20221012074856-6def8d7b90c4",
sum = "h1:nFVdyTXcQYZwQQCdSJcFI1vBFyzG1hVuZ39MAK6wqK4=",
version = "v2.0.3-0.20221108030801-9c0835c80eba",
)
go_repository(
name = "com_github_tikv_pd_client",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/pd/client",
sum = "h1:REQOR1XraH1fT9BCoNBPZs1CAe+w7VPLU+d+si7DLYo=",
version = "v0.0.0-20221010134149-d50e5fe43f14",
sum = "h1:ckPpxKcl75mO2N6a4cJXiZH43hvcHPpqc9dh1TmH1nc=",
version = "v0.0.0-20221031025758-80f0d8ca4d07",
)
go_repository(
name = "com_github_timakin_bodyclose",
Expand Down Expand Up @@ -3584,12 +3657,20 @@ def go_deps():
sum = "h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=",
version = "v0.0.0-20161114210144-ceec8f93295a",
)
go_repository(
name = "com_github_vbauerster_mpb_v7",
build_file_proto_mode = "disable",
importpath = "github.com/vbauerster/mpb/v7",
sum = "h1:BkGfmb6nMrrBQDFECR/Q7RkKCw7ylMetCb4079CGs4w=",
version = "v7.5.3",
)

go_repository(
name = "com_github_vividcortex_ewma",
build_file_proto_mode = "disable_global",
importpath = "github.com/VividCortex/ewma",
sum = "h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=",
version = "v1.1.1",
sum = "h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=",
version = "v1.2.0",
)
go_repository(
name = "com_github_wangjohn_quickselect",
Expand Down Expand Up @@ -4250,8 +4331,8 @@ def go_deps():
name = "org_golang_x_crypto",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/crypto",
sum = "h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=",
version = "v0.0.0-20220411220226-7b82a4e95df4",
sum = "h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_exp",
Expand Down Expand Up @@ -4300,8 +4381,8 @@ def go_deps():
name = "org_golang_x_net",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/net",
sum = "h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=",
version = "v0.0.0-20220722155237-a158d28d115b",
sum = "h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_oauth2",
Expand All @@ -4321,22 +4402,22 @@ def go_deps():
name = "org_golang_x_sys",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sys",
sum = "h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=",
version = "v0.0.0-20220928140112-f11e5e49a4ec",
sum = "h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_term",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/term",
sum = "h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=",
version = "v0.0.0-20210927222741-03fcf44c2211",
sum = "h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_text",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/text",
sum = "h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=",
version = "v0.3.7",
sum = "h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=",
version = "v0.4.0",
)
go_repository(
name = "org_golang_x_time",
Expand Down Expand Up @@ -4489,6 +4570,6 @@ def go_deps():
name = "org_uber_go_zap",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/zap",
sum = "h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=",
version = "v1.21.0",
sum = "h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=",
version = "v1.23.0",
)
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

include Makefile.common

.PHONY: all clean test server dev benchkv benchraw check checklist parser tidy ddltest build_br build_lightning build_lightning-ctl build_dumpling ut bazel_build bazel_prepare bazel_test check-file-perm bazel_lint
.PHONY: all clean test server dev benchkv benchraw check checklist parser tidy ddltest build_br build_lightning build_lightning-ctl build_dumpling ut bazel_build bazel_prepare bazel_test check-file-perm check-bazel-prepare bazel_lint

default: server buildsucc

Expand All @@ -31,7 +31,7 @@ dev: checklist check explaintest gogenerate br_unit_test test_part_parser_dev ut
# Install the check tools.
check-setup:tools/bin/revive

check: parser_yacc check-parallel lint tidy testSuite errdoc
check: parser_yacc check-parallel lint tidy testSuite errdoc check-bazel-prepare

fmt:
@echo "gofmt (simplify)"
Expand Down Expand Up @@ -393,6 +393,10 @@ bazel_prepare:
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable

check-bazel-prepare:
@echo "make bazel_prepare"
./tools/check/check-bazel-prepare.sh

bazel_test: failpoint-enable bazel_ci_prepare
bazel $(BAZEL_GLOBAL_CONFIG) test $(BAZEL_CMD_CONFIG) \
-- //... -//cmd/... -//tests/graceshutdown/... \
Expand All @@ -413,6 +417,8 @@ bazel_build: bazel_ci_prepare
mkdir -p bin
bazel $(BAZEL_GLOBAL_CONFIG) build $(BAZEL_CMD_CONFIG) \
//... --//build:with_nogo_flag=true
bazel $(BAZEL_GLOBAL_CONFIG) build $(BAZEL_CMD_CONFIG) \
//cmd/importer:importer //tidb-server:tidb-server //tidb-server:tidb-server-check --//build:with_nogo_flag=true
cp bazel-out/k8-fastbuild/bin/tidb-server/tidb-server_/tidb-server ./bin
cp bazel-out/k8-fastbuild/bin/cmd/importer/importer_/importer ./bin
cp bazel-out/k8-fastbuild/bin/tidb-server/tidb-server-check_/tidb-server-check ./bin
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go_rules_dependencies()

go_register_toolchains(
nogo = "@//build:tidb_nogo",
version = "1.19.2",
version = "1.19.3",
)

gazelle_dependencies()
Expand Down
23 changes: 23 additions & 0 deletions autoid_service/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "autoid_service",
srcs = ["autoid.go"],
importpath = "github.com/pingcap/tidb/autoid_service",
visibility = ["//visibility:public"],
deps = [
"//config",
"//kv",
"//meta",
"//metrics",
"//owner",
"//util/logutil",
"//util/mathutil",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_kvproto//pkg/autoid",
"@io_etcd_go_etcd_client_v3//:client",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//keepalive",
"@org_uber_go_zap//:zap",
],
)
Loading

0 comments on commit 307d44d

Please sign in to comment.