Skip to content

Commit

Permalink
bazel: remove with_ui configuration
Browse files Browse the repository at this point in the history
Epic: none
Release note: None
  • Loading branch information
rickystewart committed Jun 15, 2023
1 parent 290f665 commit 8bcffd0
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 158 deletions.
2 changes: 0 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ build --flag_alias=dev=//build/toolchains:dev_flag
build --flag_alias=force_build_cdeps=//build/toolchains:force_build_cdeps_flag
build --flag_alias=lintonbuild=//build/toolchains:nogo_flag
build --flag_alias=nolintonbuild=//build/toolchains:nonogo_explicit_flag
build --flag_alias=with_ui=//pkg/ui:with_ui_flag

build:crdb_test_off --crdb_test_off
build:cross --cross
Expand All @@ -31,7 +30,6 @@ build:nolintonbuild --nolintonbuild
# Note: nonogo is classically the name of the nolintonbuild configuration.
build:nonogo --nolintonbuild
build:test --crdb_test
build:with_ui --with_ui

# Basic settings.
build --define gotags=bazel,gss
Expand Down
2 changes: 1 addition & 1 deletion build/teamcity/cockroach/ci/builds/build_impl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi
bazel build //pkg/cmd/bazci --config=ci
BAZEL_BIN=$(bazel info bazel-bin --config=ci)
"$BAZEL_BIN/pkg/cmd/bazci/bazci_/bazci" -- build -c opt \
--config "$CONFIG" --config ci --config with_ui $EXTRA_ARGS \
--config "$CONFIG" --config ci $EXTRA_ARGS \
//pkg/cmd/cockroach-short //pkg/cmd/cockroach \
//pkg/cmd/cockroach-sql \
//pkg/cmd/cockroach-oss //c-deps:libgeos $EXTRA_TARGETS
Expand Down
4 changes: 2 additions & 2 deletions build/teamcity/cockroach/nightlies/compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ bazel build //pkg/cmd/bazci --config=ci
BAZEL_BIN=$(bazel info bazel-bin --config=ci)
BAZCI=$BAZEL_BIN/pkg/cmd/bazci/bazci_/bazci

bazel build //pkg/cmd/cockroach //pkg/compose/compare/compare:compare_test --config=ci --config=crosslinux --config=test --config=with_ui
CROSSBIN=$(bazel info bazel-bin --config=ci --config=crosslinux --config=test --config=with_ui)
bazel build //pkg/cmd/cockroach //pkg/compose/compare/compare:compare_test --config=ci --config=crosslinux --config=test
CROSSBIN=$(bazel info bazel-bin --config=ci --config=crosslinux --config=test)
COCKROACH=$CROSSBIN/pkg/cmd/cockroach/cockroach_/cockroach
COMPAREBIN=$CROSSBIN/pkg/compose/compare/compare/compare_test_/compare_test
ARTIFACTS_DIR=$PWD/artifacts
Expand Down
4 changes: 2 additions & 2 deletions build/teamcity/cockroach/nightlies/roachtest_compile_bits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for platform in "${cross_builds[@]}"; do

echo "Building $platform, os=$os, arch=$arch..."
# Build cockroach, workload and geos libs.
bazel build --config $platform --config ci --config with_ui -c opt --config force_build_cdeps \
bazel build --config $platform --config ci -c opt --config force_build_cdeps \
//pkg/cmd/cockroach //pkg/cmd/workload \
//c-deps:libgeos
# N.B. roachtest is currently executed only on a TC agent running linux/amd64, so we build it once.
Expand All @@ -36,7 +36,7 @@ for platform in "${cross_builds[@]}"; do
# Build cockroach-short with assertions enabled.
bazel build --config $platform --config ci -c opt //pkg/cmd/cockroach-short --crdb_test
# Copy the binaries.
BAZEL_BIN=$(bazel info bazel-bin --config $platform --config ci --config with_ui -c opt)
BAZEL_BIN=$(bazel info bazel-bin --config $platform --config ci -c opt)
# N.B. currently, we support only one roachtest binary, so elide the suffix.
if [[ $os == "linux" && $arch == "amd64" ]]; then
cp $BAZEL_BIN/pkg/cmd/roachtest/roachtest_/roachtest bin/roachtest
Expand Down
2 changes: 1 addition & 1 deletion dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
set -euo pipefail

# Bump this counter to force rebuilding `dev` on all machines.
DEV_VERSION=75
DEV_VERSION=76

THIS_DIR=$(cd "$(dirname "$0")" && pwd)
BINARY_DIR=$THIS_DIR/bin/dev-versions
Expand Down
9 changes: 0 additions & 9 deletions pkg/cmd/dev/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,15 +444,6 @@ func (d *dev) getBasicBuildArgs(
}
}

// Add --config=with_ui iff we're building a target that needs it.
for _, target := range buildTargets {
if target.fullName == buildTargetMapping["cockroach"] ||
target.fullName == buildTargetMapping["cockroach-oss"] ||
target.fullName == buildTargetMapping["obsservice"] {
args = append(args, "--config=with_ui")
break
}
}
if shouldBuildWithTestConfig {
args = append(args, "--config=test")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/dev/testdata/datadriven/dev-build
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cp sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkou
exec
dev build -- --verbose_failures --sandbox_debug
----
bazel build //pkg/cmd/cockroach:cockroach --config=with_ui --verbose_failures --sandbox_debug --build_event_binary_file=/tmp/path
bazel build //pkg/cmd/cockroach:cockroach --verbose_failures --sandbox_debug --build_event_binary_file=/tmp/path
bazel info workspace --color=no
mkdir crdb-checkout/bin
bazel info bazel-bin --color=no
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/dev/testdata/datadriven/ui
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ dev ui e2e
bazel info workspace --color=no
bazel info workspace --color=no
yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests install
bazel build //pkg/cmd/cockroach:cockroach --config=with_ui
bazel build //pkg/cmd/cockroach:cockroach
yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests cypress install
crdb-checkout/pkg/ui/workspaces/e2e-tests/build/start-crdb-then.sh yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests cy:run

Expand All @@ -167,7 +167,7 @@ dev ui e2e ./foo/bar
bazel info workspace --color=no
bazel info workspace --color=no
yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests install
bazel build //pkg/cmd/cockroach:cockroach --config=with_ui
bazel build //pkg/cmd/cockroach:cockroach
yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests cypress install
crdb-checkout/pkg/ui/workspaces/e2e-tests/build/start-crdb-then.sh yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests cy:run ./foo/bar

Expand All @@ -177,7 +177,7 @@ dev ui e2e --headed
bazel info workspace --color=no
bazel info workspace --color=no
yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests install
bazel build //pkg/cmd/cockroach:cockroach --config=with_ui
bazel build //pkg/cmd/cockroach:cockroach
yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests cypress install
crdb-checkout/pkg/ui/workspaces/e2e-tests/build/start-crdb-then.sh yarn --silent --cwd crdb-checkout/pkg/ui/workspaces/e2e-tests cy:debug

Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/dev/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ launching test in a real browser. Extra flags are passed directly to the
buildCockroachArgv := []string{
"build",
"//pkg/cmd/cockroach:cockroach",
"--config=with_ui",
}
logCommand("bazel", buildCockroachArgv...)
err = d.exec.CommandContextInheritingStdStreams(ctx, "bazel", buildCockroachArgv...)
Expand Down
Loading

0 comments on commit 8bcffd0

Please sign in to comment.