Skip to content

Commit 9ab85a7

Browse files
committed
Upgrade Go to 1.25
Signed-off-by: Dom Del Nano <ddelnano@gmail.com> (cherry picked from commit 60246ab)
1 parent 77a4332 commit 9ab85a7

File tree

16 files changed

+77
-59
lines changed

16 files changed

+77
-59
lines changed

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pl_go_overrides()
4141

4242
go_download_sdk(
4343
name = "go_sdk",
44-
version = "1.24.6",
44+
version = "1.25.5",
4545
)
4646

4747
go_rules_dependencies()
@@ -220,8 +220,8 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
220220
gazelle_dependencies(go_sdk = "go_sdk")
221221

222222
go_download_sdk(
223-
name = "go_sdk_1_23",
224-
version = "1.23.12",
223+
name = "go_sdk_1_24",
224+
version = "1.24.11",
225225
)
226226

227227
# The go_sdk_boringcrypto SDK is used for testing boringcrypto specific functionality (TLS tracing).
@@ -234,7 +234,7 @@ go_download_sdk(
234234
go_download_sdk(
235235
name = "go_sdk_boringcrypto",
236236
experiments = ["boringcrypto"],
237-
version = "1.23.11",
237+
version = "1.24.10",
238238
)
239239

240240
pip_parse(

bazel/container_images.bzl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@ def stirling_test_images():
328328
digest = "sha256:0f14818a1046dfdb7d5ac27e173d99e071219897a1d9969c8d7604acbd0d9541",
329329
)
330330

331+
# Tag: 1.0
332+
# Arch: linux/amd64
333+
_container_image(
334+
name = "golang_1_23_https_server_with_buildinfo",
335+
repository = "golang_1_23_https_server_with_buildinfo",
336+
digest = "sha256:df8ad6fd2cc2c45b7e6713dd365be908f77f006c190c7f79f74b38338b550544",
337+
)
338+
331339
# Tag: 1.0
332340
# Arch: linux/amd64
333341
_container_image(
@@ -367,3 +375,11 @@ def stirling_test_images():
367375
repository = "golang_1_22_grpc_server_with_buildinfo",
368376
digest = "sha256:67adba5e8513670fa37bd042862e7844f26239e8d2997ed8c3b0aa527bc04cc3",
369377
)
378+
379+
# Tag: 1.0
380+
# Arch: linux/amd64
381+
_container_image(
382+
name = "golang_1_23_grpc_server_with_buildinfo",
383+
repository = "golang_1_23_grpc_server_with_buildinfo",
384+
digest = "sha256:7950a79e492dbdbe18608db5829a129754df5b6b5cb9d6ba822cfd91c43ba61a",
385+
)

bazel/pl_build_system.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
2323
load("@rules_python//python:defs.bzl", "py_test")
2424
load("//bazel:toolchain_transitions.bzl", "qemu_interactive_runner")
2525

26-
pl_boringcrypto_go_sdk = ["1.23.11"]
27-
pl_go_test_versions = ["1.18", "1.19", "1.20", "1.21", "1.22"]
28-
pl_supported_go_sdk_versions = ["1.23", "1.24"]
26+
pl_boringcrypto_go_sdk = ["1.24.10"]
27+
pl_go_test_versions = ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23"]
28+
pl_supported_go_sdk_versions = ["1.24", "1.25"]
2929

3030
# The last version in this list corresponds to the boringcrypto go sdk version.
3131
# This list is used for generating container libraries and other version-specific targets.

bazel/repository_locations.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,10 @@ REPOSITORY_LOCATIONS = dict(
423423
urls = ["https://github.com/bazelbuild/rules_docker/archive/0e9c3b068d05f20adf7ccdea486fcb27e71593f3.tar.gz"],
424424
),
425425
io_bazel_rules_go = dict(
426-
sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16",
426+
sha256 = "68af54cb97fbdee5e5e8fe8d210d15a518f9d62abfd71620c3eaff3b26a5ff86",
427427
urls = [
428-
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
429-
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
428+
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip",
429+
"https://github.com/bazelbuild/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip",
430430
],
431431
),
432432
io_bazel_rules_k8s = dict(

src/stirling/obj_tools/dwarf_reader_test.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424
#include "src/common/testing/testing.h"
2525
#include "src/stirling/utils/detect_application.h"
2626

27-
constexpr std::string_view kTestGo1_23Binary =
28-
"src/stirling/obj_tools/testdata/go/test_go_1_23_binary";
2927
constexpr std::string_view kTestGo1_24Binary =
30-
"src/stirling/obj_tools/testdata/go/test_go_1_23_binary";
28+
"src/stirling/obj_tools/testdata/go/test_go_1_24_binary";
29+
constexpr std::string_view kTestGo1_25Binary =
30+
"src/stirling/obj_tools/testdata/go/test_go_1_25_binary";
3131
constexpr std::string_view kGoGRPCServer =
3232
"src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server_binary";
3333
constexpr std::string_view kCppBinary = "src/stirling/obj_tools/testdata/cc/test_exe_/test_exe";
3434
constexpr std::string_view kGoBinaryUnconventional =
3535
"src/stirling/obj_tools/testdata/go/sockshop_payments_service";
3636

3737
const auto kCPPBinaryPath = px::testing::BazelRunfilePath(kCppBinary);
38-
const auto kGo1_23BinaryPath = px::testing::BazelRunfilePath(kTestGo1_23Binary);
3938
const auto kGo1_24BinaryPath = px::testing::BazelRunfilePath(kTestGo1_24Binary);
39+
const auto kGo1_25BinaryPath = px::testing::BazelRunfilePath(kTestGo1_25Binary);
4040
const auto kGoServerBinaryPath = px::testing::BazelRunfilePath(kGoGRPCServer);
4141
const auto kGoBinaryUnconventionalPath = px::testing::BazelRunfilePath(kGoBinaryUnconventional);
4242

@@ -563,10 +563,10 @@ INSTANTIATE_TEST_SUITE_P(CppDwarfReaderParameterizedTest, CppDwarfReaderTest,
563563
DwarfReaderTestParam{kCPPBinaryPath, false}));
564564

565565
INSTANTIATE_TEST_SUITE_P(GolangDwarfReaderParameterizedTest, GolangDwarfReaderTest,
566-
::testing::Values(DwarfReaderTestParam{kGo1_23BinaryPath, true},
567-
DwarfReaderTestParam{kGo1_23BinaryPath, false},
568-
DwarfReaderTestParam{kGo1_24BinaryPath, true},
569-
DwarfReaderTestParam{kGo1_24BinaryPath, false}));
566+
::testing::Values(DwarfReaderTestParam{kGo1_24BinaryPath, true},
567+
DwarfReaderTestParam{kGo1_24BinaryPath, false},
568+
DwarfReaderTestParam{kGo1_25BinaryPath, true},
569+
DwarfReaderTestParam{kGo1_25BinaryPath, false}));
570570

