Skip to content

Commit

Permalink
Merge branch 'master' into add-alter-table-not-exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalinin committed Oct 8, 2021
2 parents 5447bbf + def44f2 commit fbf5cfc
Show file tree
Hide file tree
Showing 9,252 changed files with 1,771,770 additions and 1,211,186 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
artifacts
bin
build/builder_home
lib
pkg/ui/node_modules
vendor
49 changes: 49 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
try-import %workspace%/.bazelrc.user

build --symlink_prefix=_bazel/ --ui_event_filters=-DEBUG --define gotags=bazel,crdb_test_off,gss --experimental_proto_descriptor_sets_include_source_info
test --config=test
build:with_ui --define cockroach_with_ui=y
build:test --define gotags=bazel,crdb_test,gss
build:race --@io_bazel_rules_go//go/config:race --test_env=GORACE=halt_on_error=1 --test_sharding_strategy=disabled
test:test --test_env=TZ=
query --ui_event_filters=-DEBUG

# CI should always run with `--config=ci`.
build:ci --experimental_convenience_symlinks=ignore
build:ci --stamp
build:ci --host_crosstool_top=@toolchain_cross_x86_64-unknown-linux-gnu//:suite
# Set `-test.v` in Go tests.
# Ref: https://github.com/bazelbuild/rules_go/pull/2456
test:ci --test_env=GO_TEST_WRAP_TESTV=1
# Dump all output for failed tests to the build log.
test:ci --test_output=errors
# Put all tmp artifacts in /artifacts/tmp.
test:ci --test_tmpdir=/artifacts/tmp

# cross-compilation configurations. Add e.g. --config=crosslinux to turn these on
# TODO(ricky): Having to specify both the `platform` and the `crosstool_top` is
# weird, but I think `rules_foreign_cc` doesn't play too nicely with `--platforms`?
build:crosslinux --platforms=//build/toolchains:cross_linux
build:crosslinux --crosstool_top=@toolchain_cross_x86_64-unknown-linux-gnu//:suite
build:crosslinux '--workspace_status_command=./build/bazelutil/stamp.sh x86_64-pc-linux-gnu'
build:crosslinux --config=ci
build:crosswindows --platforms=//build/toolchains:cross_windows
build:crosswindows --crosstool_top=@toolchain_cross_x86_64-w64-mingw32//:suite
build:crosswindows '--workspace_status_command=./build/bazelutil/stamp.sh x86_64-w64-mingw32'
build:crosswindows --config=ci
build:crossmacos --platforms=//build/toolchains:cross_macos
build:crossmacos --crosstool_top=@toolchain_cross_x86_64-apple-darwin19//:suite
build:crossmacos '--workspace_status_command=./build/bazelutil/stamp.sh x86_64-apple-darwin19'
build:crossmacos --config=ci
build:crosslinuxarm --platforms=//build/toolchains:cross_linux_arm
build:crosslinuxarm --crosstool_top=@toolchain_cross_aarch64-unknown-linux-gnu//:suite
build:crosslinuxarm '--workspace_status_command=./build/bazelutil/stamp.sh aarch64-unknown-linux-gnu'
build:crosslinuxarm --config=ci

# developer configurations. Add e.g. --config=devdarwinx86_64 to turn these on.
build:devdarwinx86_64 --crosstool_top=@toolchain_dev_darwin_x86-64//:suite
# NOTE(ricky): This is consumed in `BUILD` files (see
# `build/toolchains/BUILD.bazel`).
build:devdarwinx86_64 --config=dev
build:dev --define cockroach_bazel_dev=y
build:dev --stamp --workspace_status_command=./build/bazelutil/stamp.sh
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.0
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.pb.* -diff
*.eg.go -diff
pkg/BUILD.bazel -diff
3 changes: 3 additions & 0 deletions .github/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports_files([
"CODEOWNERS",
])
235 changes: 223 additions & 12 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# https://github.com/blog/2392-introducing-code-owners
# https://help.github.com/articles/about-codeowners/
# The CODEOWNERS file is used by Github to automate assigning code reviews, see
# [1] and [2]. We also use it in our internal tooling (see [3]) to automate test
# failure issue routing. To do this efficiently, we are enforcing a few rules in
# this file via linting. They are:
#
# Code owners are automatically requested for review when someone
# opens a pull request that modifies code that they own.
# - every file under ./pkg has to have at least one owner, and each owner must
# be present in TEAMS.yaml (either as a map key or an alias).
# - you can opt out of Github-requested code review assignments (while
# maintaining team ownership) by suffixing the handle with `-noreview`.
# (This will essentially make it an unknown team to Github, but our internal
# tooling continues to recognize the original team).
#
# Remember, *the last rule to match wins.*
# Remember, *the last rule to match wins*, and you need a trailing slash to get
# recursive ownership of a directory.
#
# [1]: https://github.com/blog/2392-introducing-code-owners
# [2]: https://help.github.com/articles/about-codeowners/
# [3]: pkg/internal/codeowners

