From 183faf76eb7a19f16f07f02d94a36599ce4c6aa0 Mon Sep 17 00:00:00 2001 From: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:40:21 +0800 Subject: [PATCH] docker: updates notably to JRE 21.0.2_p13 (#3702) Signed-off-by: Adrian Cole --- .../server/ServerIntegratedBenchmark.java | 2 +- build-bin/docker/docker_args | 6 ++--- docker/Dockerfile | 4 ++-- docker/test-images/zipkin-activemq/Dockerfile | 4 ++-- .../test-images/zipkin-cassandra/Dockerfile | 2 +- .../zipkin-elasticsearch7/Dockerfile | 4 ++-- .../zipkin-elasticsearch8/Dockerfile | 8 +++---- docker/test-images/zipkin-eureka/Dockerfile | 2 +- docker/test-images/zipkin-eureka/pom.xml | 22 ++++++++++++++----- docker/test-images/zipkin-kafka/Dockerfile | 2 +- docker/test-images/zipkin-rabbitmq/Dockerfile | 2 +- docker/test-images/zipkin-ui/Dockerfile | 4 ++-- .../internal/eureka/BaseITZipkinEureka.java | 7 +++++- 13 files changed, 43 insertions(+), 26 deletions(-) diff --git a/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java b/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java index 47df0d10e4a..7eeb4773cb1 100644 --- a/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java +++ b/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java @@ -286,7 +286,7 @@ GenericContainer createZipkinContainer(@Nullable GenericContainer storage) final GenericContainer zipkin; if (RELEASE_VERSION == null) { - zipkin = new GenericContainer<>(parse("ghcr.io/openzipkin/java:21.0.1_p12")); + zipkin = new GenericContainer<>(parse("ghcr.io/openzipkin/java:21.0.2_p13")); List classpath = new ArrayList<>(); for (String item : System.getProperty("java.class.path").split(File.pathSeparator)) { Path path = Paths.get(item); diff --git a/build-bin/docker/docker_args b/build-bin/docker/docker_args index c396708e21f..dc26a2eba4d 100755 --- a/build-bin/docker/docker_args +++ b/build-bin/docker/docker_args @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2015-2023 The OpenZipkin Authors +# Copyright 2015-2024 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. -# e.g. ghcr.io/openzipkin/java:21.0.1_p12-jre +# e.g. ghcr.io/openzipkin/java:21.0.2_p13-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 @@ -60,7 +60,7 @@ 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. e.g. "21.0.1_p12" +# When non-empty, becomes the build-arg java_version. e.g. "21.0.2_p13" # 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}" diff --git a/docker/Dockerfile b/docker/Dockerfile index ca0e4ab73c6..11542317391 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2023 The OpenZipkin Authors +# Copyright 2015-2024 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 @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-activemq/Dockerfile b/docker/test-images/zipkin-activemq/Dockerfile index 463ed8aa6bb..b458078d132 100644 --- a/docker/test-images/zipkin-activemq/Dockerfile +++ b/docker/test-images/zipkin-activemq/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2023 The OpenZipkin Authors +# Copyright 2015-2024 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 @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-cassandra/Dockerfile b/docker/test-images/zipkin-cassandra/Dockerfile index 3692502a237..277714cd599 100644 --- a/docker/test-images/zipkin-cassandra/Dockerfile +++ b/docker/test-images/zipkin-cassandra/Dockerfile @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-elasticsearch7/Dockerfile b/docker/test-images/zipkin-elasticsearch7/Dockerfile index 06521758100..92b7b9c13ae 100644 --- a/docker/test-images/zipkin-elasticsearch7/Dockerfile +++ b/docker/test-images/zipkin-elasticsearch7/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2023 The OpenZipkin Authors +# Copyright 2015-2024 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 @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-elasticsearch8/Dockerfile b/docker/test-images/zipkin-elasticsearch8/Dockerfile index d394551c2ca..ff1f30d8a99 100644 --- a/docker/test-images/zipkin-elasticsearch8/Dockerfile +++ b/docker/test-images/zipkin-elasticsearch8/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2023 The OpenZipkin Authors +# Copyright 2015-2024 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 @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. @@ -35,7 +35,7 @@ WORKDIR /install # Use latest 7.x version from https://www.elastic.co/downloads/past-releases#elasticsearch # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG elasticsearch7_version=8.11.3 +ARG elasticsearch7_version=8.12.0 # Download only the OSS distribution (lacks X-Pack) RUN \ @@ -50,7 +50,7 @@ COPY --from=scratch /config/ ./config/ # production -jre base layer used by zipkin and zipkin-slim. FROM ghcr.io/openzipkin/java:${java_version} as zipkin-elasticsearch8 LABEL org.opencontainers.image.description="Elasticsearch distribution on OpenJDK and Alpine Linux" -ARG elasticsearch7_version=8.11.3 +ARG elasticsearch7_version=8.12.0 LABEL elasticsearch-version=$elasticsearch7_version # The full license is also included in the image at /elasticsearch/LICENSE.txt. diff --git a/docker/test-images/zipkin-eureka/Dockerfile b/docker/test-images/zipkin-eureka/Dockerfile index 9b311041676..54ea3517b2a 100644 --- a/docker/test-images/zipkin-eureka/Dockerfile +++ b/docker/test-images/zipkin-eureka/Dockerfile @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openeureka/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-eureka/pom.xml b/docker/test-images/zipkin-eureka/pom.xml index f74b48da2f4..bf142bcd52c 100644 --- a/docker/test-images/zipkin-eureka/pom.xml +++ b/docker/test-images/zipkin-eureka/pom.xml @@ -14,8 +14,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 io.zipkin.test @@ -32,15 +32,26 @@ 11 + - org.springframework.cloud - spring-cloud-starter-parent - 2023.0.0 + org.springframework.boot + spring-boot-dependencies + 3.2.2 pom import + + com.google.guava + guava + 33.0.0-jre + + + com.thoughtworks.xstream + xstream + 1.4.20 + @@ -48,6 +59,7 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-server + 4.1.0 diff --git a/docker/test-images/zipkin-kafka/Dockerfile b/docker/test-images/zipkin-kafka/Dockerfile index a942b8849d6..4d3a555e363 100644 --- a/docker/test-images/zipkin-kafka/Dockerfile +++ b/docker/test-images/zipkin-kafka/Dockerfile @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-rabbitmq/Dockerfile b/docker/test-images/zipkin-rabbitmq/Dockerfile index ee34fd64bad..3fcb506c8c7 100644 --- a/docker/test-images/zipkin-rabbitmq/Dockerfile +++ b/docker/test-images/zipkin-rabbitmq/Dockerfile @@ -13,7 +13,7 @@ # # Use latest from https://hub.docker.com/_/rabbitmq/tags?page=1&name=alpine -ARG rabbitmq_version=3.12.11 +ARG rabbitmq_version=3.12.12 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/docker/test-images/zipkin-ui/Dockerfile b/docker/test-images/zipkin-ui/Dockerfile index 10f9e7d6d1f..46563f76628 100644 --- a/docker/test-images/zipkin-ui/Dockerfile +++ b/docker/test-images/zipkin-ui/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2023 The OpenZipkin Authors +# Copyright 2015-2024 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 @@ -22,7 +22,7 @@ ARG alpine_version=3.19.0 # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java b/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java index 7ddafdfd493..cdb930ef8e4 100644 --- a/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java +++ b/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java @@ -83,7 +83,12 @@ abstract class BaseITZipkinEureka { @Test @Order(1) void registersInEureka() throws IOException { // The zipkin server may start before Eureka processes the registration - await().until(this::getEurekaZipkinAppAsString, (s) -> true); + await().untilAsserted( // wait for registration + () -> { + try (Response response = getEurekaZipkinApp()) { + assertThat(response.code()).isEqualTo(200); + } + }); String json = getEurekaZipkinAppAsString();