Skip to content

Commit

Permalink
Release 3.5.0 (2024-04-24)
Browse files Browse the repository at this point in the history
### Features

* Ignore unknown fields in the generateBid response
* Add buyer_reporting_id to SelectAdResponse
* Add support for buyerReportingId in reportWin()
* Set buyer_reporting_id in ScoreAdsRequest
* Set buyerReportingId in AdWithBid
* Add API changes in GenerateBidRespose and ScoreAdsRequest to support BuyerReportingId
* Add API and schema changes for buyerReportingId and buyerAndSellerReportingId
* Add runtime check for correct inference backend version
* Adds debug info to secure invoke response
* Adds implementation of GetComponentAuctionCiphertexts API
* Adds optional flag to configure cloud platforms for component sellers
* allow AWS Session Manager instance connection
* enable bucket fetching for score ad
* Enables and adds tests for GetComponentAuctionsCiphertexts API
* Enables Top Level Auctions feature
* Implement Support for Bid Currency in Reporting
* Set Seller Rejection Reason on AdWithBid for Mismatch with Expected Buyer Currency
* Set Seller Rejection Reasons on AdScore for currency-related rejectons
* Support inference runtime configurations
* Support Interest Group Origin in InterestGroup and AuctionResponse
* Top Level auction does not accept multiple results from same seller
* upload aws/gcp hashes as artifacts on release

### Bug Fixes

* Correct check condition in inference main
* Increase the gRPC recv message limit for the inference sidecar
* Pass complete ad object to scoreAd
* Remove redundant clang-tidy repo, move config to .clang-tidy
* RPC is finished properly in top level auction with reporting
* Temporarily add bazel_clang_tidy repo

Bug: N/A
GitOrigin-RevId: a6fd28f9705ab9e29799d472434f641445971c58
Change-Id: I5939f89c962ad1b263659381d544cfde37c2d472
  • Loading branch information
akundla-google committed Apr 24, 2024
1 parent 64cf212 commit 872865a
Show file tree
Hide file tree
Showing 199 changed files with 5,217 additions and 1,474 deletions.
19 changes: 16 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ exclude: (?x)^(
services/inference_sidecar/common/builders/.*|
services/inference_sidecar/modules/pytorch_v2_1_1/builders/.*|
services/inference_sidecar/modules/tensorflow_v2_14_0/builders/.*|
testing/functionaltest-system/.*
testing/functionaltest-system/.*|
google_internal/kokoro/key/.*
)$

fail_fast: false
Expand Down Expand Up @@ -118,6 +119,18 @@ repos:
types: [ "dockerfile" ]
entry: builders/tools/hadolint

- id: ps_vlog_123
name: Don't use PS_VLOG(0/1/2/3)
entry: sh -c '! grep -RE "PS_VLOG[(][01][,)]" services/'
language: system
types_or:
- c++
- c
pass_filenames: false
always_run: false
fail_fast: false
verbose: true

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
Expand All @@ -127,8 +140,8 @@ repos:
- markdown
exclude: (?x)^(
testing/functional/suts/inference/data/seller-auction-service/scoreAd\.js|
testing/functional/suts/basic/data/seller-auction-service/scoreAd\.js|
testing/functional/suts/basic/data/buyer-bidding-service/generateBid\.js|
testing/functional/suts/.*/data/seller-auction-service/scoreAd\.js|
testing/functional/suts/.*/data/buyer-bidding-service/generateBid\.js|
testing/functional/suts/.*/.*\.reply\.json
)$

Expand Down
9 changes: 0 additions & 9 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,6 @@ string_flag(
],
)

config_setting(
name = "inference",
flag_values = {
":inference_build": "yes",
},
visibility = ["//visibility:public"],
)