/.github/ @cockroachdb/dev-inf
/.github/CODEOWNERS @cockroachdb/unowned

/build/ @cockroachdb/dev-inf

/docs/RFCS/ @cockroachdb/rfc-prs
/docs/generated/redact_safe.md @cockroachdb/security

/Makefile @cockroachdb/dev-inf

/pkg/sql/ @cockroachdb/sql-queries-noreview

/pkg/sql/opt/ @cockroachdb/sql-opt-prs
/pkg/sql/stats/ @cockroachdb/sql-opt-prs
Expand All @@ -15,23 +36,213 @@
/pkg/sql/parser/ @cockroachdb/sql-syntax-prs
/pkg/sql/lex/ @cockroachdb/sql-syntax-prs
/pkg/sql/show_create*.go @cockroachdb/sql-syntax-prs
/pkg/sql/types/ @cockroachdb/sql-syntax-prs

/pkg/sql/crdb_internal.go @cockroachdb/sql-api-prs
/pkg/sql/pg_catalog.go @cockroachdb/sql-api-prs
/pkg/sql/pgwire/ @cockroachdb/sql-api-prs
/pkg/sql/sem/builtins/ @cockroachdb/sql-api-prs
/pkg/sql/vtable/ @cockroachdb/sql-api-prs

/pkg/sql/sessiondata/ @cockroachdb/sql-experience
/pkg/sql/tests/rsg_test.go @cockroachdb/sql-experience

/pkg/sql/catalog/ @cockroachdb/sql-schema
/pkg/sql/catalog/multiregion @cockroachdb/multiregion
/pkg/sql/doctor/ @cockroachdb/sql-schema
/pkg/sql/gcjob/ @cockroachdb/sql-schema
/pkg/sql/gcjob_test/ @cockroachdb/sql-schema
/pkg/sql/privilege/ @cockroachdb/sql-schema
/pkg/sql/schemachange/ @cockroachdb/sql-schema
/pkg/sql/schemachanger/ @cockroachdb/sql-schema
/pkg/sql/alter*.go @cockroachdb/sql-schema
/pkg/sql/backfill*.go @cockroachdb/sql-schema
/pkg/sql/create*.go @cockroachdb/sql-schema
/pkg/sql/database*.go @cockroachdb/sql-schema
/pkg/sql/drop*.go @cockroachdb/sql-schema
/pkg/sql/grant*.go @cockroachdb/sql-schema
/pkg/sql/rename*.go @cockroachdb/sql-schema
/pkg/sql/revoke*.go @cockroachdb/sql-schema
/pkg/sql/schema*.go @cockroachdb/sql-schema
/pkg/sql/zone*.go @cockroachdb/sql-schema

/pkg/cli/ @cockroachdb/cli-prs
# last-rule-wins so bulk i/o takes userfile.go even though cli-prs takes pkg/cli
/pkg/cli/userfile.go @cockroachdb/bulk-prs
/pkg/cli/demo*.go @cockroachdb/cli-prs @cockroachdb/sql-experience @cockroachdb/server-prs
/pkg/cli/debug*.go @cockroachdb/cli-prs @cockroachdb/kv-prs
/pkg/cli/debug_job_trace*.go @cockroachdb/bulk-prs
/pkg/cli/doctor*.go @cockroachdb/cli-prs @cockroachdb/sql-schema
/pkg/cli/import_test.go @cockroachdb/cli-prs @cockroachdb/bulk-prs
/pkg/cli/sql*.go @cockroachdb/cli-prs @cockroachdb/sql-experience
/pkg/cli/start*.go @cockroachdb/cli-prs @cockroachdb/server-prs
/pkg/cli/mt_proxy.go @cockroachdb/sqlproxy-prs @cockroachdb/server-prs
/pkg/cli/mt_start_sql.go @cockroachdb/sqlproxy-prs @cockroachdb/server-prs
/pkg/cli/mt_test_directory.go @cockroachdb/sqlproxy-prs @cockroachdb/server-prs
/pkg/cli/connect*.go @cockroachdb/cli-prs @cockroachdb/server-prs
/pkg/cli/init.go @cockroachdb/cli-prs @cockroachdb/server-prs
/pkg/cmd/cockroach-sql/ @cockroachdb/cli-prs

