From 4d133af3df20864796d677caef30894d4a6a9127 Mon Sep 17 00:00:00 2001 From: Privacy Sandbox Team Date: Mon, 30 Oct 2023 13:54:34 +0000 Subject: [PATCH] Release 0.49.1 (2023-10-30) ### Bug Fixes * Add tools/wrk2 wrapper script Bug: b/308182081 Change-Id: Iac5b825416c7e310722eabe8b9b8099c272b88cc GitOrigin-RevId: a4b22231082506a7bf2ecb0b6cd4c0951341f7b3 --- CHANGELOG.md | 7 +++++++ images/test-tools/Dockerfile | 13 +++++++------ images/test-tools/build_wrk | 27 +++++++++++++++++++++++++++ tests/data/hashes/test-tools | 2 +- tools/wrk2 | 1 + version.txt | 2 +- 6 files changed, 44 insertions(+), 8 deletions(-) create mode 100755 images/test-tools/build_wrk create mode 120000 tools/wrk2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eef0c4..1e300d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 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.49.1 (2023-10-30) + + +### Bug Fixes + +* Add tools/wrk2 wrapper script + ## 0.49.0 (2023-10-27) diff --git a/images/test-tools/Dockerfile b/images/test-tools/Dockerfile index 6b35913..45fab3c 100644 --- a/images/test-tools/Dockerfile +++ b/images/test-tools/Dockerfile @@ -20,15 +20,15 @@ ADD https://github.com/shekyan/slowhttptest/archive/refs/tags/v1.9.0.tar.gz /bui RUN tar xz --strip-components 1 -f src.tar.gz && ./configure && make FROM alpine:3.18 as wrk_builder -# hadolint ignore=DL3018 -RUN apk add --no-cache autoconf automake build-base git openssl-dev zlib-dev +ARG TARGETARCH +ENV BUILD_ARCH="${TARGETARCH}" +COPY build_wrk /build/ WORKDIR /build -ADD https://github.com/giltene/wrk2/archive/44a94c17d8e6a0bac8559b53da76848e430cb7a7.tar.gz /build/wrk.tar.gz -RUN tar xz --strip-components 1 -f wrk.tar.gz && make -j6 +ADD https://github.com/giltene/wrk2/archive/44a94c17d8e6a0bac8559b53da76848e430cb7a7.tar.gz /build/src.tar.gz +RUN /build/build_wrk FROM golang:1.21-alpine3.18 AS golang -ENV BUILD_ARCH="${TARGETARCH}" \ - GOBIN=/usr/local/go/bin +ENV GOBIN=/usr/local/go/bin COPY build_golang_apps /scripts/ RUN /scripts/build_golang_apps @@ -44,3 +44,4 @@ ENV BUILD_ARCH="${TARGETARCH}" \ COPY install_apps /scripts/ RUN /scripts/install_apps COPY --from=slowhttptest_builder /build/src/slowhttptest /usr/bin/ +COPY --from=wrk_builder /build/wrk /usr/bin/wrk2 diff --git a/images/test-tools/build_wrk b/images/test-tools/build_wrk new file mode 100755 index 0000000..d843dd0 --- /dev/null +++ b/images/test-tools/build_wrk @@ -0,0 +1,27 @@ +#!/bin/busybox sh + +set -o errexit +set -o xtrace + +install_no_wrk() { + cat </build/wrk +#!/bin/busybox sh +PROGRAM_NAME="\$(basename \$0)" +printf "Error: %s not supported on Aarch64\n" "\${PROGRAM_NAME}" +printf "build_arch: %s\n" "${BUILD_ARCH}" >/dev/stderr +exit 1 +EOF + chmod 755 /build/wrk +} + +install_wrk() { + apk add --no-cache build-base git openssl-dev zlib-dev + tar xz --strip-components 1 -f src.tar.gz + make -j6 +} + +if [[ ${BUILD_ARCH} == arm64 ]]; then + install_no_wrk +else + install_wrk +fi diff --git a/tests/data/hashes/test-tools b/tests/data/hashes/test-tools index 63482aa..fc5e0b5 100644 --- a/tests/data/hashes/test-tools +++ b/tests/data/hashes/test-tools @@ -1 +1 @@ -48ec49fead076d09cfeaad6de7466d33300972e8f9a678c99d16321ac5ae74a4 +dd1ec6137d4dd22fec555044cd85f484adfa6c7b686880ea5449cff936bad34e diff --git a/tools/wrk2 b/tools/wrk2 new file mode 120000 index 0000000..d609abd --- /dev/null +++ b/tools/wrk2 @@ -0,0 +1 @@ +test-tool \ No newline at end of file diff --git a/version.txt b/version.txt index fbaaafa..9cc9210 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.49.0 \ No newline at end of file +0.49.1 \ No newline at end of file