diff --git a/WORKSPACE b/WORKSPACE index 05177c8c7de..44c2963fe2f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -41,7 +41,7 @@ pl_go_overrides() go_download_sdk( name = "go_sdk", - version = "1.24.6", + version = "1.25.5", ) go_rules_dependencies() @@ -220,8 +220,8 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") gazelle_dependencies(go_sdk = "go_sdk") go_download_sdk( - name = "go_sdk_1_23", - version = "1.23.12", + name = "go_sdk_1_24", + version = "1.24.11", ) # The go_sdk_boringcrypto SDK is used for testing boringcrypto specific functionality (TLS tracing). @@ -234,7 +234,7 @@ go_download_sdk( go_download_sdk( name = "go_sdk_boringcrypto", experiments = ["boringcrypto"], - version = "1.23.11", + version = "1.24.10", ) pip_parse( diff --git a/bazel/container_images.bzl b/bazel/container_images.bzl index ab81087c1d6..891f13474f6 100644 --- a/bazel/container_images.bzl +++ b/bazel/container_images.bzl @@ -328,6 +328,14 @@ def stirling_test_images(): digest = "sha256:0f14818a1046dfdb7d5ac27e173d99e071219897a1d9969c8d7604acbd0d9541", ) + # Tag: 1.0 + # Arch: linux/amd64 + _container_image( + name = "golang_1_23_https_server_with_buildinfo", + repository = "golang_1_23_https_server_with_buildinfo", + digest = "sha256:df8ad6fd2cc2c45b7e6713dd365be908f77f006c190c7f79f74b38338b550544", + ) + # Tag: 1.0 # Arch: linux/amd64 _container_image( @@ -367,3 +375,11 @@ def stirling_test_images(): repository = "golang_1_22_grpc_server_with_buildinfo", digest = "sha256:67adba5e8513670fa37bd042862e7844f26239e8d2997ed8c3b0aa527bc04cc3", ) + + # Tag: 1.0 + # Arch: linux/amd64 + _container_image( + name = "golang_1_23_grpc_server_with_buildinfo", + repository = "golang_1_23_grpc_server_with_buildinfo", + digest = "sha256:7950a79e492dbdbe18608db5829a129754df5b6b5cb9d6ba822cfd91c43ba61a", + ) diff --git a/bazel/go_container.bzl b/bazel/go_container.bzl new file mode 100644 index 00000000000..550daa25cd2 --- /dev/null +++ b/bazel/go_container.bzl @@ -0,0 +1,324 @@ +# Copyright 2018- The Pixie 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 +# +# 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. +# +# SPDX-License-Identifier: Apache-2.0 + +load("//bazel:pl_build_system.bzl", "pl_boringcrypto_go_sdk") + +""" +Bazel rules and macros for generating Go container test libraries. + +This module provides a custom rule and macros to generate C++ header files +for Go container test fixtures at build time. This eliminates the need for +manually maintaining per-version header files. + +There are two types of container sources: +- bazel_sdk_versions: Built from source using Bazel's Go SDK cross-compilation +- prebuilt_container_versions: Use pre-built container images from the containers directory + +Usage: + In BUILD.bazel: + load("//bazel:go_container.bzl", "go_container_libraries") + + go_container_libraries( + container_type = "grpc_server", + bazel_sdk_versions = ["1.23", "1.24"], + prebuilt_container_versions = ["1.18", "1.19"], + ) +""" + +load("//bazel:pl_build_system.bzl", "pl_cc_test_library") + +_LICENSE_HEADER = """\ +/* + * Copyright 2018- The Pixie 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 + * + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +// AUTO-GENERATED FILE - DO NOT EDIT", +// Generated by //bazel:go_container.bzl", + +#pragma once + +""" + + +# Template for container header content +_CONTAINER_HEADER_TEMPLATE = _LICENSE_HEADER + """\ + +#include + +#include "src/common/testing/test_environment.h" +#include "src/common/testing/test_utils/container_runner.h" + +namespace px {{ +namespace stirling {{ +namespace testing {{ + +class {class_name} : public ContainerRunner {{ + public: + {class_name}() + : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, + kReadyMessage) {{}} + + private: + static constexpr std::string_view kBazelImageTar = + "{tar_path}"; + static constexpr std::string_view kContainerNamePrefix = "{container_prefix}"; + static constexpr std::string_view kReadyMessage = {ready_message}; +}}; + +}} // namespace testing +}} // namespace stirling +}} // namespace px +""" + +# Configuration for each use case +# Keys: container_type name +# Values: dict with container_prefix, ready_message, tar patterns +_GO_CONTAINER_CONFIGS = { + "grpc_server": { + "container_prefix": "grpc_server", + "ready_message": '"Starting HTTP/2 server"', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_{version}_grpc_tls_server.tar", + "tar_pattern_prebuilt": "src/stirling/source_connectors/socket_tracer/testing/containers/golang_{version}_grpc_server_with_buildinfo.tar", + "class_suffix": "GRPCServerContainer", + }, + "grpc_client": { + "container_prefix": "grpc_client", + "ready_message": '""', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_{version}_grpc_tls_client.tar", + "tar_pattern_prebuilt": None, + "class_suffix": "GRPCClientContainer", + }, + "tls_server": { + "container_prefix": "https_server", + "ready_message": '"Starting HTTPS service"', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_https/server/golang_{version}_https_server.tar", + "tar_pattern_prebuilt": "src/stirling/source_connectors/socket_tracer/testing/containers/golang_{version}_https_server_with_buildinfo.tar", + "class_suffix": "TLSServerContainer", + }, + "tls_client": { + "container_prefix": "https_client", + "ready_message": 'R"({"status":"ok"})"', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_https/client/golang_{version}_https_client.tar", + "tar_pattern_prebuilt": None, + "class_suffix": "TLSClientContainer", + }, +} + +def _version_to_class_prefix(version): + """Convert version string to class name prefix. + + Args: + version: Go SDK version string (e.g., "1.24", "1.23.11") + + Returns: + Class name prefix (e.g., "Go1_24_", "GoBoringCrypto") + """ + + if version in pl_boringcrypto_go_sdk: + return "GoBoringCrypto" + return "Go" + version.replace(".", "_") + "_" + +def _version_to_label_suffix(version): + """Convert version string to bazel label suffix. + + Args: + version: Go SDK version string (e.g., "1.24", "1.23.11") + + Returns: + Label suffix (e.g., "1_24", "boringcrypto") + """ + + if version in pl_boringcrypto_go_sdk: + return "boringcrypto" + return version.replace(".", "_") + +def _go_container_header_impl(ctx): + """Generate a Go container header file.""" + output = ctx.actions.declare_file(ctx.attr.header_name) + + ctx.actions.write( + output = output, + content = _CONTAINER_HEADER_TEMPLATE.format( + class_name = ctx.attr.class_name, + tar_path = ctx.attr.tar_path, + container_prefix = ctx.attr.container_prefix, + ready_message = ctx.attr.ready_message, + ), + ) + return [DefaultInfo(files = depset([output]))] + +go_container_header = rule( + implementation = _go_container_header_impl, + attrs = { + "class_name": attr.string(mandatory = True), + "container_prefix": attr.string(mandatory = True), + "header_name": attr.string(mandatory = True), + "ready_message": attr.string(mandatory = True), + "tar_path": attr.string(mandatory = True), + }, +) + +def go_container_library(name, container_type, version, use_prebuilt = False): + """ + Create a container library for a specific Go version and use case. + + This macro generates a C++ header file and wraps it in a pl_cc_test_library + that can be used as a dependency in tests. + + Args: + name: Target name for the library + container_type: One of "grpc_server", "grpc_client", "tls_server", "tls_client" + version: Go SDK version (e.g., "1.24", "1.23.11") + use_prebuilt: Whether to use prebuilt container tar path (for older Go versions that are no longer built via bazel) + """ + if container_type not in _GO_CONTAINER_CONFIGS: + fail("Invalid container type'{}'. Must be one of: {}".format( + container_type, + ", ".join(_GO_CONTAINER_CONFIGS.keys()), + )) + config = _GO_CONTAINER_CONFIGS[container_type] + label_suffix = _version_to_label_suffix(version) + class_prefix = _version_to_class_prefix(version) + + # Determine tar path pattern based on container source + if use_prebuilt: + tar_pattern = config["tar_pattern_prebuilt"] + if not tar_pattern: + fail("container_type '{}' does not support prebuilt containers".format(container_type)) + else: + tar_pattern = config["tar_pattern_bazel_sdk"] + + tar_path = tar_pattern.format(version = label_suffix) + + # Class name: Go{version}_{UseCase}Container or GoBoringCrypto{UseCase}Container + class_name = class_prefix + config["class_suffix"] + + header_name = "go_{}_{}_container.h".format(label_suffix, container_type) + + # Generate the header + go_container_header( + name = name + "_header", + header_name = header_name, + class_name = class_name, + tar_path = tar_path, + container_prefix = config["container_prefix"], + ready_message = config["ready_message"], + ) + + # Parse tar path to get the Bazel label + # e.g., "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server.tar" + # becomes "//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_1_24_grpc_tls_server.tar" + tar_dir = tar_path.rsplit("/", 1)[0] + tar_file = tar_path.rsplit("/", 1)[1] + tar_label = "//" + tar_dir + ":" + tar_file + + # Create the test library + pl_cc_test_library( + name = name, + hdrs = [":" + name + "_header"], + data = [tar_label], + deps = ["//src/common/testing/test_utils:cc_library"], + ) + +def _get_header_path(container_type, label_suffix): + """Get the generated header path for a container.""" + return "src/stirling/source_connectors/socket_tracer/testing/container_images/go_{}_{}_container.h".format( + label_suffix, + container_type, + ) + +def go_container_libraries(container_type, bazel_sdk_versions = [], prebuilt_container_versions = []): + """ + Generate container libraries for all versions of a use case. + + This is a convenience macro that generates multiple go_container_library + targets in a single call. The two version lists are mutually exclusive - + each version should appear in exactly one list. + + Args: + container_type: One of "grpc_server", "grpc_client", "tls_server", "tls_client" + bazel_sdk_versions: List of Go SDK versions built from source using Bazel + prebuilt_container_versions: List of Go versions using pre-built container images + """ + all_versions = prebuilt_container_versions + bazel_sdk_versions + include_paths = [] + deps = [] + + # Generate libraries for prebuilt container versions + for version in prebuilt_container_versions: + label_suffix = _version_to_label_suffix(version) + target_name = "go_{}_{}_container".format(label_suffix, container_type) + go_container_library( + name = target_name, + container_type = container_type, + version = version, + use_prebuilt = True, + ) + include_paths.append(_get_header_path(container_type, label_suffix)) + deps.append(":" + target_name) + + # Generate libraries for Bazel SDK versions (built from source) + for version in bazel_sdk_versions: + label_suffix = _version_to_label_suffix(version) + target_name = "go_{}_{}_container".format(label_suffix, container_type) + go_container_library( + name = target_name, + container_type = container_type, + version = version, + use_prebuilt = False, + ) + include_paths.append(_get_header_path(container_type, label_suffix)) + deps.append(":" + target_name) + + # Generate the aggregated includes header + if include_paths: + # Header name: go_{container_type}_containers.h + # e.g., "grpc_server" -> "go_grpc_server_containers.h" + header_name = "go_{}_containers.h".format(container_type) + includes_target_name = "go_{}_containers".format(container_type) + + # Build the header content + header_lines = _LICENSE_HEADER.splitlines() + for include_path in include_paths: + header_lines.append('#include "{}"'.format(include_path)) + header_content = "\\n".join(header_lines) + + # Use genrule to generate the header + native.genrule( + name = includes_target_name + "_gen", + outs = [header_name], + cmd = "printf '{}' > $@".format(header_content), + ) + + pl_cc_test_library( + name = includes_target_name, + hdrs = [":" + includes_target_name + "_gen"], + deps = deps, + ) diff --git a/bazel/pl_build_system.bzl b/bazel/pl_build_system.bzl index 82b6acb5e07..8a4cdaec903 100644 --- a/bazel/pl_build_system.bzl +++ b/bazel/pl_build_system.bzl @@ -23,11 +23,12 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") load("@rules_python//python:defs.bzl", "py_test") load("//bazel:toolchain_transitions.bzl", "qemu_interactive_runner") -pl_boringcrypto_go_sdk = ["1.23.11"] -pl_go_test_versions = ["1.18", "1.19", "1.20", "1.21", "1.22"] -pl_supported_go_sdk_versions = ["1.23", "1.24"] +pl_boringcrypto_go_sdk = ["1.24.10"] +pl_go_test_versions = ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23"] +pl_supported_go_sdk_versions = ["1.24", "1.25"] # The last version in this list corresponds to the boringcrypto go sdk version. +# This list is used for generating container libraries and other version-specific targets. pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk def pl_go_sdk_version_template_to_label(tpl, version): diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index dea2a4c9f8b..0814af1f4f1 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -423,10 +423,10 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/bazelbuild/rules_docker/archive/0e9c3b068d05f20adf7ccdea486fcb27e71593f3.tar.gz"], ), io_bazel_rules_go = dict( - sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16", + sha256 = "68af54cb97fbdee5e5e8fe8d210d15a518f9d62abfd71620c3eaff3b26a5ff86", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", ], ), io_bazel_rules_k8s = dict( diff --git a/src/stirling/obj_tools/dwarf_reader_test.cc b/src/stirling/obj_tools/dwarf_reader_test.cc index 6fd9f93dd16..bd5619ebf38 100644 --- a/src/stirling/obj_tools/dwarf_reader_test.cc +++ b/src/stirling/obj_tools/dwarf_reader_test.cc @@ -24,10 +24,10 @@ #include "src/common/testing/testing.h" #include "src/stirling/utils/detect_application.h" -constexpr std::string_view kTestGo1_23Binary = - "src/stirling/obj_tools/testdata/go/test_go_1_23_binary"; constexpr std::string_view kTestGo1_24Binary = - "src/stirling/obj_tools/testdata/go/test_go_1_23_binary"; + "src/stirling/obj_tools/testdata/go/test_go_1_24_binary"; +constexpr std::string_view kTestGo1_25Binary = + "src/stirling/obj_tools/testdata/go/test_go_1_25_binary"; constexpr std::string_view kGoGRPCServer = "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server_binary"; constexpr std::string_view kCppBinary = "src/stirling/obj_tools/testdata/cc/test_exe_/test_exe"; @@ -35,8 +35,8 @@ constexpr std::string_view kGoBinaryUnconventional = "src/stirling/obj_tools/testdata/go/sockshop_payments_service"; const auto kCPPBinaryPath = px::testing::BazelRunfilePath(kCppBinary); -const auto kGo1_23BinaryPath = px::testing::BazelRunfilePath(kTestGo1_23Binary); const auto kGo1_24BinaryPath = px::testing::BazelRunfilePath(kTestGo1_24Binary); +const auto kGo1_25BinaryPath = px::testing::BazelRunfilePath(kTestGo1_25Binary); const auto kGoServerBinaryPath = px::testing::BazelRunfilePath(kGoGRPCServer); const auto kGoBinaryUnconventionalPath = px::testing::BazelRunfilePath(kGoBinaryUnconventional); @@ -563,10 +563,10 @@ INSTANTIATE_TEST_SUITE_P(CppDwarfReaderParameterizedTest, CppDwarfReaderTest, DwarfReaderTestParam{kCPPBinaryPath, false})); INSTANTIATE_TEST_SUITE_P(GolangDwarfReaderParameterizedTest, GolangDwarfReaderTest, - ::testing::Values(DwarfReaderTestParam{kGo1_23BinaryPath, true}, - DwarfReaderTestParam{kGo1_23BinaryPath, false}, - DwarfReaderTestParam{kGo1_24BinaryPath, true}, - DwarfReaderTestParam{kGo1_24BinaryPath, false})); + ::testing::Values(DwarfReaderTestParam{kGo1_24BinaryPath, true}, + DwarfReaderTestParam{kGo1_24BinaryPath, false}, + DwarfReaderTestParam{kGo1_25BinaryPath, true}, + DwarfReaderTestParam{kGo1_25BinaryPath, false})); INSTANTIATE_TEST_SUITE_P(GolangDwarfReaderParameterizedIndexTest, GolangDwarfReaderIndexTest, ::testing::Values(true, false)); diff --git a/src/stirling/obj_tools/go_syms_test.cc b/src/stirling/obj_tools/go_syms_test.cc index 187ca45f95d..a28836e3e25 100644 --- a/src/stirling/obj_tools/go_syms_test.cc +++ b/src/stirling/obj_tools/go_syms_test.cc @@ -58,7 +58,7 @@ TEST(ReadGoBuildInfoTest, BuildinfoEndianAgnostic) { ASSERT_OK_AND_ASSIGN(std::unique_ptr elf_reader, ElfReader::Create(kPath)); ASSERT_OK_AND_ASSIGN(auto pair, ReadGoBuildInfo(elf_reader.get())); auto version = pair.first; - EXPECT_THAT(version, StrEq("1.24.6")); + EXPECT_THAT(version, StrEq("1.24.11")); } TEST(ReadGoBuildInfoTest, BuildinfoLittleEndian) { diff --git a/src/stirling/obj_tools/testdata/go/BUILD.bazel b/src/stirling/obj_tools/testdata/go/BUILD.bazel index 92d2299e515..7000fa7dfe5 100644 --- a/src/stirling/obj_tools/testdata/go/BUILD.bazel +++ b/src/stirling/obj_tools/testdata/go/BUILD.bazel @@ -81,7 +81,7 @@ filegroup( # TODO(ddelnano): rules_go doesn't support populating .buildinfo with dependency information (https://github.com/bazel-contrib/rules_go/issues/3090). # Once this is supported, test_buildinfo_with_mods should be replaced with a bazel built binary. "test_buildinfo_with_mods", - ":test_go_1_23_binary", ":test_go_1_24_binary", + ":test_go_1_25_binary", ], ) diff --git a/src/stirling/scripts/benchmark_stirling_wrapper_http2_tracing.sh b/src/stirling/scripts/benchmark_stirling_wrapper_http2_tracing.sh index 7a367020793..6d3c5e41c57 100755 --- a/src/stirling/scripts/benchmark_stirling_wrapper_http2_tracing.sh +++ b/src/stirling/scripts/benchmark_stirling_wrapper_http2_tracing.sh @@ -24,11 +24,11 @@ BAZEL_BUILD_CMD="bazel build --compilation_mode=opt" TEST_EXE_BASE_DIR="bazel-bin/src/stirling/source_connectors/socket_tracer/protocols/http2/testing" -GRPC_CLIENT_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_23_grpc_client" -GRPC_CLIENT_EXE="${TEST_EXE_BASE_DIR}/go_grpc_client/golang_1_23_grpc_client" +GRPC_CLIENT_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client" +GRPC_CLIENT_EXE="${TEST_EXE_BASE_DIR}/go_grpc_client/golang_1_24_grpc_client" -GRPC_SERVER_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_23_grpc_server" -GRPC_SERVER_EXE="${TEST_EXE_BASE_DIR}/go_grpc_server/golang_1_23_grpc_server" +GRPC_SERVER_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server" +GRPC_SERVER_EXE="${TEST_EXE_BASE_DIR}/go_grpc_server/golang_1_24_grpc_server" STIRLING_WRAPPER_LABEL="src/stirling/binaries:stirling_wrapper" STIRLING_WRAPPER_EXE="bazel-bin/src/stirling/binaries/stirling_wrapper" diff --git a/src/stirling/source_connectors/dynamic_bpftrace/BUILD.bazel b/src/stirling/source_connectors/dynamic_bpftrace/BUILD.bazel index 5a45f5ad839..0a8e0085d1d 100644 --- a/src/stirling/source_connectors/dynamic_bpftrace/BUILD.bazel +++ b/src/stirling/source_connectors/dynamic_bpftrace/BUILD.bazel @@ -38,8 +38,8 @@ pl_cc_bpf_test( name = "dynamic_bpftrace_connector_bpf_test", srcs = ["dynamic_bpftrace_connector_bpf_test.cc"], data = [ - "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_23_grpc_server_with_certs", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs", + "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_25_grpc_server_with_certs", ], tags = [ "cpu:16", diff --git a/src/stirling/source_connectors/dynamic_bpftrace/dynamic_bpftrace_connector_bpf_test.cc b/src/stirling/source_connectors/dynamic_bpftrace/dynamic_bpftrace_connector_bpf_test.cc index 31a978177c2..3ddb93d28e0 100644 --- a/src/stirling/source_connectors/dynamic_bpftrace/dynamic_bpftrace_connector_bpf_test.cc +++ b/src/stirling/source_connectors/dynamic_bpftrace/dynamic_bpftrace_connector_bpf_test.cc @@ -462,23 +462,23 @@ TEST(DynamicBPFTraceConnectorTest, BPFTraceCheckPrintfsError) { HasSubstr("All printf statements must have exactly the same format string"))); } -constexpr std::string_view kServerPath_1_23 = - "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/" - "golang_1_23_grpc_server"; constexpr std::string_view kServerPath_1_24 = "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/" "golang_1_24_grpc_server"; +constexpr std::string_view kServerPath_1_25 = + "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/" + "golang_1_25_grpc_server"; TEST(DynamicBPFTraceConnectorTest, InsertUProbeTargetObjPaths) { - std::string go1_23_binary_path = px::testing::BazelRunfilePath(kServerPath_1_23).string(); std::string go1_24_binary_path = px::testing::BazelRunfilePath(kServerPath_1_24).string(); + std::string go1_25_binary_path = px::testing::BazelRunfilePath(kServerPath_1_25).string(); - ASSERT_TRUE(fs::Exists(go1_23_binary_path)); ASSERT_TRUE(fs::Exists(go1_24_binary_path)); + ASSERT_TRUE(fs::Exists(go1_25_binary_path)); DeploymentSpec spec; - spec.mutable_path_list()->add_paths(go1_23_binary_path); spec.mutable_path_list()->add_paths(go1_24_binary_path); + spec.mutable_path_list()->add_paths(go1_25_binary_path); std::string uprobe_script = "// Deploys uprobes to trace http2 traffic.\n" @@ -489,16 +489,16 @@ TEST(DynamicBPFTraceConnectorTest, InsertUProbeTargetObjPaths) { InsertUprobeTargetObjPaths(spec, &uprobe_script); EXPECT_EQ( uprobe_script, - absl::StrCat("// Deploys uprobes to trace http2 traffic.\n", "uprobe:", go1_23_binary_path, + absl::StrCat("// Deploys uprobes to trace http2 traffic.\n", "uprobe:", go1_24_binary_path, ":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\",\n" "uprobe:", - go1_24_binary_path, + go1_25_binary_path, ":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\"" "{ printf(\"stream_id: %d, end_stream: %d\", arg0, arg1); }\n", - "uretprobe:", go1_23_binary_path, + "uretprobe:", go1_24_binary_path, ":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\",\n" "uretprobe:", - go1_24_binary_path, + go1_25_binary_path, ":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\"" "{ printf(\"retval: %d\", retval); }")); } diff --git a/src/stirling/source_connectors/dynamic_tracer/BUILD.bazel b/src/stirling/source_connectors/dynamic_tracer/BUILD.bazel index 1d47643b4ea..276f51b5b8c 100644 --- a/src/stirling/source_connectors/dynamic_tracer/BUILD.bazel +++ b/src/stirling/source_connectors/dynamic_tracer/BUILD.bazel @@ -48,10 +48,10 @@ pl_cc_bpf_test( timeout = "moderate", srcs = ["dynamic_trace_bpf_test.cc"], data = [ - "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_23_grpc_client", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client", - "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_23_grpc_server_with_certs", + "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_25_grpc_client", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs", + "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_25_grpc_server_with_certs", ], tags = [ "cpu:16", @@ -71,8 +71,8 @@ pl_cc_bpf_test( srcs = ["stirling_dt_bpf_test.cc"], data = [ "//src/stirling/obj_tools/testdata/cc:test_exe", - "//src/stirling/obj_tools/testdata/go:test_go_1_23_binary", "//src/stirling/obj_tools/testdata/go:test_go_1_24_binary", + "//src/stirling/obj_tools/testdata/go:test_go_1_25_binary", "//src/stirling/testing/dns:dns_hammer", "//src/stirling/testing/dns:dns_hammer_image.tar", ], diff --git a/src/stirling/source_connectors/dynamic_tracer/dynamic_trace_bpf_test.cc b/src/stirling/source_connectors/dynamic_tracer/dynamic_trace_bpf_test.cc index 801847b3958..604df4b3e36 100644 --- a/src/stirling/source_connectors/dynamic_tracer/dynamic_trace_bpf_test.cc +++ b/src/stirling/source_connectors/dynamic_tracer/dynamic_trace_bpf_test.cc @@ -30,13 +30,6 @@ #include "src/stirling/proto/stirling.pb.h" -constexpr std::string_view kGo1_23_ClientPath = - "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client/" - "golang_1_23_grpc_client"; -constexpr std::string_view kGo1_23_ServerPath = - "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/" - "golang_1_23_grpc_server"; - constexpr std::string_view kGo1_24_ClientPath = "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client/" "golang_1_24_grpc_client"; @@ -44,6 +37,13 @@ constexpr std::string_view kGo1_24_ServerPath = "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/" "golang_1_24_grpc_server"; +constexpr std::string_view kGo1_25_ClientPath = + "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client/" + "golang_1_25_grpc_client"; +constexpr std::string_view kGo1_25_ServerPath = + "src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/" + "golang_1_25_grpc_server"; + DECLARE_bool(debug_dt_pipeline); namespace px { namespace stirling { @@ -122,8 +122,8 @@ class GoHTTPDynamicTraceTest }; INSTANTIATE_TEST_SUITE_P(GoHTTPDynamicTraceTestInstances, GoHTTPDynamicTraceTest, - ::testing::Values(std::make_pair(kGo1_23_ClientPath, kGo1_23_ServerPath), - std::make_pair(kGo1_24_ClientPath, kGo1_24_ServerPath))); + ::testing::Values(std::make_pair(kGo1_24_ClientPath, kGo1_24_ServerPath), + std::make_pair(kGo1_25_ClientPath, kGo1_25_ServerPath))); constexpr char kGRPCTraceProgram[] = R"( tracepoints { diff --git a/src/stirling/source_connectors/dynamic_tracer/stirling_dt_bpf_test.cc b/src/stirling/source_connectors/dynamic_tracer/stirling_dt_bpf_test.cc index b21ee70612d..7e9e4486516 100644 --- a/src/stirling/source_connectors/dynamic_tracer/stirling_dt_bpf_test.cc +++ b/src/stirling/source_connectors/dynamic_tracer/stirling_dt_bpf_test.cc @@ -274,8 +274,8 @@ TEST_F(DynamicTraceAPITest, InvalidReference) { // Dynamic Trace Golang tests //----------------------------------------------------------------------------- -const std::string_view kGo1_23BinaryPath = "src/stirling/obj_tools/testdata/go/test_go_1_23_binary"; const std::string_view kGo1_24BinaryPath = "src/stirling/obj_tools/testdata/go/test_go_1_24_binary"; +const std::string_view kGo1_25BinaryPath = "src/stirling/obj_tools/testdata/go/test_go_1_25_binary"; struct DynamicTraceGolangTestCase { const std::filesystem::path binary_path; @@ -292,8 +292,8 @@ class DynamicTraceGolangTest : public StirlingDynamicTraceBPFTest, }; INSTANTIATE_TEST_SUITE_P(DynamicTraceGolangTestInstances, DynamicTraceGolangTest, - ::testing::Values(DynamicTraceGolangTestCase{kGo1_23BinaryPath}, - DynamicTraceGolangTestCase{kGo1_24BinaryPath})); + ::testing::Values(DynamicTraceGolangTestCase{kGo1_24BinaryPath}, + DynamicTraceGolangTestCase{kGo1_25BinaryPath})); TEST_P(DynamicTraceGolangTest, TraceLatencyOnly) { BinaryRunner trace_target; @@ -578,16 +578,16 @@ tracepoints { INSTANTIATE_TEST_SUITE_P( NilAndNonNilError, ReturnedErrorInterfaceTest, ::testing::Values( - ReturnedErrorInterfaceTestCase{kGo1_23BinaryPath, + ReturnedErrorInterfaceTestCase{kGo1_24BinaryPath, absl::Substitute(kProgramTxtPBTmpl, "main.ReturnError"), "{\"X\":3,\"Y\":4}"}, - ReturnedErrorInterfaceTestCase{kGo1_23BinaryPath, + ReturnedErrorInterfaceTestCase{kGo1_24BinaryPath, absl::Substitute(kProgramTxtPBTmpl, "main.ReturnNilError"), "{\"tab\":0,\"data\":0}"}, - ReturnedErrorInterfaceTestCase{kGo1_24BinaryPath, + ReturnedErrorInterfaceTestCase{kGo1_25BinaryPath, absl::Substitute(kProgramTxtPBTmpl, "main.ReturnError"), "{\"X\":3,\"Y\":4}"}, - ReturnedErrorInterfaceTestCase{kGo1_24BinaryPath, + ReturnedErrorInterfaceTestCase{kGo1_25BinaryPath, absl::Substitute(kProgramTxtPBTmpl, "main.ReturnNilError"), "{\"tab\":0,\"data\":0}"})); @@ -672,10 +672,10 @@ TEST_P(DynamicTraceGolangTestWithParam, TraceByteArray) { INSTANTIATE_TEST_SUITE_P( GolangByteArrayTests, DynamicTraceGolangTestWithParam, - ::testing::Values(TestParam{kGo1_23BinaryPath, "main.BytesToHex", "Bytes"}, - TestParam{kGo1_23BinaryPath, "main.Uint8ArrayToHex", "Uint8"}, - TestParam{kGo1_24BinaryPath, "main.BytesToHex", "Bytes"}, - TestParam{kGo1_24BinaryPath, "main.Uint8ArrayToHex", "Uint8"})); + ::testing::Values(TestParam{kGo1_24BinaryPath, "main.BytesToHex", "Bytes"}, + TestParam{kGo1_24BinaryPath, "main.Uint8ArrayToHex", "Uint8"}, + TestParam{kGo1_25BinaryPath, "main.BytesToHex", "Bytes"}, + TestParam{kGo1_25BinaryPath, "main.Uint8ArrayToHex", "Uint8"})); //----------------------------------------------------------------------------- // Dynamic Trace C++ tests diff --git a/src/stirling/source_connectors/socket_tracer/BUILD.bazel b/src/stirling/source_connectors/socket_tracer/BUILD.bazel index 8eae06c9bc2..76a9ca13b77 100644 --- a/src/stirling/source_connectors/socket_tracer/BUILD.bazel +++ b/src/stirling/source_connectors/socket_tracer/BUILD.bazel @@ -344,17 +344,8 @@ pl_cc_bpf_test( "//src/common/exec:cc_library", "//src/common/testing/test_utils:cc_library", "//src/stirling/source_connectors/socket_tracer/testing:cc_library", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_18_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_19_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_20_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_21_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_22_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_grpc_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_grpc_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_grpc_server_container", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_grpc_client_containers", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_grpc_server_containers", "//src/stirling/source_connectors/socket_tracer/testing/container_images:product_catalog_client_container", "//src/stirling/source_connectors/socket_tracer/testing/container_images:product_catalog_service_container", "//src/stirling/testing:cc_library", @@ -563,17 +554,8 @@ pl_cc_bpf_test( "//src/common/exec:cc_library", "//src/common/testing/test_utils:cc_library", "//src/stirling/source_connectors/socket_tracer/testing:cc_library", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_18_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_19_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_20_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_21_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_22_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_tls_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_tls_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_server_container", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_tls_client_containers", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_tls_server_containers", "//src/stirling/testing:cc_library", ], ) diff --git a/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc b/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc index 9e3120763df..afe76d9f758 100644 --- a/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc +++ b/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc @@ -20,17 +20,8 @@ #include #include "src/common/testing/testing.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_tls_client_containers.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_tls_server_containers.h" #include "src/stirling/source_connectors/socket_tracer/testing/protocol_checkers.h" #include "src/stirling/source_connectors/socket_tracer/testing/socket_trace_bpf_test_fixture.h" #include "src/stirling/testing/common.h" diff --git a/src/stirling/source_connectors/socket_tracer/grpc_trace_bpf_test.cc b/src/stirling/source_connectors/socket_tracer/grpc_trace_bpf_test.cc index f09029853fe..50ccd9a8e42 100644 --- a/src/stirling/source_connectors/socket_tracer/grpc_trace_bpf_test.cc +++ b/src/stirling/source_connectors/socket_tracer/grpc_trace_bpf_test.cc @@ -190,7 +190,7 @@ INSTANTIATE_TEST_SUITE_P(SecurityModeTest, GRPCTraceTest, ::testing::Values( // Did not enumerate all combinations, as they are independent based on // our knowledge, and to minimize test size to reduce flakiness. - TestParams{"1_23", true, true}, TestParams{"1_23", true, false}, + TestParams{"1_25", true, true}, TestParams{"1_25", true, false}, TestParams{"1_24", true, true}, TestParams{"1_24", true, false}, TestParams{"boringcrypto", true, true})); diff --git a/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc b/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc index d98f4375118..61cdc2625c0 100644 --- a/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc +++ b/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc @@ -21,17 +21,8 @@ #include "src/common/exec/subprocess.h" #include "src/stirling/core/output.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_grpc_client_containers.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_grpc_server_containers.h" #include "src/stirling/source_connectors/socket_tracer/testing/container_images/product_catalog_client_container.h" #include "src/stirling/source_connectors/socket_tracer/testing/container_images/product_catalog_service_container.h" #include "src/stirling/source_connectors/socket_tracer/testing/protocol_checkers.h" diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel b/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel index aca663b0db9..0d1ad990576 100644 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel +++ b/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel @@ -14,12 +14,38 @@ # # SPDX-License-Identifier: Apache-2.0 -load("//bazel:pl_build_system.bzl", "pl_boringcrypto_go_sdk", "pl_cc_test_library", "pl_go_sdk_version_template_to_label", "pl_go_test_versions", "pl_supported_go_sdk_versions") - -pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk +load("//bazel:go_container.bzl", "go_container_libraries") +load("//bazel:pl_build_system.bzl", "pl_all_supported_go_sdk_versions", "pl_cc_test_library", "pl_go_test_versions") package(default_visibility = ["//src/stirling:__subpackages__"]) +# Generate all Go container library permutations for supported Go versions. +go_container_libraries( + container_type = "grpc_server", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, + prebuilt_container_versions = pl_go_test_versions, +) + +# Stirling test cases usually test server side tracing. Therefore +# we only need to provide the bazel SDK versions for the client containers. +go_container_libraries( + container_type = "grpc_client", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, +) + +go_container_libraries( + container_type = "tls_server", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, + prebuilt_container_versions = pl_go_test_versions, +) + +# Stirling test cases usually test server side tracing. Therefore +# we only need to provide the bazel SDK versions for the client containers. +go_container_libraries( + container_type = "tls_client", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, +) + pl_cc_test_library( name = "bssl_container", srcs = [], @@ -60,84 +86,6 @@ pl_cc_test_library( deps = ["//src/common/testing/test_utils:cc_library"], ) -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_grpc_client_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_grpc_client_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_grpc_tls_pl/client:golang_%s_grpc_tls_client.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_grpc_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_grpc_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_%s_grpc_tls_server.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_grpc_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_grpc_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/source_connectors/socket_tracer/testing/containers:golang_%s_grpc_server_with_buildinfo.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_go_test_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_tls_client_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_tls_client_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_https/client:golang_%s_https_client.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_tls_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_tls_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_https/server:golang_%s_https_server.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_tls_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_tls_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/source_connectors/socket_tracer/testing/containers:golang_%s_https_server_with_buildinfo.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_go_test_versions -] - pl_cc_test_library( name = "golang_sqlx_container", srcs = [], diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h deleted file mode 100644 index 12877b6908c..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_18_GRPCServerContainer : public ContainerRunner { - public: - Go1_18_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_18_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h deleted file mode 100644 index 1d0184072ac..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_18_TLSServerContainer : public ContainerRunner { - public: - Go1_18_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_18_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h deleted file mode 100644 index f655fe5fb0e..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_19_GRPCServerContainer : public ContainerRunner { - public: - Go1_19_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_19_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h deleted file mode 100644 index d4e845bd12c..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_19_TLSServerContainer : public ContainerRunner { - public: - Go1_19_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_19_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h deleted file mode 100644 index e64c6d93e7d..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_20_GRPCServerContainer : public ContainerRunner { - public: - Go1_20_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_20_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h deleted file mode 100644 index 13aabed1ade..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_20_TLSServerContainer : public ContainerRunner { - public: - Go1_20_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_20_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h deleted file mode 100644 index db0dbb25bce..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_21_GRPCServerContainer : public ContainerRunner { - public: - Go1_21_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_21_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h deleted file mode 100644 index 342d980b397..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_21_TLSServerContainer : public ContainerRunner { - public: - Go1_21_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_21_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h deleted file mode 100644 index 6218f483eb4..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_22_GRPCServerContainer : public ContainerRunner { - public: - Go1_22_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/" - "containers/golang_1_22_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h deleted file mode 100644 index b07bf09348f..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_22_TLSServerContainer : public ContainerRunner { - public: - Go1_22_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_22_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h deleted file mode 100644 index c89a0d91cb3..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_GRPCClientContainer : public ContainerRunner { - public: - Go1_23_GRPCClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_1_23_grpc_tls_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_client"; - static constexpr std::string_view kReadyMessage = ""; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h deleted file mode 100644 index 44dde6e32fd..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_GRPCServerContainer : public ContainerRunner { - public: - Go1_23_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_23_grpc_tls_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h deleted file mode 100644 index ea85579aa27..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_TLSClientContainer : public ContainerRunner { - public: - Go1_23_TLSClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/client/golang_1_23_https_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_client"; - static constexpr std::string_view kReadyMessage = R"({"status":"ok"})"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h deleted file mode 100644 index 367cf8928a8..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_TLSServerContainer : public ContainerRunner { - public: - Go1_23_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/server/golang_1_23_https_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h deleted file mode 100644 index 8e2968de148..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_GRPCClientContainer : public ContainerRunner { - public: - Go1_24_GRPCClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_1_24_grpc_tls_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_client"; - static constexpr std::string_view kReadyMessage = ""; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h deleted file mode 100644 index f8c4f29445f..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_GRPCServerContainer : public ContainerRunner { - public: - Go1_24_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h deleted file mode 100644 index df5f38b11d7..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_TLSClientContainer : public ContainerRunner { - public: - Go1_24_TLSClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/client/golang_1_24_https_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_client"; - static constexpr std::string_view kReadyMessage = R"({"status":"ok"})"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h deleted file mode 100644 index a504ab2b47f..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_TLSServerContainer : public ContainerRunner { - public: - Go1_24_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/server/golang_1_24_https_server.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h deleted file mode 100644 index 1fb92a6fa8b..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoGRPCClientContainer : public ContainerRunner { - public: - GoBoringCryptoGRPCClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/" - "golang_boringcrypto_grpc_tls_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_client"; - static constexpr std::string_view kReadyMessage = ""; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h deleted file mode 100644 index b0306581592..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoGRPCServerContainer : public ContainerRunner { - public: - GoBoringCryptoGRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/" - "golang_boringcrypto_grpc_tls_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h deleted file mode 100644 index 6bdb6150314..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoTLSClientContainer : public ContainerRunner { - public: - GoBoringCryptoTLSClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/client/golang_boringcrypto_https_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_client"; - static constexpr std::string_view kReadyMessage = R"({"status":"ok"})"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h deleted file mode 100644 index d8107e108ce..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie 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 - * - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoTLSServerContainer : public ContainerRunner { - public: - GoBoringCryptoTLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/server/golang_boringcrypto_https_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/update_ghcr.sh b/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/update_ghcr.sh index 22226079b59..7f25d44b15a 100755 --- a/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/update_ghcr.sh +++ b/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/update_ghcr.sh @@ -22,6 +22,7 @@ declare -A GO_IMAGE_DIGEST_MAP=( ["1.20-alpine@sha256:e47f121850f4e276b2b210c56df3fda9191278dd84a3a442bfe0b09934462a8f"]="v1.58.3" ["1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94"]="v1.58.3" ["1.22-alpine@sha256:1699c10032ca2582ec89a24a1312d986a3f094aed3d5c1147b19880afe40e052"]="v1.58.3" + ["1.23-alpine@sha256:383395b794dffa5b53012a212365d40c8e37109a626ca30d6151c8348d380b5f"]="v1.75.1" ) version=1.0 diff --git a/src/stirling/testing/demo_apps/go_https/server/update_ghcr.sh b/src/stirling/testing/demo_apps/go_https/server/update_ghcr.sh index 1e7ed5385d7..45c5eff6738 100755 --- a/src/stirling/testing/demo_apps/go_https/server/update_ghcr.sh +++ b/src/stirling/testing/demo_apps/go_https/server/update_ghcr.sh @@ -22,6 +22,7 @@ declare -A GO_IMAGE_DIGEST_MAP=( ["1.20-alpine@sha256:e47f121850f4e276b2b210c56df3fda9191278dd84a3a442bfe0b09934462a8f"]="v0.35.0" ["1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94"]="v0.35.0" ["1.22-alpine@sha256:1699c10032ca2582ec89a24a1312d986a3f094aed3d5c1147b19880afe40e052"]="v0.35.0" + ["1.23-alpine@sha256:383395b794dffa5b53012a212365d40c8e37109a626ca30d6151c8348d380b5f"]="v0.43.0" ) version=1.0