Skip to content

Commit

Permalink
Release 0.5.0 (#21)
Browse files Browse the repository at this point in the history
### Features

* Add basic smoke test
* Add builders/utils docker image
* Add hadolint to lint Dockerfiles
* Add toolchain short hash to bazel output_user_root path
* Add tools/lib/builder.sh
* Add utils for working with snapshot files.
* Adopt build-system release-0.2.0
* Allow AMI building to specify AWS region.
* Bump debian runtime to stable-20221004-slim
* Rename nitro_artifacts to aws_artifacts
* Set BUILD_ARCH env var in docker images
* Simplify use of --with-ami flag
* Tag small tests
* Upgrade build-debian to python3.9
* Upgrade to build-system 0.3.1
* Upgrade to build-system 0.4.3
* Upgrade to build-system 0.4.4
* Upgrade to clang v14 on bazel-debian

### Bug Fixes

* Add get_workspace_mount function to encapsulate code block
* Allow server script to accept any flags
* Avoid installing recommended debian packages
* Copy get_values_descriptor_set.pb to dist dir
* Correct shell quoting
* Correct workspace volume when tools/terraform is executed in a nested container
* Execute tests prior to copy_to_dist
* Guess user/group for files when running container as root bazel
* Ignore InvalidArgument error on completing lifecycle hook.
* include a backoff on errors to long poll 'push' notifications.
* Invoke addlicense for all text files
* Invoke unzip via utils image
* Migrate duration code into KV server.
* Minor improvements to shell scripts
* Modify normalize-dist to use builder::id function
* Mount $HOME/aws in aws-cli container
* Move builder-related configs to builders/etc
* Move WORKSPACE definition to cbuild script global
* multi-region support for sqs_lambda
* Propagate AWS env vars and $HOME/.aws into terraform container
* Propagate gcloud stderr
* Reduce noise from tools/collect-logs
* Remove build timestamp to afford stability of binary
* Remove debugging statement
* Remove docker flags -i and -t
* Remove dockerfile linter ignore and correct ENTRYPOINT
* Remove pre-commit config from build-debian
* Rename bazel image name debian-slim to runtime-debian
* Set architecture in container_image declaration
* Set bazel output_base to accommodate distinct workspaces
* Set WORKSPACE variable
* Support regions outside us-east-1
* unzip should overwrite files
* Update gazelle to v0.28.0
* Upgrade bazel-skylib to 1.3.0
* Upgrade rules_pkg to 0.8.0
* Use builder library functions

### Documentation

* Add error handling guidelines.
* Add submodule instructions
* Fix build command
* fix typo in aws doc
* recommend the use of native AWS CLI in documentation
* Remove an unnecessary step in server doc

Bug: 259086550
Change-Id: I32e29819d8f2b44ea4c03bb321d6210eb73d3137
GitOrigin-RevId: 74883e809ec655a5faf6f552f4bbf233431b7399

Co-authored-by: Privacy Sandbox Team <noreply@google.com>
  • Loading branch information
pmeric and Privacy Sandbox Team committed Nov 30, 2022
1 parent 26b17f9 commit a79d0b3
Show file tree
Hide file tree
Showing 158 changed files with 4,455 additions and 850 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
33 changes: 0 additions & 33 deletions .clang-format

This file was deleted.

1 change: 1 addition & 0 deletions .clang-format
1 change: 1 addition & 0 deletions .hadolint.yaml
29 changes: 0 additions & 29 deletions .markdownlint-cli2.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .markdownlint-cli2.yaml
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# See https://pre-commit.com/hooks.html for more hooks
exclude: (?x)^(
bazel-(bin|out|testlogs|workspace)/.*|
google_internal/coordinator_environments/.*$|
.bazel_output/.*|
version.txt
)$
Expand Down Expand Up @@ -48,7 +49,7 @@ repos:
- id: script-must-have-extension
- id: require-ascii
- id: shellcheck
exclude: '^(production|tools|google_internal|builders/test|builders/release|builders/build-debian|builders/build-amazonlinux2)/.*$'
exclude: '^(production|tools|google_internal|builders/images)/.*$'

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
Expand All @@ -69,9 +70,7 @@ repos:
pass_filenames: true
entry: addlicense -v
types_or:
- c++
- c
- terraform
- text

- id: addlicense-check
name: addlicense check
Expand All @@ -82,15 +81,14 @@ repos:
pass_filenames: true
entry: addlicense -check
types_or:
- c++
- c
- terraform
- text

- id: terraform-fmt
name: terraform fmt
description: Run terraform via docker to format Terraform files
language: script
pass_filenames: false
entry: tools/terraform fmt -write=true -recursive
entry: tools/terraform fmt -write=true -recursive production/terraform
types_or:
- terraform

Expand Down
11 changes: 0 additions & 11 deletions .prettierrc.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.yaml
27 changes: 0 additions & 27 deletions .versionrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .versionrc.json
31 changes: 3 additions & 28 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
load("@rules_python//python:defs.bzl", "py_runtime")

package(default_visibility = ["//:__subpackages__"])

Expand Down Expand Up @@ -61,34 +59,11 @@ exports_files(
[".bazelversion"],
)

# define the python3 runtime.
# this path must exist in the bazel build environment ie. the build container images must install python3.8 in this path
PY3_PATH = "/usr/bin/python3.8"

py_runtime(
name = "py_runtime",
interpreter_path = PY3_PATH,
python_version = "PY3",
visibility = ["//visibility:public"],
)

py_runtime_pair(
name = "py_runtime_pair",
py2_runtime = None,
py3_runtime = ":py_runtime",
)

toolchain(
name = "py_toolchain",
toolchain = ":py_runtime_pair",
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
)

genrule(
name = "update-deps",
outs = ["update_deps.bin"],
cmd = """cat << EOF > '$@'
tools/pre-commit autoupdate
builders/tools/pre-commit autoupdate
EOF""",
executable = True,
local = True,
Expand All @@ -98,7 +73,7 @@ genrule(
name = "precommit-hooks",
outs = ["run_precommit_hooks.bin"],
cmd = """cat << EOF > '$@'
tools/pre-commit
builders/tools/pre-commit
EOF""",
executable = True,
local = True,
Expand All @@ -108,7 +83,7 @@ genrule(
name = "buildifier",
outs = ["run_buildifier.bin"],
cmd = """cat << EOF > '$@'
tools/pre-commit buildifier
builders/tools/pre-commit buildifier
EOF""",
executable = True,
local = True,
Expand Down
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,81 @@

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.5.0](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.4.0...release-0.5.0) (2022-11-28)


### Features

* Add basic smoke test
* Add builders/utils docker image
* Add hadolint to lint Dockerfiles
* Add toolchain short hash to bazel output_user_root path
* Add tools/lib/builder.sh
* Add utils for working with snapshot files.
* Adopt build-system release-0.2.0
* Allow AMI building to specify AWS region.
* Bump debian runtime to stable-20221004-slim
* Rename nitro_artifacts to aws_artifacts
* Set BUILD_ARCH env var in docker images
* Simplify use of --with-ami flag
* Tag small tests
* Upgrade build-debian to python3.9
* Upgrade to build-system 0.3.1
* Upgrade to build-system 0.4.3
* Upgrade to build-system 0.4.4
* Upgrade to clang v14 on bazel-debian


### Bug Fixes

* Add get_workspace_mount function to encapsulate code block
* Allow server script to accept any flags
* Avoid installing recommended debian packages
* Copy get_values_descriptor_set.pb to dist dir
* Correct shell quoting
* Correct workspace volume when tools/terraform is executed in a nested container
* Execute tests prior to copy_to_dist
* Guess user/group for files when running container as root bazel
* Ignore InvalidArgument error on completing lifecycle hook.
* include a backoff on errors to long poll 'push' notifications.
* Invoke addlicense for all text files
* Invoke unzip via utils image
* Migrate duration code into KV server.
* Minor improvements to shell scripts
* Modify normalize-dist to use builder::id function
* Mount $HOME/aws in aws-cli container
* Move builder-related configs to builders/etc
* Move WORKSPACE definition to cbuild script global
* multi-region support for sqs_lambda
* Propagate AWS env vars and $HOME/.aws into terraform container
* Propagate gcloud stderr
* Reduce noise from tools/collect-logs
* Remove build timestamp to afford stability of binary
* Remove debugging statement
* Remove docker flags -i and -t
* Remove dockerfile linter ignore and correct ENTRYPOINT
* Remove pre-commit config from build-debian
* Rename bazel image name debian-slim to runtime-debian
* Set architecture in container_image declaration
* Set bazel output_base to accommodate distinct workspaces
* Set WORKSPACE variable
* Support regions outside us-east-1
* unzip should overwrite files
* Update gazelle to v0.28.0
* Upgrade bazel-skylib to 1.3.0
* Upgrade rules_pkg to 0.8.0
* Use builder library functions


### Documentation

* Add error handling guidelines.
* Add submodule instructions
* Fix build command
* fix typo in aws doc
* recommend the use of native AWS CLI in documentation
* Remove an unnecessary step in server doc

## [0.4.0](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.3.0...release-0.4.0) (2022-10-11)


Expand Down
26 changes: 12 additions & 14 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "bazel_skylib",
sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
],
)

Expand All @@ -29,23 +29,21 @@ http_archive(
],
)

