diff --git a/.bazelrc b/.bazelrc index e4965413370a..c2527ca3db06 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,7 +1,7 @@ # TODO(irfansharif): We should fold this into `dev` instead (#56965). -build --ui_event_filters=-DEBUG --define gotags=bazel -test --define gotags=bazel +build --ui_event_filters=-DEBUG --define gotags=bazel,crdb_test_off +test --define gotags=bazel,crdb_test query --ui_event_filters=-DEBUG try-import %workspace%/.bazelrc.user diff --git a/BUILD.bazel b/BUILD.bazel index 564ef172c0ed..380fe5816dc8 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -12,7 +12,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle") # # gazelle:prefix github.com/cockroachdb/cockroach # gazelle:build_file_name BUILD.bazel -# gazelle:build_tags bazel +# gazelle:build_tags bazel,crdb_test,crdb_test_off # Enable protobuf generation. # diff --git a/README.md b/README.md index 8d398cd89646..b0cb22813f3c 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,7 @@ CockroachDB supports the PostgreSQL wire protocol, so you can use any available ## Deployment -- [Test Deployments](https://www.cockroachlabs.com/docs/stable/deploy-a-test-cluster.html) - Easiest way to test an insecure, multi-node CockroachDB cluster. -- Production Deployments + - [CockroachCloud](https://www.cockroachlabs.com/docs/cockroachcloud/quickstart) - Steps to deploy a [free CockroachCloud cluster](https://cockroachlabs.cloud/signup?referralId=githubquickstart) on public Cloud platforms. - [Manual](https://www.cockroachlabs.com/docs/stable/manual-deployment.html) - Steps to deploy a CockroachDB cluster manually on multiple machines. - [Cloud](https://www.cockroachlabs.com/docs/stable/cloud-deployment.html) - Guides for deploying CockroachDB on various cloud platforms. - [Orchestration](https://www.cockroachlabs.com/docs/stable/orchestration.html) - Guides for running CockroachDB with popular open-source orchestration systems. diff --git a/pkg/cmd/roachtest/sqlsmith.go b/pkg/cmd/roachtest/sqlsmith.go index abe5d043d610..b6bbf6efba88 100644 --- a/pkg/cmd/roachtest/sqlsmith.go +++ b/pkg/cmd/roachtest/sqlsmith.go @@ -211,11 +211,20 @@ func registerSQLSmith(r *testRegistry) { }() if err != nil { es := err.Error() - // TODO(yuzefovich): we temporarily ignore internal errors that - // are because of #39433. - if strings.Contains(es, "internal error") && !strings.Contains(es, "internal error: invalid index") { - logStmt(stmt) - t.Fatalf("error: %s\nstmt:\n%s;", err, stmt) + if strings.Contains(es, "internal error") { + // TODO(yuzefovich): we temporarily ignore internal errors + // that are because of #39433 and #40929. + var expectedError bool + for _, exp := range []string{ + "internal error: invalid index", + "could not parse \"0E-2019\" as type decimal", + } { + expectedError = expectedError || strings.Contains(es, exp) + } + if !expectedError { + logStmt(stmt) + t.Fatalf("error: %s\nstmt:\n%s;", err, stmt) + } } else if strings.Contains(es, "communication error") { // A communication error can be because // a non-gateway node has crashed. diff --git a/pkg/sql/opt/memo/BUILD.bazel b/pkg/sql/opt/memo/BUILD.bazel index e8227abb46a9..d899f3b50029 100644 --- a/pkg/sql/opt/memo/BUILD.bazel +++ b/pkg/sql/opt/memo/BUILD.bazel @@ -3,14 +3,16 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "memo", srcs = [ - "check_expr_skip.go", + "check_expr.go", + "check_expr_skip.go", # keep "constraint_builder.go", "cost.go", "expr.go", "expr_format.go", "expr_name_gen.go", "extract.go", - "filters_expr_mutate_checker_skip.go", + "filters_expr_mutate_checker.go", + "filters_expr_mutate_checker_skip.go", # keep "group.go", "interner.go", "logical_props_builder.go", diff --git a/pkg/sql/opt/props/BUILD.bazel b/pkg/sql/opt/props/BUILD.bazel index 15c27ec51249..6d1d9333c626 100644 --- a/pkg/sql/opt/props/BUILD.bazel +++ b/pkg/sql/opt/props/BUILD.bazel @@ -11,6 +11,7 @@ go_library( "multiplicity.go", "selectivity.go", "statistics.go", + "verify.go", "volatility.go", ], importpath = "github.com/cockroachdb/cockroach/pkg/sql/opt/props", diff --git a/pkg/testutils/lint/lint_test.go b/pkg/testutils/lint/lint_test.go index a2a67e93baf8..9da3d69d2d27 100644 --- a/pkg/testutils/lint/lint_test.go +++ b/pkg/testutils/lint/lint_test.go @@ -1613,12 +1613,16 @@ func TestLint(t *testing.T) { t.Run("TestStaticCheck", func(t *testing.T) { // staticcheck uses 2.4GB of ram (as of 2019-05-10), so don't parallelize it. skip.UnderShort(t) + var args []string + if pkgSpecified { + args = []string{pkgScope} + } else { + args = []string{"-unused.whole-program", pkgScope} + } cmd, stderr, filter, err := dirCmd( crdb.Dir, "staticcheck", - "-unused.whole-program", - pkgScope, - ) + args...) if err != nil { t.Fatal(err) } diff --git a/pkg/util/BUILD.bazel b/pkg/util/BUILD.bazel index a3274c62f67d..e138fbef4b2b 100644 --- a/pkg/util/BUILD.bazel +++ b/pkg/util/BUILD.bazel @@ -7,6 +7,7 @@ go_library( srcs = [ "constants.go", "crdb_test_off.go", + "crdb_test_on.go", # keep "every_n.go", "fast_int_map.go", "fast_int_set.go",