Skip to content

Commit 26b17f9

Browse files
kelvintatendagorekorePrivacy Sandbox Team
authored andcommitted
Release 0.4.0 (privacysandbox#17)
### Features * Add //:buildifier rule as an alias to the pre-commit buildifier hook * Add a debugging endpoint for Binary Http GetValues. * Add aws-cli helper script * Add csv reader and writer * Add delta record reader based on riegeli stream io. * Add library for reading and writing delta files * Add utility for data generation (currently supports csv to delta and vice versa) * Add version info to server binaries * Determine workspace mount point from docker inspect if inside docker container * Display pre-commit error log if it exists * Implement API call to record lifecycle heartbeat. * Log bazel build flags during server startup runtime. * Overhaul building on amazonlinux2 * Repeating timer with callback implementation * Set working dir to current workspace-relative path in tools/terraform ### Bug Fixes * Add bazel rule to copy files to dist dir * Add builders/tools/normalize-dist to chmod/chgrp/chown dist/ directory tree * Add fetch git tags from remote prior to syncing repos * Add files to subject to chown and chgrp * Adjust chown/chgrp to be silent * Adopt shellcheck * Clean bazel_root for smaller docker image * Correct the WORKSPACE path in production/packaging/aws/build_and_test * Correct variable used to check for valid repo name * Drop packer from build-debian image * Fix a typo and improve some logging for DataOrchestrator's loading * Improve cbuild help text * Improve git push message to accommodate patch branches * Increase SQS cleanup lamabda timeout * Modifications as indicated by shellcheck * Modify build and packaging for AWS SQS Lambda * Move definition from header to cc to eliminate linker error * Only propagate AWS env vars into amazonlinux2 build container * pre-commit CLEANUP should default to zero * Print pre-commit version rather than help * Print timestamps in UTC timezone * Remove container when get-architecture exits * Remove duplicate text "instance:" in build flavor * Remove shellcheck from build-debian * Remove unused nitro_enclave_image bazel rule * Set bazel output_user_root in image bazelrc * Set locale in build-debian * Strip commit hashes from CHANGELOG.md * Switch from hardcoded arch to using dpkg --print-architecture * Update author name * Update pre-commit to use cbuild * Use --with-ami flag to determine bazel flags instance/platform * Use default health check grace priod (300s) now that we have heartbeats. * Use git rather than bazel to determine workspace root * Use PRE_COMMIT_TOOL env var ### Build System * Add arch to docker image tags * Add get_builder_image_tagged tool to determine a content-based tag * Add get-architecture helper script * Propagate status code in exit functions ### Documentation * Correct command to load docker image locally * Instructions to make changes to a dependency * Sugggest use of python virtualenv * Use concise form of passing env vars into docker container Change-Id: Id86dbad94962a2b3c3f53c870f18c0b546c1725b GitOrigin-RevId: f46fc5f2a70f81309a5733c5185d192f645863a7 Co-authored-by: Privacy Sandbox Team <[email protected]>
1 parent e0d1445 commit 26b17f9

File tree

143 files changed

+5447
-1643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+5447
-1643
lines changed

.bazelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ build --verbose_failures
22
build --client_env=CC=clang
33
build --cxxopt=-std=c++17
44
build --copt=-Werror=return-type
5-
build --copt=-Werror=unused-result
65
build -c opt
76
build --color=yes
7+
build --@io_bazel_rules_docker//transitions:enable=false
8+
build --workspace_status_command="bash tools/get_workspace_status"
89

910
test --test_output=errors
11+
# Disable ICU linking for googleurl.
12+
build --@com_google_googleurl//build_config:system_icu=0

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@
1414
*.eif
1515
/dist/
1616
__pycache__/
17+
18+
# Hedron's Compile Commands Extractor for Bazel
19+
# https://github.com/hedronvision/bazel-compile-commands-extractor
20+
/external
21+
/compile_commands.json
22+
/.cache/

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ repos:
4747
exclude: '^google_internal/.*/kokoro_(presubmit|continuous).sh$'
4848
- id: script-must-have-extension
4949
- id: require-ascii
50+
- id: shellcheck
51+
exclude: '^(production|tools|google_internal|builders/test|builders/release|builders/build-debian|builders/build-amazonlinux2)/.*$'
5052

5153
- repo: https://github.com/pre-commit/mirrors-clang-format
5254
rev: v14.0.6

BUILD

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,24 @@ EOF""",
103103
executable = True,
104104
local = True,
105105
)
106+
107+
genrule(
108+
name = "buildifier",
109+
outs = ["run_buildifier.bin"],
110+
cmd = """cat << EOF > '$@'
111+
tools/pre-commit buildifier
112+
EOF""",
113+
executable = True,
114+
local = True,
115+
)
116+
117+
genrule(
118+
name = "collect-logs",
119+
outs = ["collect_logs.bin"],
120+
cmd_bash = """cat << EOF > '$@'
121+
tools/collect-logs
122+
EOF""",
123+
executable = True,
124+
local = True,
125+
message = "copy bazel build and test logs",
126+
)

CHANGELOG.md

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,81 @@
22

33
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.
44

5-
### [0.3.2](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.3.1...release-0.3.2) (2022-09-20)
5+
## [0.4.0](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.3.0...release-0.4.0) (2022-10-11)
6+
7+
8+
### Features
9+
10+
* Add //:buildifier rule as an alias to the pre-commit buildifier hook
11+
* Add a debugging endpoint for Binary Http GetValues.
12+
* Add aws-cli helper script
13+
* Add csv reader and writer
14+
* Add delta record reader based on riegeli stream io.
15+
* Add library for reading and writing delta files
16+
* Add utility for data generation (currently supports csv to delta and vice versa)
17+
* Add version info to server binaries
18+
* Determine workspace mount point from docker inspect if inside docker container
19+
* Display pre-commit error log if it exists
20+
* Implement API call to record lifecycle heartbeat.
21+
* Log bazel build flags during server startup runtime.
22+
* Overhaul building on amazonlinux2
23+
* Repeating timer with callback implementation
24+
* Set working dir to current workspace-relative path in tools/terraform
625

726

827
### Bug Fixes
928

29+
* Add bazel rule to copy files to dist dir
30+
* Add builders/tools/normalize-dist to chmod/chgrp/chown dist/ directory tree
31+
* Add fetch git tags from remote prior to syncing repos
32+
* Add files to subject to chown and chgrp
33+
* Adjust chown/chgrp to be silent
34+
* Adopt shellcheck
35+
* Clean bazel_root for smaller docker image
36+
* Correct the WORKSPACE path in production/packaging/aws/build_and_test
37+
* Correct variable used to check for valid repo name
38+
* Drop packer from build-debian image
39+
* Fix a typo and improve some logging for DataOrchestrator's loading
40+
* Improve cbuild help text
41+
* Improve git push message to accommodate patch branches
42+
* Increase SQS cleanup lamabda timeout
43+
* Modifications as indicated by shellcheck
44+
* Modify build and packaging for AWS SQS Lambda
45+
* Move definition from header to cc to eliminate linker error
46+
* Only propagate AWS env vars into amazonlinux2 build container
47+
* pre-commit CLEANUP should default to zero
48+
* Print pre-commit version rather than help
49+
* Print timestamps in UTC timezone
50+
* Remove container when get-architecture exits
51+
* Remove duplicate text "instance:" in build flavor
52+
* Remove shellcheck from build-debian
53+
* Remove unused nitro_enclave_image bazel rule
54+
* Set bazel output_user_root in image bazelrc
55+
* Set locale in build-debian
1056
* Strip commit hashes from CHANGELOG.md
57+
* Switch from hardcoded arch to using dpkg --print-architecture
58+
* Update author name
59+
* Update pre-commit to use cbuild
60+
* Use --with-ami flag to determine bazel flags instance/platform
61+
* Use default health check grace priod (300s) now that we have heartbeats.
62+
* Use git rather than bazel to determine workspace root
63+
* Use PRE_COMMIT_TOOL env var
1164

12-
### [0.3.1](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.3.0...release-0.3.1) (2022-09-20)
1365

66+
### Build System
1467

15-
### Bug Fixes
68+
* Add arch to docker image tags
69+
* Add get_builder_image_tagged tool to determine a content-based tag
70+
* Add get-architecture helper script
71+
* Propagate status code in exit functions
1672

17-
* Modify build and packaging for AWS SQS Lambda
73+
74+
### Documentation
75+
76+
* Correct command to load docker image locally
77+
* Instructions to make changes to a dependency
78+
* Sugggest use of python virtualenv
79+
* Use concise form of passing env vars into docker container
1880

1981
## [0.3.0](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.2.0...release-0.3.0) (2022-09-14)
2082

WORKSPACE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
1313

1414
bazel_skylib_workspace()
1515

16+
http_archive(
17+
name = "com_google_protobuf",
18+
sha256 = "8b28fdd45bab62d15db232ec404248901842e5340299a57765e48abe8a80d930", # Last updated 2022-05-18
19+
strip_prefix = "protobuf-3.20.1",
20+
urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.20.1.tar.gz"],
21+
)
22+
1623
http_archive(
1724
name = "io_bazel_rules_go",
1825
sha256 = "16e9fca53ed6bd4ff4ad76facc9b7b651a89db1689a2877d6fd7b82aa824e366",
@@ -120,3 +127,11 @@ container_deps()
120127
load("//third_party:cpp_repositories.bzl", "cpp_repositories")
121128

122129
cpp_repositories()
130+
131+
load("//third_party:quiche.bzl", "quiche_dependencies")
132+
133+
quiche_dependencies()
134+
135+
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
136+
137+
protobuf_deps()

builders/amazonlinux2/BUILD

Lines changed: 0 additions & 78 deletions
This file was deleted.

builders/amazonlinux2/generate_nitro.sh.tpl

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)