-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
79808: bazel: use pre-built archives of the c-deps r=mari-crl a=rickystewart Up until this point we've required building all of the `c-deps` via `rules_foreign_cc`. This has a couple downsides: the build is not parallelized (#77207), and while in principle developers should be able to build it once and then reuse the cached version forever, in practice this is not really the case (#76851). To this point we pre-build these libraries and add the requisite glue so that Bazel can download and link them in. 1. Rename all the `c-deps:libX` targets to `c-deps:libX_foreign`. 2. `libproj`, `libjemalloc`, and `libkrb5` are updated to compile w/ `-fPIC` unless `force_build_cdeps` is set. 3. Add a script `c-deps/buildcdeps.sh` that builds all the `libX_foreign` libraries in the various cross-configurations. 4. Add a script `build-and-publish-cdeps.sh` that can be invoked from TeamCity to build all the `c-deps` and push them to GCS. 5. Add `c-deps/archived.bzl` to wrap all the pre-compiled libraries from above. 6. Now `libgeos` is no longer (necessarily) found in `bazel-bin/c-deps/libgeos`, so we need to update a few places so it can continue to be found: `bazci`, `publish-artifacts`, and `publish-provisional-artifacts`, and `pkg/geos`. You can still force building the `c-deps` from scratch with `--force_build_cdeps`. Doing so will compile the `c-deps` WITHOUT `-fPIC`; the release pipeline is updated to use this to avoid any performance regression. You still must compile the `c-deps` from scratch on unsupported operating systems (OS's other than Linux, macOS, and Windows). Closes #77135. 79810: sql: enforce admin role for resetting sql stats and index usage stats r=maryliag a=Azhng Resolves #79688 Previously, SQL Stats and Index Usage Stats can be reset through SQL CLI using crdb_internal.reset_sql_stats() and crdb_internal.reset_index_usage_stats() builtins. However, these two builtins were not checking for users admin role. Hence, any user can reset SQL Stats and Index Usage Stats. This commit enforces the permission check. Release note (security update): crdb_internal.reset_sql_stats() and crdb_internal.reset_index_usage_stats() builtins now check if user has admin role. Co-authored-by: Ricky Stewart <[email protected]> Co-authored-by: Azhng <[email protected]>
- Loading branch information
Showing
23 changed files
with
635 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
build/teamcity/internal/release/build-and-publish-cdeps.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
google_credentials="$GOOGLE_EPHEMERAL_CREDENTIALS" | ||
dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" | ||
source "$dir/teamcity-support.sh" # for root | ||
source "$dir/teamcity-bazel-support.sh" # for run_bazel | ||
log_into_gcloud | ||
|
||
set -x | ||
|
||
tc_start_block "Build c-deps" | ||
run_bazel c-deps/buildcdeps.sh | ||
tc_end_block "Build c-deps" | ||
|
||
tc_start_block "Publish artifacts" | ||
loc=$(date +%Y%m%d-%H%M%S) | ||
gsutil cp -r $root/artifacts gs://public-bazel-artifacts/c-deps/$loc | ||
tc_end_block "Publish artifacts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.