diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index eca6eabb..3bb12b15 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -11,17 +11,22 @@ on: jobs: create_release: - runs-on: ubuntu-20.04 # newest available distribution, aka focal + runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # Prevent use of implicit GitHub Actions read-only token GITHUB_TOKEN. We don't deploy on # the tag MAJOR.MINOR.PATCH event, but we still need to deploy the maven-release-plugin master commit. token: ${{ secrets.GH_TOKEN }} fetch-depth: 1 # only need the HEAD commit as license check isn't run + - name: Setup java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' # zulu as it supports a wide version range + java-version: '11' # earliest LTS and last that can compile the 1.6 release profile. - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a9e4fec..1d7ba5f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,20 +14,29 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 # newest available distribution, aka focal + runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - fetch-depth: 1 # only needed to get the sha label + # Prevent use of implicit GitHub Actions read-only token GITHUB_TOKEN. + # We push Javadocs to the gh-pages branch on commit. + token: ${{ secrets.GH_TOKEN }} + fetch-depth: 0 # allow build-bin/idl_to_gh_pages to get the full history + - name: Setup java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' # zulu as it supports a wide version range + java-version: '11' # earliest LTS and last that can compile the 1.6 release profile. - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-maven- - # We can't cache Docker without using buildx because GH actions restricts /var/lib/docker - # That's ok because DOCKER_PARENT_IMAGE is always ghcr.io and local anyway. + # Don't attempt to cache Docker. Sensitive information can be stolen + # via forks, and login session ends up in ~/.docker. This is ok because + # we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. - name: Deploy env: # GH_USER= @@ -51,7 +60,7 @@ jobs: # - referenced in .settings.xml SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} # DOCKERHUB_USER= - # - only push top-level projects: zipkin zipkin-aws zipkin-dependencies zipkin-aws to Docker Hub, only on release + # - only push top-level projects: zipkin zipkin-aws zipkin-dependencies zipkin-gcp to Docker Hub, only on release # - login like this: echo "$DOCKERHUB_TOKEN"| docker login -u "$DOCKERHUB_USER" --password-stdin DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} # DOCKERHUB_TOKEN= diff --git a/.github/workflows/docker_push.yml b/.github/workflows/docker_push.yml index 64a83bc5..14dd23c9 100644 --- a/.github/workflows/docker_push.yml +++ b/.github/workflows/docker_push.yml @@ -11,14 +11,15 @@ on: jobs: docker_push: - runs-on: ubuntu-20.04 # newest available distribution, aka focal + runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 # only needed to get the sha label - # We can't cache Docker without using buildx because GH actions restricts /var/lib/docker - # That's ok because DOCKER_PARENT_IMAGE is always ghcr.io and local anyway. + # Don't attempt to cache Docker. Sensitive information can be stolen + # via forks, and login session ends up in ~/.docker. This is ok because + # we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. - name: Docker Push run: | # GITHUB_REF will be refs/tags/docker-MAJOR.MINOR.PATCH build-bin/git/login_git && diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49040c10..472dad6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,21 +15,58 @@ on: paths-ignore: '**/*.md' jobs: + test-javadoc: + name: Test JavaDoc Builds + runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish + if: "!contains(github.event.head_commit.message, 'maven-release-plugin')" + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # full git history for license check + - name: Setup java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' # zulu as it supports a wide version range + java-version: '11' # earliest LTS and last that can compile the 1.6 release profile. + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-jdk-11-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-jdk-11-maven- + - name: Build JavaDoc + run: ./mvnw clean javadoc:aggregate -Prelease + test: - runs-on: ubuntu-20.04 # newest available distribution, aka focal + name: test (JDK ${{ matrix.java_version }}) + runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish if: "!contains(github.event.head_commit.message, 'maven-release-plugin')" + strategy: + fail-fast: false # don't fail fast as sometimes failures are operating system specific + matrix: # use latest available versions and be consistent on all workflows! + include: + - java_version: 11 # Last that can compile zipkin core to 1.6 for zipkin-reporter + maven_args: -Prelease -Dgpg.skip -Dmaven.javadoc.skip=true + - java_version: 21 # Most recent LTS steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + fetch-depth: 0 # full git history for license check + - name: Setup java + uses: actions/setup-java@v4 with: - fetch-depth: 0 # full git history for license check + distribution: 'zulu' # zulu as it supports a wide version range + java-version: ${{ matrix.java_version }} - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- - # We can't cache Docker without using buildx because GH actions restricts /var/lib/docker - # That's ok because DOCKER_PARENT_IMAGE is always ghcr.io and local anyway. + key: ${{ runner.os }}-jdk-${{ matrix.java_version }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-jdk-${{ matrix.java_version }}-maven- + # Don't attempt to cache Docker. Sensitive information can be stolen + # via forks, and login session ends up in ~/.docker. This is ok because + # we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. - name: Test run: build-bin/configure_test && build-bin/test diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar index 2cc7d4a5..cb28b0e3 100644 Binary files a/.mvn/wrapper/maven-wrapper.jar and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 642d572c..346d645f 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,18 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/build-bin/README.md b/build-bin/README.md index a7b407b1..89d3147f 100755 --- a/build-bin/README.md +++ b/build-bin/README.md @@ -8,13 +8,12 @@ configuration settings. [docker-compose-zipkin-gcp.xml] ensures GCP authentication works. It is not run on pull request, as the required secure variable is only available on master push. -[//]: # (Below here should be standard for all projects) ## Build Overview `build-bin` holds portable scripts used in CI to test and deploy the project. The scripts here are portable. They do not include any CI provider-specific logic or ENV variables. -This helps `.travis.yml` and `test.yml` (GitHub Actions) contain nearly the same contents, even if +This helps `test.yml` (GitHub Actions) and alternatives contain nearly the same contents, even if certain OpenZipkin projects need slight adjustments here. Portability has proven necessary, as OpenZipkin has had to transition CI providers many times due to feature and quota constraints. @@ -40,8 +39,8 @@ blank. Tests should not run on documentation-only commits. Tests must not depend resources, as running tests can leak credentials. Git checkouts should include the full history so that license headers or other git analysis can take place. - * [configure_test] - Sets up build environment for tests. - * [test] - Builds and runs tests for this project. +* [configure_test] - Sets up build environment for tests. +* [test] - Builds and runs tests for this project. ### Example GitHub Actions setup @@ -52,9 +51,6 @@ the scripts it uses. The `on:` section obviates job creation and resource usage for irrelevant events. Notably, GitHub Actions includes the ability to skip documentation-only jobs. -Combine [configure_test] and [test] into the same `run:` when `configure_test` primes file system -cache. - Here's a partial `test.yml` including only the aspects mentioned above. ```yaml on: @@ -70,54 +66,13 @@ jobs: test: steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - fetch-depth: 0 # full git history + fetch-depth: 0 # full git history for license check - name: Test - run: build-bin/configure_test && build-bin/test -``` - -### Example Travis setup -`.travis.yml` is a monolithic configuration file broken into stages, of which the default is "test". -A simplest Travis `test` job configures tests in `install` and runs them as `script`, but only on -relevant event conditions. - -The `if:` section obviates job creation and resource usage for irrelevant events. Travis does not -support file conditions. A `before_install` step to skip documentation-only commits will likely -complete in less than a minute (10 credit cost). - -Here's a partial `.travis.yml` including only the aspects mentioned above. -```yaml -git: - depth: false # TRAVIS_COMMIT_RANGE requires full commit history. - -jobs: - include: - - stage: test - if: branch = master AND tag IS blank AND type IN (push, pull_request) - name: Run unit and integration tests - before_install: | # Prevent test build of a documentation-only change. - if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then - echo "Stopping job as changes only affect documentation (ex. README.md)" - travis_terminate 0 - fi - install: ./build-bin/configure_test - script: ./build-bin/test -``` - -When Travis only runs tests (something else does deploy), there's no need to use stages: -```yaml -git: - depth: false # TRAVIS_COMMIT_RANGE requires full commit history. - -if: branch = master AND tag IS blank AND type IN (push, pull_request) -before_install: | # Prevent test build of a documentation-only change. - if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then - echo "Stopping job as changes only affect documentation (ex. README.md)" - travis_terminate 0 - fi -install: ./build-bin/configure_test -script: ./build-bin/test + run: | + build-bin/configure_test + build-bin/test ``` ## Deploy @@ -127,8 +82,8 @@ providers deploy pushes to master on when the tag is blank, but not on documenta Releases should deploy on version tags (ex `/^[0-9]+\.[0-9]+\.[0-9]+/`), without consideration of if the commit is documentation only or not. - * [configure_deploy] - Sets up environment and logs in, assuming [configure_test] was not called. - * [deploy] - deploys the project, with arg0 being "master" or a release commit like "1.2.3" +* [configure_deploy] - Sets up environment and logs in, assuming [configure_test] was not called. +* [deploy] - deploys the project, with arg0 being "master" or a release commit like "1.2.3" ### Example GitHub Actions setup @@ -140,77 +95,28 @@ The `on:` section obviates job creation and resource usage for irrelevant events cannot implement "master, except documentation only-commits" in the same file. Hence, deployments of master will happen even on README change. -Combine [configure_deploy] and [deploy] into the same `run:` when `configure_deploy` primes file -system cache. - Here's a partial `deploy.yml` including only the aspects mentioned above. Notice env variables are explicitly defined and `on.tags` is a [glob pattern](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet). + ```yaml on: push: - tags: '[0-9]+.[0-9]+.[0-9]+**' # Ex. 8.272.10 or 15.0.1_p9 + tags: '[0-9]+.[0-9]+.[0-9]+**' # e.g. 8.272.10 or 15.0.1_p9 branches: master jobs: deploy: steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 # only needed to get the sha label - - name: Deploy + - name: Configure Deploy + run: build-bin/configure_deploy env: GH_USER: ${{ secrets.GH_USER }} GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | # GITHUB_REF will be refs/heads/master or refs/tags/MAJOR.MINOR.PATCH - build-bin/configure_deploy && - build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3) -``` - -### Example Travis setup -`.travis.yml` is a monolithic configuration file broken into stages. This means `test` and `deploy` -are in the same file. A simplest Travis `deploy` stage has two jobs: one for master pushes and -another for version tags. These jobs are controlled by event conditions. - -The `if:` section obviates job creation and resource usage for irrelevant events. Travis does not -support file conditions. A `before_install` step to skip documentation-only commits will likely -complete in less than a minute (10 credit cost). - -As billing is by the minute, it is most cost effective to combine test and deploy on master push. - -Here's a partial `.travis.yml` including only the aspects mentioned above. Notice YAML anchors work -in Travis and `tag =~` [condition](https://github.com/travis-ci/travis-conditions) is a regular -expression. -```yaml -git: - depth: false # full git history for license check, and doc-only skipping - -_terminate_if_only_docs: &terminate_if_only_docs | - if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then - echo "Stopping job as changes only affect documentation (ex. README.md)" - travis_terminate 0 - fi - -jobs: - include: - - stage: test - if: branch = master AND tag IS blank AND type IN (push, pull_request) - before_install: *terminate_if_only_docs - install: | - if [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then - export SHOULD_DEPLOY=true - ./build-bin/configure_deploy - else - export SHOULD_DEPLOY=false - ./build-bin/configure_test - fi - script: - - ./build-bin/test || travis_terminate 1 - - if [ "${SHOULD_DEPLOY}" != "true" ]; then travis_terminate 0; fi - - travis_wait ./build-bin/deploy master - - stage: deploy - # Ex. 8.272.10 or 15.0.1_p9 - if: tag =~ /^[0-9]+\.[0-9]+\.[0-9]+/ AND type = push AND env(GH_TOKEN) IS present - install: ./build-bin/configure_deploy - script: ./build-bin/deploy ${TRAVIS_TAG} + - name: Deploy + # GITHUB_REF will be refs/heads/master or refs/tags/1.2.3 + run: build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3) ``` diff --git a/build-bin/docker/configure_docker b/build-bin/docker/configure_docker index c34fd03a..d355d8f9 100755 --- a/build-bin/docker/configure_docker +++ b/build-bin/docker/configure_docker @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -25,13 +25,8 @@ set -ue # * checks.disable=true - saves time and a docker.io pull of alpine # * ryuk doesn't count against docker.io rate limits because Docker approved testcontainers as OSS echo checks.disable=true >> ~/.testcontainers.properties -# * upgrade ryuk until https://github.com/testcontainers/testcontainers-java/pull/3630 -echo ryuk.container.image=testcontainers/ryuk:0.3.1 >> ~/.testcontainers.properties # We don't use any docker.io images, but add a Google's mirror in case something implicitly does # * See https://cloud.google.com/container-registry/docs/pulling-cached-images echo '{ "registry-mirrors": ["https://mirror.gcr.io"] }' | sudo tee /etc/docker/daemon.json sudo service docker restart - -# * Ensure buildx and related features are disabled -mkdir -p ${HOME}/.docker && echo '{"experimental":"disabled"}' > ${HOME}/.docker/config.json diff --git a/build-bin/docker/configure_docker_push b/build-bin/docker/configure_docker_push index 4987a67f..0a9451f5 100755 --- a/build-bin/docker/configure_docker_push +++ b/build-bin/docker/configure_docker_push @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -50,5 +50,8 @@ fi # See https://github.com/multiarch/qemu-user-static # # Mirrored image use to avoid docker.io pulls: -# docker tag multiarch/qemu-user-static:5.1.0-7 ghcr.io/openzipkin/multiarch-qemu-user-static:latest +# docker tag multiarch/qemu-user-static:7.2.0-1 ghcr.io/openzipkin/multiarch-qemu-user-static:latest +# +# Note: This image only works on x86_64/amd64 architecture. +# See: https://github.com/multiarch/qemu-user-static#supported-host-architectures docker run --rm --privileged ghcr.io/openzipkin/multiarch-qemu-user-static --reset -p yes diff --git a/build-bin/docker/docker_arch b/build-bin/docker/docker_arch index 29308940..b00f84c0 100755 --- a/build-bin/docker/docker_arch +++ b/build-bin/docker/docker_arch @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -21,6 +21,8 @@ set -ue # Normalize docker_arch to what's available +# +# Note: s390x and ppc64le were added for Knative docker_arch=${DOCKER_ARCH:-$(uname -m)} case ${docker_arch} in amd64* ) @@ -35,6 +37,12 @@ case ${docker_arch} in aarch64* ) docker_arch=arm64 ;; + s390x* ) + docker_arch=s390x + ;; + ppc64le* ) + docker_arch=ppc64le + ;; * ) >&2 echo "Unsupported DOCKER_ARCH: ${docker_arch}" exit 1; diff --git a/build-bin/docker/docker_args b/build-bin/docker/docker_args index 6eb0e153..b5e56cb3 100755 --- a/build-bin/docker/docker_args +++ b/build-bin/docker/docker_args @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -46,7 +46,7 @@ if [ -n "${DOCKER_TARGET}" ]; then fi # When non-empty, becomes the base layer including tag appropriate for the image being built. -# Ex. ghcr.io/openzipkin/java:15.0.1_p9-jre +# e.g. ghcr.io/openzipkin/java:21.0.1_p12-jre # # This is not required to be a base (FROM scratch) image like ghcr.io/openzipkin/alpine:3.12.3 # See https://docs.docker.com/glossary/#parent-image @@ -54,13 +54,13 @@ if [ -n "${DOCKER_PARENT_IMAGE}" ]; then docker_args="${docker_args} --build-arg docker_parent_image=${DOCKER_PARENT_IMAGE}" fi -# When non-empty, becomes the build-arg alpine_version. Ex. "3.12.3" +# When non-empty, becomes the build-arg alpine_version. e.g. "3.12.3" # Used to align base layers from https://github.com/orgs/openzipkin/packages/container/package/alpine if [ -n "${ALPINE_VERSION}" ]; then docker_args="${docker_args} --build-arg alpine_version=${ALPINE_VERSION}" fi -# When non-empty, becomes the build-arg java_version. Ex. "15.0.1_p9" +# When non-empty, becomes the build-arg java_version. e.g. "21.0.1_p12" # Used to align base layers from https://github.com/orgs/openzipkin/packages/container/package/java if [ -n "${JAVA_VERSION}" ]; then docker_args="${docker_args} --build-arg java_version=${JAVA_VERSION}" @@ -69,13 +69,13 @@ if [ -n "${JAVA_VERSION}" ]; then java_major_version=$(echo ${JAVA_VERSION}| cut -f1 -d .) case ${java_major_version} in 8) java_home=/usr/lib/jvm/java-1.8-openjdk;; - 1?) java_home=/usr/lib/jvm/java-${java_major_version}-openjdk;; + 1?|2?|3?) java_home=/usr/lib/jvm/java-${java_major_version}-openjdk;; esac if [ -n "${java_home}" ]; then docker_args="${docker_args} --build-arg java_home=${java_home}"; fi fi -# When non-empty, becomes the build-arg maven_classifier. Ex. "module" or "exec" +# When non-empty, becomes the build-arg maven_classifier. e.g. "module" or "exec" # Used as the classifier arg to ./build-bin/maven/maven_unjar. Allows building two images with the # same Dockerfile, varying on classifier, like openzipkin/zipkin vs openzipkin/zipkin-slim if [ -n "${MAVEN_CLASSIFIER}" ]; then diff --git a/build-bin/docker/docker_block_on_health b/build-bin/docker/docker_block_on_health index f45da42b..c7b135f2 100755 --- a/build-bin/docker/docker_block_on_health +++ b/build-bin/docker/docker_block_on_health @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/docker/docker_build b/build-bin/docker/docker_build index e10f7aed..d7a33157 100755 --- a/build-bin/docker/docker_build +++ b/build-bin/docker/docker_build @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2021 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -19,9 +19,10 @@ docker_tag=${1?full docker_tag is required. Ex openzipkin/zipkin:test} version=${2:-} docker_args=$($(dirname "$0")/docker_args ${version}) -# Avoid buildx on load for reasons including: -# * Caching is more complex as builder instances must be considered -# * It only supports one platform/arch on load https://github.com/docker/buildx/issues/59 -# * It would pull Docker Hub for moby/buildkit or multiarch/qemu-user-static images, using up quota +# We don't need build kit, but Docker 20.10 no longer accepts --platform +# without it. It is simpler to always enable it vs require maintainers to use +# alternate OCI tools. See https://github.com/moby/moby/issues/41552 +export DOCKER_BUILDKIT=1 + echo "Building image ${docker_tag}" -DOCKER_BUILDKIT=1 docker build --pull ${docker_args} --tag ${docker_tag} . +docker build --network=host --pull ${docker_args} --tag ${docker_tag} . diff --git a/build-bin/docker/docker_push b/build-bin/docker/docker_push index 9a9fe12a..a3c4b77a 100755 --- a/build-bin/docker/docker_push +++ b/build-bin/docker/docker_push @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2021 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -27,8 +27,10 @@ set -ue docker_image=${1?docker_image is required, notably without a tag. Ex openzipkin/zipkin} version=${2:-master} -# We don't need build kit, but Docker 20.10 no longer accepts --platform without it. -# It is simpler to just always enable it. See https://github.com/moby/moby/issues/41552 + +# We don't need build kit, but Docker 20.10 no longer accepts --platform +# without it. It is simpler to always enable it vs require maintainers to use +# alternate OCI tools. See https://github.com/moby/moby/issues/41552 export DOCKER_BUILDKIT=1 case ${version} in @@ -66,7 +68,8 @@ for repo in ${docker_repos}; do done docker_args=$($(dirname "$0")/docker_args ${version}) -docker_archs=${DOCKER_ARCHS:-amd64 arm64} +# Note: s390x and ppc64le were added for Knative +docker_archs=${DOCKER_ARCHS:-amd64 arm64 s390x ppc64le} echo "Will build the following architectures: ${docker_archs}" @@ -116,4 +119,3 @@ else docker manifest push -p ${tag} done fi - diff --git a/build-bin/docker/docker_test_image b/build-bin/docker/docker_test_image index 54e7ae21..0378ab95 100755 --- a/build-bin/docker/docker_test_image +++ b/build-bin/docker/docker_test_image @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/git/login_git b/build-bin/git/login_git index 825e8490..4ca78506 100755 --- a/build-bin/git/login_git +++ b/build-bin/git/login_git @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/git/version_from_trigger_tag b/build-bin/git/version_from_trigger_tag index 5534d40c..a6875f0d 100755 --- a/build-bin/git/version_from_trigger_tag +++ b/build-bin/git/version_from_trigger_tag @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/gpg/configure_gpg b/build-bin/gpg/configure_gpg index 4854f5d2..8049504d 100755 --- a/build-bin/gpg/configure_gpg +++ b/build-bin/gpg/configure_gpg @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_build b/build-bin/maven/maven_build index 5183fb77..5c65c6fe 100755 --- a/build-bin/maven/maven_build +++ b/build-bin/maven/maven_build @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_build_or_unjar b/build-bin/maven/maven_build_or_unjar index e1c31b7c..eeadf5d7 100755 --- a/build-bin/maven/maven_build_or_unjar +++ b/build-bin/maven/maven_build_or_unjar @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_deploy b/build-bin/maven/maven_deploy index b43578ed..12f73244 100755 --- a/build-bin/maven/maven_deploy +++ b/build-bin/maven/maven_deploy @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_go_offline b/build-bin/maven/maven_go_offline index d8cc8582..57c86cd0 100755 --- a/build-bin/maven/maven_go_offline +++ b/build-bin/maven/maven_go_offline @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_opts b/build-bin/maven/maven_opts index 0bf0670d..2ba40b3b 100755 --- a/build-bin/maven/maven_opts +++ b/build-bin/maven/maven_opts @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_release b/build-bin/maven/maven_release index 8c8446ec..d4122b68 100755 --- a/build-bin/maven/maven_release +++ b/build-bin/maven/maven_release @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at diff --git a/build-bin/maven/maven_unjar b/build-bin/maven/maven_unjar index bf2643db..2e94113b 100755 --- a/build-bin/maven/maven_unjar +++ b/build-bin/maven/maven_unjar @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2016-2020 The OpenZipkin Authors +# Copyright 2016-2023 The OpenZipkin Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -67,7 +67,7 @@ fi if ! test -f ${artifact_id}.jar && [ ${is_release} = "true" ]; then mvn_get="mvn -q --batch-mode -Denforcer.fail=false \ - org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \ + org.apache.maven.plugins:maven-dependency-plugin:3.6.1:get \ -Dtransitive=false -DgroupId=${group_id} -DartifactId=${artifact_id} -Dversion=${version}" if [ -n "${classifier}" ]; then diff --git a/module/pom.xml b/module/pom.xml index 8d326115..1d055ca7 100644 --- a/module/pom.xml +++ b/module/pom.xml @@ -45,7 +45,19 @@ com.google.auth google-auth-library-oauth2-http - 0.22.0 + ${google-auth-library-oauth2-http.version} + + + commons-codec + commons-codec + + + + + + commons-codec + commons-codec + ${commons-codec.version} io.zipkin.zipkin2 - 2.24.3 - 2.16.3 - 2.4.1 + 2.25.2 + 2.17.0 + 2.7.18 com.linecorp.armeria - 1.3.0 + 1.26.4 io.zipkin.brave - 5.13.7 + 5.16.0 - 1.33.1 + 1.58.0 - 3.12.0 - 29.0-android + 3.24.0 + 32.0.1-android + + 1.20.0 + + 1.16.0 - 1.2.10 + 2.32.0 - 3.18.1 - 4.0.3 - 4.13.1 - 5.7.0 - 3.6.28 + 3.24.2 + 4.2.0 + 4.13.2 + 5.10.1 + 5.8.0 - 2.4.0 + 2.23.0 ${skipTests} - 1.19 + 1.23 1.2.8 - 4.2 - 3.8.1 + 4.3 + 3.11.0 - 3.1.2 - 3.0.0-M1 - 3.0.0-M3 + 3.6.1 + 3.1.1 + 3.4.1 - 3.2.0 - 3.0.0-M1 - 3.2.0 - 3.2.0 - 3.0.0-M1 - 3.2.4 - 3.2.1 - 3.0.0-M5 - 1.6.8 + 3.4.0 + 3.1.1 + 3.6.2 + 3.3.0 + 3.0.1 + 3.5.1 + 3.3.0 + 3.2.2 + 1.6.13 Zipkin Google Cloud Platform (Parent) @@ -205,7 +209,7 @@ ch.qos.logback logback-classic - 1.2.3 + 1.2.13 test @@ -219,16 +223,6 @@ - - - io.takari - maven - 0.7.7 - - 3.6.3 - - - de.qaware.maven @@ -334,32 +328,56 @@ maven-surefire-plugin ${maven-surefire-plugin.version} - + false + + -Dnet.bytebuddy.experimental=true + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter.version} + + maven-failsafe-plugin ${maven-surefire-plugin.version} - - - false - - false - - false - integration-test - verify integration-test + + + + verify + verify + + + + always + + + false + + false + + -Dnet.bytebuddy.experimental=true + @@ -397,7 +415,9 @@ - [11,16) + + [11,12),[17,18),[21,22) @@ -508,15 +528,25 @@ + - error-prone + error-prone-11+ - true + + [11,12),[17,18),[21,22) maven-compiler-plugin + ${maven-compiler-plugin.version} + true + + ${main.java.version} + ${main.java.version} + true + true + @@ -530,6 +560,17 @@ -XDcompilePolicy=simple -Xplugin:ErrorProne ${errorprone.args} + + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED @@ -557,9 +598,10 @@ ossrh https://oss.sonatype.org/ - - 10 + + 20 + 30 true @@ -567,7 +609,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.1.0 sign-artifacts diff --git a/sender-stackdriver/pom.xml b/sender-stackdriver/pom.xml index 2fa98467..a4a5a608 100644 --- a/sender-stackdriver/pom.xml +++ b/sender-stackdriver/pom.xml @@ -84,7 +84,20 @@ com.google.auth google-auth-library-oauth2-http - 0.22.2 + ${google-auth-library-oauth2-http.version} + + + commons-codec + commons-codec + + + test + + + + commons-codec + commons-codec + ${commons-codec.version} test diff --git a/storage-stackdriver/src/test/java/zipkin2/storage/stackdriver/StackdriverSpanConsumerTest.java b/storage-stackdriver/src/test/java/zipkin2/storage/stackdriver/StackdriverSpanConsumerTest.java index 3bc9f13b..da743d05 100644 --- a/storage-stackdriver/src/test/java/zipkin2/storage/stackdriver/StackdriverSpanConsumerTest.java +++ b/storage-stackdriver/src/test/java/zipkin2/storage/stackdriver/StackdriverSpanConsumerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 The OpenZipkin Authors + * Copyright 2016-2023 The OpenZipkin Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -16,6 +16,7 @@ import com.google.devtools.cloudtrace.v2.BatchWriteSpansRequest; import com.google.devtools.cloudtrace.v2.TraceServiceGrpc; import com.google.protobuf.Empty; +import com.linecorp.armeria.common.grpc.GrpcSerializationFormats; import com.linecorp.armeria.common.grpc.protocol.ArmeriaStatusException; import com.linecorp.armeria.server.ServerBuilder; import com.linecorp.armeria.server.grpc.GrpcService; diff --git a/translation-stackdriver/pom.xml b/translation-stackdriver/pom.xml index 596ff486..8de3035b 100644 --- a/translation-stackdriver/pom.xml +++ b/translation-stackdriver/pom.xml @@ -40,7 +40,7 @@ com.google.api.grpc proto-google-common-protos - 2.0.1 + 2.29.0