### register Python toolchain -- note this toolchain defines the path to a specific version of python
register_toolchains(
"//:py_toolchain",
)
load("//builders/bazel:deps.bzl", "python_deps")

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
python_deps("//builders/bazel")

http_archive(
name = "bazel_gazelle",
sha256 = "501deb3d5695ab658e82f6f6f549ba681ea3ca2a5fb7911154b5aa45596183fa",
sha256 = "448e37e0dbf61d6fa8f00aaa12d191745e14f07c31cabfa731f0c8e8a4f41b97",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.28.0/bazel-gazelle-v0.28.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.28.0/bazel-gazelle-v0.28.0.tar.gz",
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

Expand All @@ -55,10 +53,10 @@ gazelle_dependencies()

http_archive(
name = "rules_pkg",
sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2",
sha256 = "eea0f59c28a9241156a47d7a8e32db9122f3d50b505fae0f33de6ce4d9b61834",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.8.0/rules_pkg-0.8.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.8.0/rules_pkg-0.8.0.tar.gz",
],
)

Expand Down
1 change: 0 additions & 1 deletion builders/.bazelversion

This file was deleted.

1 change: 1 addition & 0 deletions builders/.markdownlint-cli2.yaml
Loading

0 comments on commit a79d0b3

Please sign in to comment.