Skip to content

Commit

Permalink
Release 0.12.0 (2023-09-14)
Browse files Browse the repository at this point in the history
### Features

* [Coordinators] moving /server/bin to /
* [GCP] Add realtime notifier tool
* [sharding] Add metrics for set query
* A delta based request generator that creates KV requests from delta files
* A generic grpc client that sends a request and returns a response
* Add ability to point to real coordinators through parameters
* Add bazel configs for roma legacy vs sandboxed
* Add bazel macro to generate UDF delta file from wasm binary and JS
* Add delta based request generator to the simulation system
* Add delta file notifier and loader to the request simulation system
* Add Dependencies section to release notes
* Add functions for serializing and deserializing shard mapping records
* Add GCP features and fixes sections in release notes
* add GCP platform and instance
* Add GCP realtime notifier
* Add GCP terraform config for metrics collector
* Add logical sharding config schema and constants
* Add metrics collector endpoint to the parameter
* Add metrics collector to periodically print and publish metrics
* Add NAT gateway for public internet access
* Add OSSF Scorecard badge to top-level README
* Add OSSF Scorecard GitHub Action
* add service mesh to GCP platform
* Add support to execute queries over sharded sets.
* Add tool to convert C++ to JS with inline WASM
* add unit tests to gcp parameter client
* Add version to UdfConfig.
* Adding GCP version of the message service
* Build AMI for request simulation system
* Coordinators: Add missing permission
* Deploy otel with request simulation system to AWS
* Enable metrics and tune the performance for request simulation system
* GCP terraform and parameter client refactor
* Generate synthetic requests at fixed rate
* grpc client worker to send requests at configurable QPS
* Integrating kv value server with the KeyFetcherManagerInterface
* Register get values hook for string and binary output format
* Run request simulation system in local
* Skip delta and snapshot files that belong to other shards
* Support writing shard mapping configs from csv
* Upgrade build-system to v0.33.0
* Upgrade data-plane-shared-libraries to 2023-07-12 commit.
* Upgrade data-plane-shared-libraries to 2023-07-21 commit.
* Upgrade data-plane-shared-libraries to 2023-07-26 commit.
* Upgrade data-plane-shared-libraries to 2023-08-16 commit.
* use local parameter client for gcp platform's local instance

### Bug Fixes

* Acquire read lock on the set before iterating over it.
* Add action_env for asan bazel config
* Add noexcept bazel config
* Add seccomp-unconfined flag to build_and_test_all_in_docker
* Check that fb strings are not nullptr.
* Check the metrics collector connection during telemetry initialization
* Do not pass metrics collector endpoint for local and aws instance
* Don't move references in sample udf code.
* Explicitly cast return values of set operations to r-value references
* fix another asan error in the test
* Fix data loading num threads in param client local test
* Fix grpc client error
* Fix the error messages printed in the unit test logs
* Fix UDF function handler name
* logMessage should set an output string.
* make the response outlive grpc client call
* Rearrange bazel config for clarity
* Reduce the number of client workers to 2 in the unit tests to limit the number of threads created
* remove GRPC 4mb payload limit
* remove local variant of component tools.
* Remove redundant docker security-opt
* Set bazel workspace name
* Write data record for set data in the delta test file generator

### Dependencies

* **deps:** Upgrade build-system to 0.42.1
* **deps:** Upgrade build-system to v0.41.1
* **deps:** Upgrade emscripten to 3.1.44

### GCP: Features

* **GCP:** Add realtime thread pool manager

### Documentation

* Add docs on getValuesBinary API
* Realtime directory is not optional for local dev
* Update docker run instructions to include security-opt flag
* Update inline WASM docs with instructions on how to test it
* Update screenshot of delta file

Bug: N/A
Change-Id: I82d6a3c2757f29c8c4ce878e04936639cedcd218
GitOrigin-RevId: 34dcc51f137f5349c8ad05c5738771f6a5fda548
  • Loading branch information
Privacy Sandbox Team authored and peiwenhu committed Sep 14, 2023
1 parent 28789be commit 522ad7a
Show file tree
Hide file tree
Showing 392 changed files with 17,057 additions and 2,564 deletions.
107 changes: 63 additions & 44 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,67 +1,86 @@
build --announce_rc
build --verbose_failures
build --client_env=CC=clang
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
build --copt=-Werror=return-type

# Broadly disable C++ Exceptions
# https://google.github.io/styleguide/cppguide.html#Exceptions
build --copt=-fno-exceptions
# Grant exceptions to some dependencies so they can use exceptions
build --per_file_copt=.*boost.*@-fexceptions
build --per_file_copt=.*cc/aws/proxy.*@-fexceptions
build --per_file_copt=.*cc/roma.*@-fexceptions
build --per_file_copt=.*oneTBB.*@-fexceptions