571571
INSTANTIATE_TEST_SUITE_P(GolangDwarfReaderParameterizedIndexTest, GolangDwarfReaderIndexTest,
572572
::testing::Values(true, false));

src/stirling/obj_tools/go_syms_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ TEST(ReadGoBuildInfoTest, BuildinfoEndianAgnostic) {
5858
ASSERT_OK_AND_ASSIGN(std::unique_ptr<ElfReader> elf_reader, ElfReader::Create(kPath));
5959
ASSERT_OK_AND_ASSIGN(auto pair, ReadGoBuildInfo(elf_reader.get()));
6060
auto version = pair.first;
61-
EXPECT_THAT(version, StrEq("1.24.6"));
61+
EXPECT_THAT(version, StrEq("1.24.11"));
6262
}
6363

6464
TEST(ReadGoBuildInfoTest, BuildinfoLittleEndian) {

src/stirling/obj_tools/testdata/go/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ filegroup(
8181
# TODO(ddelnano): rules_go doesn't support populating .buildinfo with dependency information (https://github.com/bazel-contrib/rules_go/issues/3090).
8282
# Once this is supported, test_buildinfo_with_mods should be replaced with a bazel built binary.
8383
"test_buildinfo_with_mods",
84-
":test_go_1_23_binary",
8584
":test_go_1_24_binary",
85+
":test_go_1_25_binary",
8686
],
8787
)

src/stirling/scripts/benchmark_stirling_wrapper_http2_tracing.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ BAZEL_BUILD_CMD="bazel build --compilation_mode=opt"
2424

2525
TEST_EXE_BASE_DIR="bazel-bin/src/stirling/source_connectors/socket_tracer/protocols/http2/testing"
2626