/pkg/server/ @cockroachdb/server-prs
/pkg/server/testserver*.go @cockroachdb/server-prs @cockroachdb/test-eng

/pkg/ccl/changefeedccl/ @cockroachdb/cdc-prs
/pkg/ccl/streamingccl/ @cockroachdb/cdc-prs
# last-rule-wins so *after* CDC takes most of streamingccl bulk-prs takes ingest pkg.
/pkg/ccl/streamingccl/streamingest @cockroachdb/bulk-prs

/pkg/ccl/backupccl/ @cockroachdb/bulk-prs
/pkg/ccl/importccl/ @cockroachdb/bulk-prs
/pkg/ccl/storageccl/ @cockroachdb/bulk-prs
/pkg/ccl/changefeedccl/ @cockroachdb/bulk-prs
/pkg/cloud/ @cockroachdb/bulk-prs
/pkg/sql/distsql_plan_csv.go @cockroachdb/bulk-prs
/pkg/cli/dump.go @cockroachdb/bulk-prs

/pkg/geo @cockroachdb/geospatial
/pkg/geo/ @cockroachdb/geospatial

/pkg/kv/ @cockroachdb/kv-prs

/pkg/storage/ @cockroachdb/storage

/pkg/ui/ @cockroachdb/cluster-ui-prs
/pkg/ui/embedded.go @cockroachdb/cluster-ui-prs
/pkg/ui/src/js/protos.d.ts @cockroachdb/cluster-ui-prs
/pkg/ui/src/js/protos.js @cockroachdb/cluster-ui-prs

/docs/generated/http/ @cockroachdb/http-api-prs @cockroachdb/server-prs
/pkg/cmd/docgen/http.go @cockroachdb/http-api-prs @cockroachdb/server-prs

/pkg/ccl/sqlproxyccl/ @cockroachdb/sqlproxy-prs @cockroachdb/server-prs

