Skip to content

Commit

Permalink
Release 0.7.0 (2023-06-30)
Browse files Browse the repository at this point in the history
### Features

*  [AWS] add example terraform directory with README
* [GCP] add example terraform directory with README
* Add bazel build flag --announce_rc
* add build_flavor for AWS packaging
* add build_flavor for packaging
* include coordinator and attestation support for GCP
* Upgrade build-system to release-0.30.1

### Bug Fixes

* Adjust SFE DCHECKs
* bidding_service_test
* Change PeriodicCodeFetcher to use std::string instead of absl::string_view in the parameters
* refactor the test to share initialization
* remove unnecessary flags
* TEE<>TEE fix
* temporarily eliminate requirement to have device signals to generate bids

Bug: 280576012
Change-Id: I3e01b9e2872970105d6f27576b61e36c278edbc7
GitOrigin-RevId: fc4f950d441a6e0f5e0fb7e07365faf5bac07e0d
  • Loading branch information
Privacy Sandbox Team authored and xinggao01 committed Jun 30, 2023
1 parent be24955 commit f17d1c4
Show file tree
Hide file tree
Showing 183 changed files with 5,141 additions and 2,254 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build --announce_rc
build --verbose_failures
build --client_env=CC=clang
build --cxxopt=-std=c++17
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ repos:
name: terraform fmt
language: script
pass_filenames: false
entry: tools/terraform fmt -write=true -recursive production/deploy
entry: builders/tools/terraform fmt -write=true -recursive production/deploy
exclude: scp/
types_or:
- terraform
Expand Down
17 changes: 17 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,20 @@ EOF""",
local = True,
message = "copy bazel build and test logs",
)

string_flag(
name = "build_flavor",
build_setting_default = "prod",
values = [
"prod",
"non_prod",
],
)

config_setting(
name = "non_prod_build",
flag_values = {
":build_flavor": "non_prod",
},
visibility = ["//visibility:public"],
)
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## 0.7.0 (2023-06-30)


### Features

* [AWS] add example terraform directory with README
* [GCP] add example terraform directory with README
* Add bazel build flag --announce_rc
* add build_flavor for AWS packaging
* add build_flavor for packaging
* include coordinator and attestation support for GCP
* Upgrade build-system to release-0.30.1


### Bug Fixes

* Adjust SFE DCHECKs
* bidding_service_test
* Change PeriodicCodeFetcher to use std::string instead of absl::string_view in the parameters
* refactor the test to share initialization
* remove unnecessary flags
* TEE<>TEE fix
* temporarily eliminate requirement to have device signals to generate bids

## 0.6.0 (2023-06-23)


Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ python_deps("//builders/bazel")

http_archive(
name = "google_privacysandbox_servers_common",
sha256 = "b3f7e132e3bf0723de663248d016870b9b09e01a60b5620f76e962ed0e2b487a",
strip_prefix = "data-plane-shared-libraries-9479058e84e9e88f29da49a47023b8b765614517",
sha256 = "097d48cd1a6497fa03eba2b77bae5800dd9baf9001789700d7174fefe51f0089",
strip_prefix = "data-plane-shared-libraries-f99e750ced41df7818d4e1eb7d43aa1c8840d441",
urls = [
"https://github.com/privacysandbox/data-plane-shared-libraries/archive/9479058e84e9e88f29da49a47023b8b765614517.zip",
"https://github.com/privacysandbox/data-plane-shared-libraries/archive/f99e750ced41df7818d4e1eb7d43aa1c8840d441.zip",
],
)

Expand Down
40 changes: 0 additions & 40 deletions api/bidding_auction_servers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,6 @@ message SelectAdRequest {
// client integrity.
// Note: Not all types of clients can be attested.
ClientType client_type = 3;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
ProtectedAudienceInput raw_protected_audience_input = 4;
}

// SelectAdResponse is sent from the SellerFrontEndService to the Seller
Expand All @@ -368,11 +363,6 @@ message SelectAdResponse {
// Encrypted AuctionResult from FLEDGE auction. May contain a real candidate
// or chaff, depending on ScoreAd() outcomes.
bytes auction_result_ciphertext = 1;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
AuctionResult raw_response = 2;
}

// Context useful for logging and debugging requests.
Expand Down Expand Up @@ -450,11 +440,6 @@ message GetBidsRequest {
// needs use private keys corresponding to same key_id to decrypt
// 'request_ciphertext'.
string key_id = 2;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
GetBidsRawRequest raw_request = 3;
}

// Response to GetBidsRequest.
Expand All @@ -468,11 +453,6 @@ message GetBidsResponse {

// Encrypted GetBidsRawResponse.
bytes response_ciphertext = 1;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
GetBidsRawResponse raw_response = 2;
}

// Bid for an ad candidate.
Expand Down Expand Up @@ -637,11 +617,6 @@ message GenerateBidsRequest {
// needs use private keys corresponding to same key_id to decrypt
// 'request_ciphertext'.
string key_id = 2;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
GenerateBidsRawRequest raw_request = 3;
}

// Encrypted response to GenerateBidsRequest with bid prices corresponding
Expand All @@ -657,11 +632,6 @@ message GenerateBidsResponse {

// Encrypted GenerateBidsRawResponse.
bytes response_ciphertext = 1;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
GenerateBidsRawResponse raw_response = 2;
}

// Auction service operated by the seller.
Expand Down Expand Up @@ -787,11 +757,6 @@ message ScoreAdsRequest {
// needs use private keys corresponding to same key_id to decrypt
// 'request_ciphertext'.
bytes key_id = 2;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
ScoreAdsRawRequest raw_request = 3;
}

// Encrypted response that includes winning ad candidate.
Expand Down Expand Up @@ -895,11 +860,6 @@ message ScoreAdsResponse {

// Encrypted ScoreAdsRawResponse.
bytes response_ciphertext = 1;

// Remove.
// TODO(b/239242947): Remove this field and reserve, after request encryption / decryption is
// incorporated.
ScoreAdsRawResponse raw_response = 2;
}

// The reporting urls registered during the execution of reportResult() and
Expand Down
8 changes: 4 additions & 4 deletions builders/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
- id: shellcheck

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.3
rev: v16.0.4
hooks:
- id: clang-format
types_or:
Expand All @@ -65,7 +65,7 @@ repos:
name: addlicense
language: golang
additional_dependencies:
- github.com/google/addlicense@v1.1.0
- github.com/google/addlicense@v1.1.1
always_run: false
pass_filenames: true
entry: addlicense -v
Expand All @@ -76,7 +76,7 @@ repos:
name: addlicense check
language: golang
additional_dependencies:
- github.com/google/addlicense@v1.1.0
- github.com/google/addlicense@v1.1.1
always_run: false
pass_filenames: true
entry: addlicense -check
Expand Down Expand Up @@ -121,7 +121,7 @@ repos:
description: Format bazel WORKSPACE, BUILD and .bzl files with a standard convention.
language: golang
additional_dependencies:
- github.com/bazelbuild/buildtools/buildifier@5.1.0
- github.com/bazelbuild/buildtools/buildifier@6.1.1
always_run: true
pass_filenames: true
types_or:
Expand Down
38 changes: 38 additions & 0 deletions builders/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## 0.30.1 (2023-06-27)


### Bug Fixes

* Use = for --env flag
* Use = for --env flag for all tools

## 0.30.0 (2023-06-26)


### Features

* Install numpy for python3.9
* Set PYTHON_BIN_PATH/PYTHON_LIB_PATH in build-debian
* Upgrade AmazonLinux2 to 20230530
* Upgrade packer to v1.9.1


### Bug Fixes

* Add links for llvm-{cov,profdata}

## 0.29.0 (2023-06-05)


### Features

* Update pre-commit hook versions


### Bug Fixes

* Catch error when shifting multiple args
* Remove golang from test-tools image
* Resolve WORKSPACE using realpath
* Use correct exit code in --fast mode

## 0.28.0 (2023-05-24)


Expand Down
2 changes: 1 addition & 1 deletion builders/images/build-amazonlinux2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM amazonlinux:2.0.20230320.0
FROM amazonlinux:2.0.20230530.0

COPY /install_apps install_golang_apps install_go.sh generate_system_bazelrc .bazelversion /scripts/
COPY get_workspace_mount /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion builders/images/build-amazonlinux2/install_apps
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function install_misc() {
function install_packer() {
yum install -y "yum-utils-1.1.31*"
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
yum -y install "packer-1.8.5*"
yum -y install "packer-1.9.1*"
update-alternatives --install /usr/local/bin/packer packer /usr/bin/packer 100

/usr/local/bin/packer version
Expand Down
4 changes: 3 additions & 1 deletion builders/images/build-debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ RUN \
/scripts/install_golang_apps && \
rm -rf /scripts

ENV PATH="${PATH}:/usr/local/go/bin:/opt/bin"
ENV PATH="${PATH}:/usr/local/go/bin:/opt/bin" \
PYTHON_BIN_PATH="/opt/bin/python3" \
PYTHON_LIB_PATH="/usr/lib/python3.9"
22 changes: 18 additions & 4 deletions builders/images/build-debian/install_apps
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ while [[ $# -gt 0 ]]; do
case "$1" in
--locale)
INSTALL_LOCALE="$2"
shift 2
shift 2 || usage
;;
--verbose)
VERBOSE=1
Expand All @@ -42,6 +42,18 @@ function apt_update() {
apt-get --quiet -o 'Acquire::https::No-Cache=True' -o 'Acquire::http::No-Cache=True' update
}

function install_python() {
mkdir -p /opt/bin
update-alternatives --install /opt/bin/python3 python3 /usr/bin/python3.9 100
update-alternatives --install /opt/bin/python python /usr/bin/python3.9 100
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
/usr/bin/python3.9 /tmp/get-pip.py
rm -f /tmp/get-pip.py
/usr/bin/python3.9 -m pip --version
/usr/bin/python3.9 -m pip install \
"numpy~=1.25"
}

function install_misc() {
DEBIAN_FRONTEND=noninteractive apt-get --quiet install -y --no-install-recommends \
apt-transport-https="2.0.*" \
Expand All @@ -63,9 +75,7 @@ function install_misc() {
wget="1.20.*" \
xz-utils="5.2.*" \
zip="3.0-*"
mkdir -p /opt/bin
update-alternatives --install /opt/bin/python3 python3 /usr/bin/python3.9 100
update-alternatives --install /opt/bin/python python /usr/bin/python3.9 100
install_python
if [[ -n ${INSTALL_LOCALE} ]]; then
printf "\nSetting locale to: %s\n" "${INSTALL_LOCALE}"
locale-gen "${INSTALL_LOCALE}"
Expand All @@ -80,9 +90,13 @@ function install_clang() {
./llvm.sh ${clang_ver}
apt-get --quiet install -y --no-install-recommends libc++-${clang_ver}-dev
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${clang_ver} 100
update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${clang_ver} 100
update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-${clang_ver} 100
rm -f llvm.sh

clang --version
llvm-cov --version
llvm-profdata show --version
}

# Install Docker (https://docs.docker.com/engine/install/debian/)
Expand Down
11 changes: 8 additions & 3 deletions builders/images/test-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ WORKDIR /build
ADD https://github.com/shekyan/slowhttptest/archive/refs/tags/v1.9.0.tar.gz /build
RUN tar xz --strip-components 1 -f v1.9.0.tar.gz && ls -l && ./configure && make

FROM golang:1.19.4-alpine3.17 AS golang-1.19
FROM golang:1.19.4-alpine3.17 AS golang
ENV BUILD_ARCH="${TARGETARCH}" \
GOBIN=/usr/local/go/bin
COPY build_golang_apps /scripts/
RUN /scripts/build_golang_apps

FROM fullstorydev/grpcurl:v1.8.7 AS grpcurl
FROM alpine:3.17.2

COPY --from=golang-1.19 /usr/local/go/ /usr/local/go/
COPY --from=grpcurl /bin/grpcurl /usr/bin
COPY --from=golang /usr/local/go/bin/* /usr/local/bin/
COPY --from=grpcurl /bin/grpcurl /usr/local/bin/

ARG TARGETARCH
ENV BUILD_ARCH="${TARGETARCH}" \
Expand Down
16 changes: 16 additions & 0 deletions builders/images/test-tools/build_golang_apps
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/busybox sh

set -o errexit

install_ghz() {
go install github.com/bojand/ghz/cmd/ghz@v0.114.0
ghz --help
}

install_cassowary() {
go install github.com/rogerwelin/cassowary/cmd/cassowary@v0.16.0
cassowary --help
}

install_ghz
install_cassowary
Loading

0 comments on commit f17d1c4

Please sign in to comment.