27-
GRPC_CLIENT_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_23_grpc_client"
28-
GRPC_CLIENT_EXE="${TEST_EXE_BASE_DIR}/go_grpc_client/golang_1_23_grpc_client"
27+
GRPC_CLIENT_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client"
28+
GRPC_CLIENT_EXE="${TEST_EXE_BASE_DIR}/go_grpc_client/golang_1_24_grpc_client"
2929

30-
GRPC_SERVER_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_23_grpc_server"
31-
GRPC_SERVER_EXE="${TEST_EXE_BASE_DIR}/go_grpc_server/golang_1_23_grpc_server"
30+
GRPC_SERVER_LABEL="src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server"
31+
GRPC_SERVER_EXE="${TEST_EXE_BASE_DIR}/go_grpc_server/golang_1_24_grpc_server"
3232

3333
STIRLING_WRAPPER_LABEL="src/stirling/binaries:stirling_wrapper"
3434
STIRLING_WRAPPER_EXE="bazel-bin/src/stirling/binaries/stirling_wrapper"

src/stirling/source_connectors/dynamic_bpftrace/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ pl_cc_bpf_test(
3838
name = "dynamic_bpftrace_connector_bpf_test",
3939
srcs = ["dynamic_bpftrace_connector_bpf_test.cc"],
4040
data = [
41-
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_23_grpc_server_with_certs",
4241
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs",
42+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_25_grpc_server_with_certs",
4343
],
4444
tags = [
4545
"cpu:16",

src/stirling/source_connectors/dynamic_bpftrace/dynamic_bpftrace_connector_bpf_test.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -462,23 +462,23 @@ TEST(DynamicBPFTraceConnectorTest, BPFTraceCheckPrintfsError) {
462462
HasSubstr("All printf statements must have exactly the same format string")));
463463
}
464464

465-
constexpr std::string_view kServerPath_1_23 =
466-
"src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/"
467-
"golang_1_23_grpc_server";
468465
constexpr std::string_view kServerPath_1_24 =
469466
"src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/"
470467
"golang_1_24_grpc_server";
468+
constexpr std::string_view kServerPath_1_25 =
469+
"src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/"
470+
"golang_1_25_grpc_server";
471471

472472
TEST(DynamicBPFTraceConnectorTest, InsertUProbeTargetObjPaths) {
473-
std::string go1_23_binary_path = px::testing::BazelRunfilePath(kServerPath_1_23).string();
474473
std::string go1_24_binary_path = px::testing::BazelRunfilePath(kServerPath_1_24).string();
474+
std::string go1_25_binary_path = px::testing::BazelRunfilePath(kServerPath_1_25).string();
475475

476-
ASSERT_TRUE(fs::Exists(go1_23_binary_path));
477476
ASSERT_TRUE(fs::Exists(go1_24_binary_path));
477+
ASSERT_TRUE(fs::Exists(go1_25_binary_path));
478478

479479
DeploymentSpec spec;
480-
spec.mutable_path_list()->add_paths(go1_23_binary_path);
481480
spec.mutable_path_list()->add_paths(go1_24_binary_path);
481+
spec.mutable_path_list()->add_paths(go1_25_binary_path);
482482

483483
std::string uprobe_script =
484484
"// Deploys uprobes to trace http2 traffic.\n"
@@ -489,16 +489,16 @@ TEST(DynamicBPFTraceConnectorTest, InsertUProbeTargetObjPaths) {
489489
InsertUprobeTargetObjPaths(spec, &uprobe_script);
490490
EXPECT_EQ(
491491
uprobe_script,
492-
absl::StrCat("// Deploys uprobes to trace http2 traffic.\n", "uprobe:", go1_23_binary_path,
492+
absl::StrCat("// Deploys uprobes to trace http2 traffic.\n", "uprobe:", go1_24_binary_path,
493493
":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\",\n"
494494
"uprobe:",
495-
go1_24_binary_path,
495+
go1_25_binary_path,
496496
":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\""
497497
"{ printf(\"stream_id: %d, end_stream: %d\", arg0, arg1); }\n",
498-
"uretprobe:", go1_23_binary_path,
498+
"uretprobe:", go1_24_binary_path,
499499
":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\",\n"
500500
"uretprobe:",
501-
go1_24_binary_path,
501+
go1_25_binary_path,
502502
":\"golang.org/x/net/http2.(*Framer).WriteDataPadded\""
503503
"{ printf(\"retval: %d\", retval); }"));
504504
}

0 commit comments

Comments
 (0)