/pkg/acceptance/ @cockroachdb/sql-experience
/pkg/base/ @cockroachdb/server-prs
/pkg/bench/ @cockroachdb/sql-queries
/pkg/bench/rttanalysis @cockroachdb/sql-experience
/pkg/blobs/ @cockroachdb/bulk-prs
/pkg/build/ @cockroachdb/dev-inf
/pkg/ccl/baseccl/ @cockroachdb/cli-prs
/pkg/ccl/buildccl/ @cockroachdb/dev-inf
/pkg/ccl/cliccl/ @cockroachdb/cli-prs
/pkg/ccl/cmdccl/enc_utils/ @cockroachdb/storage
/pkg/ccl/cmdccl/stub-schema-registry/ @cockroachdb/cdc-prs
/pkg/ccl/gssapiccl/ @cockroachdb/sql-queries
/pkg/ccl/kvccl/ @cockroachdb/kv-noreview
/pkg/ccl/migrationccl/ @cockroachdb/kv-prs-noreview
/pkg/ccl/logictestccl/ @cockroachdb/sql-queries-noreview
/pkg/ccl/multiregionccl/ @cockroachdb/multiregion
/pkg/ccl/multitenantccl/ @cockroachdb/unowned
/pkg/ccl/oidcccl/ @cockroachdb/sql-queries
/pkg/ccl/partitionccl/ @cockroachdb/sql-schema @cockroachdb/multiregion
/pkg/ccl/serverccl/ @cockroachdb/server-prs
/pkg/ccl/telemetryccl/ @cockroachdb/obs-inf-prs
/pkg/ccl/testccl/sqlccl/ @cockroachdb/sql-queries
/pkg/ccl/testccl/workload/schemachange/ @cockroachdb/sql-schema
/pkg/ccl/testutilsccl/ @cockroachdb/test-eng-noreview
/pkg/ccl/utilccl/ @cockroachdb/server-prs
/pkg/ccl/workloadccl/ @cockroachdb/sql-experience
/pkg/ccl/benchccl/rttanalysisccl/ @cockroachdb/sql-experience
/pkg/clusterversion/ @cockroachdb/kv-prs-noreview
/pkg/cmd/allocsim/ @cockroachdb/kv-prs
/pkg/cmd/bazci/ @cockroachdb/dev-inf
/pkg/cmd/cmdutil/ @cockroachdb/dev-inf
/pkg/cmd/cmp-protocol/ @cockroachdb/sql-experience
/pkg/cmd/cmp-sql/ @cockroachdb/sql-experience
/pkg/cmd/cmpconn/ @cockroachdb/sql-experience
/pkg/cmd/cockroach/ @cockroachdb/cli-prs
/pkg/cmd/cockroach-oss/ @cockroachdb/cli-prs
/pkg/cmd/cockroach-short/ @cockroachdb/cli-prs
/pkg/cmd/compile-build/ @cockroachdb/dev-inf
/pkg/cmd/cr2pg/ @cockroachdb/sql-experience
/pkg/cmd/dev/ @cockroachdb/dev-inf
/pkg/cmd/docgen/ @cockroachdb/docs
/pkg/cmd/fuzz/ @cockroachdb/test-eng
/pkg/cmd/generate-binary/ @cockroachdb/sql-experience
/pkg/cmd/generate-metadata-tables/ @cockroachdb/sql-experience
/pkg/cmd/generate-spatial-ref-sys/ @cockroachdb/geospatial
/pkg/cmd/generate-test-suites/ @cockroachdb/dev-inf
/pkg/cmd/geoviz/ @cockroachdb/geospatial
/pkg/cmd/github-post/ @cockroachdb/test-eng
/pkg/cmd/github-pull-request-make/ @cockroachdb/dev-inf
/pkg/cmd/gossipsim/ @cockroachdb/kv-prs
/pkg/cmd/import-tools/ @cockroachdb/dev-inf
/pkg/cmd/internal/issues/ @cockroachdb/test-eng
/pkg/cmd/prereqs/ @cockroachdb/dev-inf
/pkg/cmd/protoc-gen-gogoroach/ @cockroachdb/server-prs
/pkg/cmd/publish-artifacts/ @cockroachdb/dev-inf
/pkg/cmd/publish-provisional-artifacts/ @cockroachdb/dev-inf
/pkg/cmd/reduce/ @cockroachdb/sql-queries
/pkg/cmd/returncheck/ @cockroachdb/dev-inf
/pkg/cmd/roachprod/ @cockroachdb/dev-inf
/pkg/cmd/roachprod-stress/ @cockroachdb/test-eng
/pkg/cmd/roachtest/ @cockroachdb/test-eng
/pkg/cmd/tag-merged-pr/ @cockroachdb/dev-inf
# This isn't quite right, each file should ideally be owned
# by a team (or at least most of them), namely the team that
# is the Owner for the roachtest, but until we unify these
# two concepts of ownership we don't want to ping test-eng
# on each test change.
/pkg/cmd/roachtest/tests @cockroachdb/test-eng-noreview
/pkg/cmd/roachvet/ @cockroachdb/dev-inf
/pkg/cmd/skip-test/ @cockroachdb/test-eng
/pkg/cmd/skiperrs/ @cockroachdb/sql-experience
/pkg/cmd/skipped-tests/ @cockroachdb/test-eng
/pkg/cmd/smithcmp/ @cockroachdb/sql-queries
/pkg/cmd/smithtest/ @cockroachdb/sql-queries
/pkg/cmd/teamcity-trigger/ @cockroachdb/dev-inf
/pkg/cmd/testfilter/ @cockroachdb/test-eng
/pkg/cmd/uptodate/ @cockroachdb/dev-inf
/pkg/cmd/urlcheck/ @cockroachdb/docs
/pkg/cmd/whoownsit/ @cockroachdb/test-eng
/pkg/cmd/workload/ @cockroachdb/sql-experience
/pkg/cmd/wraprules/ @cockroachdb/obs-inf-noreview
/pkg/cmd/zerosum/ @cockroachdb/kv-noreview
/pkg/col/ @cockroachdb/sql-queries
/pkg/compose/ @cockroachdb/sql-experience
/pkg/config/ @cockroachdb/server-prs
/pkg/docs/ @cockroachdb/docs
/pkg/featureflag/ @cockroachdb/cli-prs-noreview
/pkg/gossip/ @cockroachdb/kv-noreview
/pkg/internal/client/requestbatcher/ @cockroachdb/kv-prs
/pkg/internal/codeowners/ @cockroachdb/test-eng
/pkg/internal/reporoot @cockroachdb/dev-inf
/pkg/internal/rsg/ @cockroachdb/sql-queries
/pkg/internal/sqlsmith/ @cockroachdb/sql-queries
/pkg/internal/team/ @cockroachdb/test-eng
/pkg/jobs/ @cockroachdb/sql-schema
/pkg/keys/ @cockroachdb/kv-prs
# Don't ping KV on updates to reserved descriptor IDs and such.
/pkg/keys/constants.go @cockroachdb/kv-prs-noreview
/pkg/migration/ @cockroachdb/kv-prs-noreview @cockroachdb/sql-schema
/pkg/multitenant @cockroachdb/unowned
/pkg/release/ @cockroachdb/dev-inf
/pkg/roachpb/ @cockroachdb/kv-prs
/pkg/roachpb/app* @cockroachdb/sql-observability
/pkg/roachpb/index* @cockroachdb/sql-observability
/pkg/rpc/ @cockroachdb/server-prs
/pkg/scheduledjobs/ @cockroachdb/bulk-prs
/pkg/security/ @cockroachdb/server-prs
/pkg/settings/ @cockroachdb/server-prs
/pkg/spanconfig/ @cockroachdb/multiregion
/pkg/startupmigrations/ @cockroachdb/server-prs @cockroachdb/sql-schema
/pkg/streaming/ @cockroachdb/bulk-prs
/pkg/testutils/ @cockroachdb/test-eng-noreview
/pkg/testutils/reduce/ @cockroachdb/sql-queries
/pkg/testutils/sqlutils/ @cockroachdb/sql-queries
/pkg/ts/ @cockroachdb/kv-prs
/pkg/ts/catalog/ @cockroachdb/obs-inf-prs
/pkg/util/ @cockroachdb/unowned
/pkg/util/log @cockroachdb/server-prs
/pkg/util/metric @cockroachdb/obs-inf-prs
/pkg/util/stop @cockroachdb/server-prs
/pkg/util/tracing @cockroachdb/obs-inf-prs
/pkg/workload/ @cockroachdb/sql-experience