build -c opt
build --compilation_mode=opt
build --output_filter='^//((?!(third_party):).)*$'`
build --color=yes
build --@io_bazel_rules_docker//transitions:enable=false
build --workspace_status_command="bash tools/get_workspace_status"
build --copt=-Werror=thread-safety-analysis
build --config=clang
build --config=noexcept
# Disable some ROMA error checking
build --per_file_copt=.*sandboxed_api.*@-Wno-return-type

# Broadly disable C++ Exceptions
# https://google.github.io/styleguide/cppguide.html#Exceptions
build:noexcept --copt=-fno-exceptions
# Grant exceptions to some dependencies so they can use exceptions
build:noexcept --per_file_copt=.*boost.*@-fexceptions
build:noexcept --per_file_copt=.*cc/aws/proxy.*@-fexceptions
build:noexcept --per_file_copt=.*cc/roma.*@-fexceptions
build:noexcept --per_file_copt=.*oneTBB.*@-fexceptions
build:noexcept --per_file_copt=.*com_github_nghttp2_nghttp2.*@-fexceptions
build:noexcept --per_file_copt=.*cc/core.*@-fexceptions
build:noexcept --per_file_copt=.*cc/cpio.*@-fexceptions

test --test_output=errors
# Disable ICU linking for googleurl.
build --@com_google_googleurl//build_config:system_icu=0
build --@io_opentelemetry_cpp//api:with_abseil=true
# Required to build OpenTelemtry with logs API.
build --copt=-DENABLE_LOGS_PREVIEW

build:clang --cxxopt=-fbracket-depth=512
build:clang --client_env=CC=clang
build:clang --cxxopt=-std=c++17
build:clang --host_cxxopt=-std=c++17
build:clang --client_env=BAZEL_CXXOPTS=-std=c++17

# Required to run wasm_cc_binary
build:emscripten --incompatible_enable_cc_toolchain_resolution

# Required to use protos in wasm_cc_binary
build:emscripten --per_file_copt=.*zlib.*@-Wno-deprecated-non-prototype
build:emscripten --per_file_copt=.*utf8_range.*@-Wno-unused-function

# Address sanitizer
# To use it: bazel build --config asan
# Address sanitizer, set action_env to segregate cache entries
build:asan --action_env=PRIVACY_SANDBOX_SERVERS_ASAN=1
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
build:asan --compilation_mode=dbg
build:asan --copt=-fsanitize=address
build:asan --copt=-DADDRESS_SANITIZER
build:asan --copt=-O1
build:asan --copt=-g
build:asan --copt=-fno-omit-frame-pointer
build:asan --linkopt=-fsanitize=address
build:asan --linkopt=-fuse-ld=lld
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always

# Thread sanitizer
# bazel build --config tsan
# Thread sanitizer, set action_env to segregate cache entries
build:tsan --strip=never
build:tsan --copt -fsanitize=thread
build:tsan --copt -DTHREAD_SANITIZER
build:tsan --copt -DDYNAMIC_ANNOTATIONS_ENABLED=1
build:tsan --copt -DDYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1
build:tsan --copt -O1
build:tsan --copt -fno-omit-frame-pointer
build:tsan --linkopt -fsanitize=thread
build:tsan --copt=-fsanitize=thread
build:tsan --copt=-DTHREAD_SANITIZER
build:tsan --copt=-DDYNAMIC_ANNOTATIONS_ENABLED=1
build:tsan --copt=-DDYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1
build:tsan --copt=-O1
build:tsan --copt=-fno-omit-frame-pointer
build:tsan --linkopt=-fsanitize=thread

# --config msan: Memory sanitizer
# Memory sanitizer, set action_env to segregate cache entries
build:msan --strip=never
build:msan --copt -fsanitize=memory
build:msan --copt -DADDRESS_SANITIZER
build:msan --copt -O1
build:msan --copt -fno-omit-frame-pointer
build:msan --linkopt -fsanitize=memory
build:msan --copt=-fsanitize=memory
build:msan --copt=-DADDRESS_SANITIZER
build:msan --copt=-O1
build:msan --copt=-fno-omit-frame-pointer
build:msan --linkopt=-fsanitize=memory

# --config ubsan: Undefined Behavior Sanitizer
# Undefined Behavior sanitizer, set action_env to segregate cache entries
build:ubsan --strip=never
build:ubsan --copt -fsanitize=undefined
build:ubsan --copt -O1
build:ubsan --copt -fno-omit-frame-pointer
build:ubsan --linkopt -fsanitize=undefined
build:ubsan --linkopt -lubsan
build:ubsan --copt=-fsanitize=undefined
build:ubsan --copt=-O1
build:ubsan --copt=-fno-omit-frame-pointer
build:ubsan --linkopt:-fsanitize=undefined
build:ubsan --linkopt=-lubsan

# --config local_instance: builds the service to run with the instance=local flag
build:local_instance --//:instance=local
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Workflow for the OSSF Scorecards Action
# https://github.com/ossf/scorecard-action#installation

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '35 10 * * 4'
push:
branches:
- main

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: Checkout code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false

- name: Run analysis
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: Upload artifact
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#Backup files
*~

*.log
*.tar
*.eif
/dist/
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ repos:
exclude: '^(google_internal|builders/images)/.*$'

- repo: https://github.com/bufbuild/buf
rev: v1.23.1
rev: v1.26.1
hooks:
- id: buf-format

Expand Down Expand Up @@ -98,7 +98,7 @@ repos:
- terraform

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.0.3
hooks:
- id: prettier
types_or:
Expand All @@ -110,7 +110,7 @@ repos:
)$

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.8.1
rev: v0.9.2
hooks:
- id: markdownlint-cli2
name: lint markdown
Expand Down Expand Up @@ -145,7 +145,7 @@ repos:
- --quiet

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
name: black python formatter
74 changes: 16 additions & 58 deletions .versionrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,21 @@
],
"tagPrefix": "release-",
"types": [
{
"section": "API: Features",
"type": "feat",
"scope": "api"
},
{
"section": "API: Fixes",
"type": "fix",
"scope": "api"
},
{
"section": "Terraform",
"type": "feat",
"scope": "terraform"
},
{
"section": "Terraform",
"type": "fix",
"scope": "terraform"
},
{
"section": "Build Tools: Features",
"type": "feat",
"scope": "build"
},
{
"section": "Build Tools: Fixes",
"type": "fix",
"scope": "build"
},
{
"section": "Features",
"type": "feat"
},
{
"section": "Bug Fixes",
"type": "fix"
},
{
"section": "Documentation",
"type": "docs"
},
{
"hidden": true,
"type": "internal"
},
{
"hidden": true,
"type": "chore"
},
{
"hidden": true,
"type": "test"
},
{
"hidden": true,
"type": "refactor"
}
{ "type": "feat", "scope": "api", "section": "API: Features" },
{ "type": "fix", "scope": "api", "section": "API: Fixes" },
{ "type": "feat", "scope": "deps", "section": "Dependencies" },
{ "type": "feat", "scope": "terraform", "section": "Terraform" },
{ "type": "fix", "scope": "terraform", "section": "Terraform" },
{ "type": "feat", "scope": "GCP", "section": "GCP: Features" },
{ "type": "fix", "scope": "GCP", "section": "GCP: Fixes" },
{ "type": "feat", "scope": "build", "section": "Build Tools: Features" },
{ "type": "fix", "scope": "build", "section": "Build Tools: Fixes" },
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "docs", "section": "Documentation" },
{ "type": "internal", "hidden": true },
{ "type": "chore", "hidden": true },
{ "type": "test", "hidden": true },
{ "type": "refactor", "hidden": true }
]
}
23 changes: 22 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ string_flag(
build_setting_default = "aws",
values = [
"aws",
"gcp",
"local",
],
)
Expand All @@ -36,6 +37,14 @@ config_setting(
visibility = ["//visibility:private"],
)

config_setting(
name = "gcp_platform",
flag_values = {
":platform": "gcp",
},
visibility = ["//components/cloud_config:__pkg__"],
)

config_setting(
name = "local_platform",
flag_values = {
Expand All @@ -49,6 +58,7 @@ string_flag(
build_setting_default = "aws",
values = [
"aws",
"gcp",
"local",
],
)
Expand All @@ -61,12 +71,23 @@ config_setting(
visibility = ["//visibility:private"],
)

config_setting(
name = "gcp_instance",
flag_values = {
":instance": "gcp",
},
visibility = ["//visibility:private"],
)

config_setting(
name = "local_instance",
flag_values = {
":instance": "local",
},
visibility = ["//components/util:__pkg__"],
visibility = [
"//components/cloud_config:__pkg__",
"//components/util:__pkg__",
],
)

exports_files(
Expand Down
Loading

0 comments on commit 522ad7a

Please sign in to comment.