string_flag(
name = "inference_runtime",
build_setting_default = "noop",
Expand All @@ -203,7 +195,6 @@ string_flag(
config_setting(
name = "inference_noop",
flag_values = {
":inference_build": "yes",
":inference_runtime": "noop",
},
visibility = ["//visibility:public"],
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

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.

## 3.5.0 (2024-04-24)


### Features

* Add runtime check for correct inference backend version
* Adds debug info to secure invoke response
* Adds implementation of GetComponentAuctionCiphertexts API
* Adds optional flag to configure cloud platforms for component sellers
* allow AWS Session Manager instance connection
* enable bucket fetching for score ad
* Enables and adds tests for GetComponentAuctionsCiphertexts API
* Enables Top Level Auctions feature
* Implement Support for Bid Currency in Reporting
* Set Seller Rejection Reason on AdWithBid for Mismatch with Expected Buyer Currency
* Set Seller Rejection Reasons on AdScore for currency-related rejectons
* Support inference runtime configurations
* Support Interest Group Origin in InterestGroup and AuctionResponse
* Top Level auction does not accept multiple results from same seller
* upload aws/gcp hashes as artifacts on release


### Bug Fixes

* Correct check condition in inference main
* Increase the gRPC recv message limit for the inference sidecar
* Pass complete ad object to scoreAd
* Remove redundant clang-tidy repo, move config to .clang-tidy
* RPC is finished properly in top level auction with reporting
* Temporarily add bazel_clang_tidy repo

## 3.4.0 (2024-04-02)


Expand Down
39 changes: 18 additions & 21 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ http_archive(

python_deps("//builders/bazel")

# TODO: Remove bazel_clang_tidy once we sync to the common repo commit 9edb0c3 (4/3/2024) or later
http_archive(
name = "bazel_clang_tidy",
sha256 = "352aeb57ad7ed53ff6e02344885de426421fb6fd7a3890b04d14768d759eb598",
strip_prefix = "bazel_clang_tidy-4884c32e09c1ea9ac96b3f08c3004f3ac4c3fe39",
urls = [
"https://github.com/erenon/bazel_clang_tidy/archive/4884c32e09c1ea9ac96b3f08c3004f3ac4c3fe39.zip",
],
)

http_archive(
name = "google_privacysandbox_servers_common",
# 2024-04-01
sha256 = "e36cc26c917ec4b1066a32777b48ac8728ba13c276cdda2e91c36ad2037d9bcd",
strip_prefix = "data-plane-shared-libraries-1fbac466b6b88e00a4ca037f7359ee1942ade13e",
# 2024-04-19
sha256 = "ac5dd014d81cdc76e86cdaf8b584d5ee8494453315dc986860eb1e60f424a668",
strip_prefix = "data-plane-shared-libraries-4b1e6744cf3e46efee0cf29d886b22fe93274c79",
urls = [
"https://github.com/privacysandbox/data-plane-shared-libraries/archive/1fbac466b6b88e00a4ca037f7359ee1942ade13e.zip",
"https://github.com/privacysandbox/data-plane-shared-libraries/archive/4b1e6744cf3e46efee0cf29d886b22fe93274c79.zip",
],
)

Expand Down Expand Up @@ -75,11 +85,11 @@ http_archive(

http_archive(
name = "service_value_key_fledge_privacysandbox",
# commit af184d649be5d9f0a62738db41ed1496de427bcd 2024-03-15
sha256 = "",
strip_prefix = "protected-auction-key-value-service-af184d649be5d9f0a62738db41ed1496de427bcd",
# commit 89f678982d5cc1bcfde354980ed9380239f54b96 2024-03-22
sha256 = "dfa9da5e5b2b71aa706781e1edc0c6f4e752d4ebf30f82624f711e776553fbe2",
strip_prefix = "protected-auction-key-value-service-89f678982d5cc1bcfde354980ed9380239f54b96",
urls = [
"https://github.com/privacysandbox/protected-auction-key-value-service/archive/af184d649be5d9f0a62738db41ed1496de427bcd.zip",
"https://github.com/privacysandbox/protected-auction-key-value-service/archive/89f678982d5cc1bcfde354980ed9380239f54b96.zip",
],
)

Expand Down Expand Up @@ -116,16 +126,3 @@ local_repository(
name = "tensorflow_v2_14_0",
path = "services/inference_sidecar/modules/tensorflow_v2_14_0",
)

# TODO: Remove this once we sync to the common repo version that includes this
# as a dependecy.
http_archive(
name = "bazel_clang_tidy",
patch_args = ["-p1"],
patches = ["//third_party:bazel_clang_tidy.patch"],
sha256 = "352aeb57ad7ed53ff6e02344885de426421fb6fd7a3890b04d14768d759eb598",
strip_prefix = "bazel_clang_tidy-4884c32e09c1ea9ac96b3f08c3004f3ac4c3fe39",
urls = [
"https://github.com/erenon/bazel_clang_tidy/archive/4884c32e09c1ea9ac96b3f08c3004f3ac4c3fe39.zip",
],
)
68 changes: 58 additions & 10 deletions api/bidding_auction_servers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ message AuctionResult {

// This is only populated for component auctions.
AuctionParams auction_params = 18;

// BuyerReportingId of the winning Ad.
// This will be verified with the buyerReportingId in the Ad properties on
// the browser.
string buyer_reporting_id = 19;

// BuyerAndSellerReportingId of the winning Ad.
// This will be verified with the buyerAndSellerReportingId in the Ad
// properties on the browser.
string buyer_and_seller_reporting_id = 20;
}

message GetComponentAuctionCiphertextsRequest {
Expand Down Expand Up @@ -713,8 +723,8 @@ message GetBidsResponse {
// Bid for an ad candidate.
message AdWithBid {
// Metadata of the ad, this will be passed to Seller's scoring function.
// Represents a serialized string that is deserialized to a JSON object
// before passing to Adtech script.
// Represents an opaque object that is eventually passed to seller Adtech
// script.
// Note: API will be updated separately for Component Ads.
google.protobuf.Value ad = 1;

Expand Down Expand Up @@ -752,6 +762,9 @@ message AdWithBid {

// Indicates the currency used for the bid price (expressed as ISO 4217 alpha code).
string bid_currency = 10;

// Optional. buyerReportingId set in buyerReportingMetadata of reportWin()
string buyer_reporting_id = 11;
}

// Bidding service operated by buyer.
Expand Down Expand Up @@ -989,12 +1002,17 @@ message ProtectedAppSignalsAdWithBid {
// Indicates the currency used for the bid price.
string bid_currency = 6;

// Holds schema version as well as features related information that needs
// to be send back to the buyer who has the winning bid.
bytes egress_features = 7;
reserved 7;

// Optional field for debug report URLs.
DebugReportUrls debug_report_urls = 8;

// Holds schema version as well as features related information that needs
// to be send back to the buyer who has the winning bid.
string egress_payload = 9;

// Temporary unlimited size egress features. Meant for experimentation only.
string temporary_unlimited_egress_payload = 10;
}

// Encrypted response to GenerateProtectedAppSignalsBidsRequest with bid prices
Expand Down Expand Up @@ -1032,8 +1050,7 @@ message ScoreAdsRequest {
// Bid for an ad along with other information required to score the ad.
message AdWithBidMetadata {
// Metadata of the ad, this will be passed to Seller's scoring function.
// Represents a serialized string that is deserialized to a JSON object
// before passing to Adtech script.
// Represents an opaque ad metadata object.
google.protobuf.Value ad = 1;

// Bid price corresponding to an ad.
Expand Down Expand Up @@ -1081,6 +1098,13 @@ message ScoreAdsRequest {

// Indicates the currency used for the bid price (expressed as ISO 4217 alpha code).
string bid_currency = 12;

// Creator of the IG to which the winning ad belongs (applicable for
// Protected Audience only).
string interest_group_origin = 13;

// Optional. buyerReportingId set in buyerReportingMetadata of reportWin()
string buyer_reporting_id = 14;
}
// Ad with bid.
repeated AdWithBidMetadata ad_bids = 1;
Expand Down Expand Up @@ -1161,15 +1185,21 @@ message ScoreAdsRequest {
// performed stochastically.
double ad_cost = 5;

// Features to be sent back to the buyer of winning app install ad to help
// train their models.
bytes egress_features = 6;
reserved 6;

// Domain of Buyer who owns app signals used for this ad.
string owner = 7;

// Indicates the currency used for the bid price.
string bid_currency = 8;

// Features to be sent back to the buyer of winning app install ad to help
// train their models.
string egress_payload = 9;

// Temporary unlimited size egress features. Meant for experimentation
// only.
string temporary_unlimited_egress_payload = 10;
}

// Ad with bid for protected app signals.
Expand Down Expand Up @@ -1326,6 +1356,24 @@ message ScoreAdsResponse {
// If the seller specified a seller_currency in the AuctionConfig,
// this value, if specified, must match it. If not, the bid is rejected.
string bid_currency = 16;

// Currency of the of the original buyer bid if present
// (expressed as ISO 4217 alpha code).
// Not expected to be set in output from scoreAd();
// B&A will set this interally from the AdWithBid.
string buyer_bid_currency = 17;
// BuyerReportingId of the winning Ad.
// This will be verified with the buyerReportingId in the Ad properties on
// the browser.
string buyer_reporting_id = 18;
// BuyerAnd SellerReportingId of the winning Ad.
// This will be verified with the buyerAndSellerReportingId in the Ad
// properties on the browser.
string buyer_and_seller_reporting_id = 19;

// Owner of the IG to which the winning ad belongs (applicable for
// Protected Audience only).
string interest_group_origin = 20;
}

// The response includes the top scored ad along with other related data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module "seller" {
AUCTION_SERVER_HOST = "" # Example: "dns:///auction.seller-frontend.com:443"
KEY_VALUE_SIGNALS_HOST = "" # Example: "https://pubads.g.doubleclick.net/td/sts"
BUYER_SERVER_HOSTS = "" # Example: "{ \"https://bid1.com\": { \"url\": \"dns:///bidding1.com:443\", \"cloudPlatform\": \"AWS\" } }"
SELLER_CLOUD_PLATFORMS_MAP = "" # Example: "{ \"https://partner-seller1.com\": "GCP", \"https://partner-seller2.com\": "AWS"}"
ENABLE_SELLER_FRONTEND_BENCHMARKING = "" # Example: "false"
ENABLE_AUCTION_COMPRESSION = "" # Example: "false"
ENABLE_BUYER_COMPRESSION = "" # Example: "false"
Expand All @@ -76,6 +77,7 @@ module "seller" {
TEST_MODE = "" # Example: "false"
SELLER_CODE_FETCH_CONFIG = "" # Example:
# "{
# "fetchMode": 0,
# "auctionJsPath": "",
# "auctionJsUrl": "https://example.com/scoreAd.js",
# "urlFetchPeriodMs": 13000000,
Expand Down
2 changes: 2 additions & 0 deletions production/deploy/aws/terraform/modules/buyer/service_vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ variable "vpc_interface_endpoint_services" {
default = [
"ec2",
"ssm",
"ec2messages",
"ssmmessages",
"autoscaling",
"monitoring",
"xray",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ variable "vpc_interface_endpoint_services" {
default = [
"ec2",
"ssm",
"ec2messages",
"ssmmessages",
"autoscaling",
"monitoring",
"xray",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ resource "aws_iam_role_policy_attachment" "instance_role_policy_attachment" {
role = var.server_instance_role_name
}

resource "aws_iam_role_policy_attachment" "ssm_instance_role_attachment" {
role = var.server_instance_role_name
policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}

# Set up policies for using EC2 instance connect.
data "aws_iam_policy_document" "ssh_instance_policy_doc" {
statement {
Expand Down
Loading

0 comments on commit 872865a

Please sign in to comment.