/pkg/ui/ @cockroachdb/admin-ui-prs
/pkg/ui/embedded.go
/pkg/ui/src/js/protos.d.ts
/pkg/ui/src/js/protos.js
# Own all bazel files to dev-inf, but don't request reviews for them
# as they are mostly - but not only - generated code that changes with
# changes to the Go code in the package.
**/BUILD.bazel @cockroachdb/dev-inf-noreview
# Avoid mass pings when updating proto tooling.
# For some reason, **/*.pb.go does not work (in the
# sense that ./pkg/cmd/whoownsit will not match this
# pattern to any files).
**.pb.go @cockroachdb/unowned
**.pb.gw.go @cockroachdb/unowned
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
name: Bug or crash report
about: Report unexpected behavior to help us improve

name: 'Bug or crash report'
title: ''
about: 'Report unexpected behavior to help us improve'
labels: 'C-bug'
assignees: ''
---

**Describe the problem**
Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Security Vulnerabilities
url: https://www.cockroachlabs.com/security/responsible-disclosure-policy/
about: "Report a security vulnerability or security-related bug in CockroachDB or Cockroach Cloud"
- name: CockroachDB Community Forum
url: https://forum.cockroachlabs.com/
about: "For general questions about CockroachDB"
- name: Enterprise Support
url: https://support.cockroachlabs.com
about: "Enterprise Support"
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project

name: 'Feature request'
title: ''
about: 'Suggest an idea for this project'
labels: 'C-enhancement'
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
Expand Down
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/performance-inquiry.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
name: Performance inquiry
about: You have a question about CockroachDB's performance and it is not a bug or
a feature request
name: 'Performance inquiry'
title: ''
about: 'You have a question about CockroachDB's performance and it is not a bug or a feature request'
labels: 'C-question'

---

Expand Down
Loading

0 comments on commit fbf5cfc

Please sign in to comment.