Skip to content

Commit b70029a

Browse files
committed
Remove unused bazel sdks in favor of docker build images. Update pl build system variables accordingly
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 1ad28c4 commit b70029a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+361
-674
lines changed

WORKSPACE

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -210,32 +210,6 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
210210

211211
gazelle_dependencies(go_sdk = "go_sdk")
212212

213-
# Download alternative go toolchains after all other dependencies, so that they aren't used by external dependencies.
214-
go_download_sdk(
215-
name = "go_sdk_1_18",
216-
version = "1.18.10",
217-
)
218-
219-
go_download_sdk(
220-
name = "go_sdk_1_19",
221-
version = "1.19.13",
222-
)
223-
224-
go_download_sdk(
225-
name = "go_sdk_1_20",
226-
version = "1.20.14",
227-
)
228-
229-
go_download_sdk(
230-
name = "go_sdk_1_21",
231-
version = "1.21.13",
232-
)
233-
234-
go_download_sdk(
235-
name = "go_sdk_1_22",
236-
version = "1.22.12",
237-
)
238-
239213
go_download_sdk(
240214
name = "go_sdk_1_23",
241215
version = "1.23.10",

bazel/container_images.bzl

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,83 @@ def stirling_test_images():
287287
repository = "mongo",
288288
digest = "sha256:19b2e5c91f92c7b18113a1501c5a5fe52b71a6c6d2a5232eeebb4f2abacae04a",
289289
)
290+
291+
# Tag: 1.0
292+
# Arch: linux/amd64
293+
_container_image(
294+
name = "golang_1_18_https_server_with_buildinfo",
295+
repository = "golang_1_18_https_server_with_buildinfo",
296+
digest = "sha256:d4468289a2a4f2520effc48dd8894c998867b6638953302ef4156983dbf6e4e5",
297+
)
298+
299+
# Tag: 1.0
300+
# Arch: linux/amd64
301+
_container_image(
302+
name = "golang_1_19_https_server_with_buildinfo",
303+
repository = "golang_1_19_https_server_with_buildinfo",
304+
digest = "sha256:8a35dab46ccd9af53704f8c83a8d3b28bf142f8e038696b2ba30b7df1c46df73",
305+
)
306+
307+
# Tag: 1.0
308+
# Arch: linux/amd64
309+
_container_image(
310+
name = "golang_1_20_https_server_with_buildinfo",
311+
repository = "golang_1_20_https_server_with_buildinfo",
312+
digest = "sha256:c21f14e2213f4d9826926eeb3a0e7c7445789539561b43981bbca3efafcad8d7",
313+
)
314+
315+
# Tag: 1.0
316+
# Arch: linux/amd64
317+
_container_image(
318+
name = "golang_1_21_https_server_with_buildinfo",
319+
repository = "golang_1_21_https_server_with_buildinfo",
320+
digest = "sha256:abb4573171c0a46afd4c704d8bbd6d123f022c5ad0448869311b026d0586106b",
321+
)
322+
323+
# Tag: 1.0
324+
# Arch: linux/amd64
325+
_container_image(
326+
name = "golang_1_22_https_server_with_buildinfo",
327+
repository = "golang_1_22_https_server_with_buildinfo",
328+
digest = "sha256:0f14818a1046dfdb7d5ac27e173d99e071219897a1d9969c8d7604acbd0d9541",
329+
)
330+
331+
# Tag: 1.0
332+
# Arch: linux/amd64
333+
_container_image(
334+
name = "golang_1_18_grpc_server_with_buildinfo",
335+
repository = "golang_1_18_grpc_server_with_buildinfo",
336+
digest = "sha256:e59a94abb2c505f680829951161a0a0209de0d02307da951c5a76d7b84a72034",
337+
)
338+
339+
# Tag: 1.0
340+
# Arch: linux/amd64
341+
_container_image(
342+
name = "golang_1_19_grpc_server_with_buildinfo",
343+
repository = "golang_1_19_grpc_server_with_buildinfo",
344+
digest = "sha256:88b1ae2096af629152a645f77b9c47dcac45dde95fb78376c6fdf1f7183a652b",
345+
)
346+
347+
# Tag: 1.0
348+
# Arch: linux/amd64
349+
_container_image(
350+
name = "golang_1_20_grpc_server_with_buildinfo",
351+
repository = "golang_1_20_grpc_server_with_buildinfo",
352+
digest = "sha256:a35e24a44c53d6f984eb633bbb15e318374a61fa426ccc5e580d587ce7f6a788",
353+
)
354+
355+
# Tag: 1.0
356+
# Arch: linux/amd64
357+
_container_image(
358+
name = "golang_1_21_grpc_server_with_buildinfo",
359+
repository = "golang_1_21_grpc_server_with_buildinfo",
360+
digest = "sha256:998654168565a7d4ed1c73edbafc48042879ac26581972a8ba23fe5a39e520f2",
361+
)
362+
363+
# Tag: 1.0
364+
# Arch: linux/amd64
365+
_container_image(
366+
name = "golang_1_22_grpc_server_with_buildinfo",
367+
repository = "golang_1_22_grpc_server_with_buildinfo",
368+
digest = "sha256:67adba5e8513670fa37bd042862e7844f26239e8d2997ed8c3b0aa527bc04cc3",
369+
)

bazel/pl_build_system.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ load("@rules_python//python:defs.bzl", "py_test")
2424
load("//bazel:toolchain_transitions.bzl", "qemu_interactive_runner")
2525

2626
pl_boringcrypto_go_sdk = ["1.23.9"]
27-
pl_supported_go_sdk_versions = ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23", "1.24"]
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"]
2829

2930
# The last version in this list corresponds to the boringcrypto go sdk version.
3031
pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk

src/stirling/bpf_tools/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pl_cc_bpf_test(
127127
],
128128
deps = [
129129
":cc_library",
130-
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_19_grpc_client_container",
131-
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_19_grpc_server_container",
130+
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_client_container",
131+
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_server_container",
132132
],
133133
)

src/stirling/bpf_tools/uprobe_extra_trigger_bpf_test.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "src/common/testing/testing.h"
2222
#include "src/stirling/bpf_tools/bcc_wrapper.h"
2323
#include "src/stirling/bpf_tools/macros.h"
24-
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_client_container.h"
25-
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h"
24+
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h"
25+
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h"
2626

2727
namespace px {
2828
namespace stirling {
@@ -55,10 +55,10 @@ TEST(BCCWrapper, DISABLED_UnexpectedExtraTrigger) {
5555
BCCWrapperImpl bcc_wrapper;
5656
ASSERT_OK(bcc_wrapper.InitBPFProgram(kBCCProgram));
5757

58-
::px::stirling::testing::Go1_19_GRPCServerContainer server1;
59-
::px::stirling::testing::Go1_19_GRPCServerContainer server2;
60-
::px::stirling::testing::Go1_19_GRPCClientContainer client1;
61-
::px::stirling::testing::Go1_19_GRPCClientContainer client2;
58+
::px::stirling::testing::Go1_24_GRPCServerContainer server1;
59+
::px::stirling::testing::Go1_24_GRPCServerContainer server2;
60+
::px::stirling::testing::Go1_24_GRPCClientContainer client1;
61+
::px::stirling::testing::Go1_24_GRPCClientContainer client2;
6262

6363
// A Uprobe template for the GRPCServerContainer.
6464
// Binary path is set later.
@@ -70,7 +70,7 @@ TEST(BCCWrapper, DISABLED_UnexpectedExtraTrigger) {
7070
};
7171

7272
// A templated path to the server. We will replace $0 with the pid of the server instance.
73-
const std::string kServerPath = "/proc/$0/root/golang_1_19_grpc_tls_server_binary";
73+
const std::string kServerPath = "/proc/$0/root/golang_1_24_grpc_tls_server_binary";
7474

7575
// Run server 1 and attach uprobes to it.
7676
ASSERT_OK(server1.Run(std::chrono::seconds{60}));

src/stirling/e2e_tests/BUILD.bazel

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ pl_sh_bpf_test(
8888
srcs = ["stirling_wrapper_bpf_test.sh"],
8989
args = [
9090
"$(location //src/stirling/binaries:stirling_wrapper)",
91-
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_19_grpc_server_with_certs)",
92-
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_19_grpc_client)",
91+
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs)",
92+
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client)",
9393
"-stirling_profiler_java_agent_libs %s" % agent_libs_arg,
9494
],
9595
data = [
9696
"//src/stirling/binaries:stirling_wrapper",
97-
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_19_grpc_client",
98-
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_19_grpc_server_with_certs",
97+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client",
98+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs",
9999
] + agent_libs,
100100
# TODO(PL-1462): Uprobe attaching sometimes fails.
101101
flaky = True,
@@ -132,13 +132,13 @@ pl_sh_bpf_test(
132132
srcs = ["stirling_wrapper_container_bpf_test.sh"],
133133
args = [
134134
"$(location //src/stirling/binaries:stirling_wrapper_image.tar)",
135-
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_19_grpc_server_with_certs)",
136-
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_19_grpc_client)",
135+
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs)",
136+
"$(location //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client)",
137137
],
138138
data = [
139139
"//src/stirling/binaries:stirling_wrapper_image.tar",
140-
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_19_grpc_client",
141-
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_19_grpc_server_with_certs",
140+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client",
141+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs",
142142
],
143143
flaky = True,
144144
tags = [

src/stirling/obj_tools/BUILD.bazel

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ pl_cc_test(
5252
"//src/stirling/obj_tools/testdata/cc:stripped_exe",
5353
"//src/stirling/obj_tools/testdata/cc:test_exe_debug_target",
5454
"//src/stirling/obj_tools/testdata/cc:test_exe_debuglink_target",
55-
"//src/stirling/obj_tools/testdata/go:test_go_1_19_binary",
56-
"//src/stirling/obj_tools/testdata/go:test_go_1_19_nm_output",
55+
"//src/stirling/obj_tools/testdata/go:test_go_1_24_binary",
56+
"//src/stirling/obj_tools/testdata/go:test_go_1_24_nm_output",
5757
],
5858
deps = [
5959
":cc_library",
@@ -89,7 +89,7 @@ pl_cc_test(
8989
data = [
9090
"//src/stirling/obj_tools/testdata/cc:test_exe_fixture",
9191
"//src/stirling/obj_tools/testdata/go:test_binaries",
92-
"//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_1_19_grpc_tls_server_binary",
92+
"//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_1_24_grpc_tls_server_binary",
9393
],
9494
deps = [
9595
":cc_library",
@@ -137,8 +137,7 @@ pl_cc_test(
137137
"//src/stirling/obj_tools/testdata/go:test_binaries",
138138
"//src/stirling/obj_tools/testdata/go:test_buildinfo_with_mods",
139139
"//src/stirling/obj_tools/testdata/go:test_go_1_17_binary",
140-
"//src/stirling/obj_tools/testdata/go:test_go_1_19_binary",
141-
"//src/stirling/obj_tools/testdata/go:test_go_1_21_binary",
140+
"//src/stirling/obj_tools/testdata/go:test_go_1_24_binary",
142141
],
143142
deps = [
144143
":cc_library",
@@ -185,7 +184,7 @@ pl_cc_binary(
185184
name = "dwarf_reader_benchmark",
186185
testonly = 1,
187186
srcs = ["dwarf_reader_benchmark.cc"],
188-
data = ["//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_1_19_grpc_tls_server_binary"],
187+
data = ["//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_1_24_grpc_tls_server_binary"],
189188
deps = [
190189
":cc_library",
191190
"//src/common/testing:cc_library",

src/stirling/obj_tools/dwarf_reader_benchmark.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ using px::stirling::obj_tools::DwarfReader;
2626
using px::testing::BazelRunfilePath;
2727

2828
constexpr std::string_view kBinary =
29-
"src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_19_grpc_tls_server_binary_/"
30-
"golang_1_19_grpc_tls_server_binary";
29+
"src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server_binary_/"
30+
"golang_1_24_grpc_tls_server_binary";
3131

3232
struct SymAddrs {
3333
// Members of net/http.http2serverConn.

src/stirling/obj_tools/elf_reader_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ TEST(ElfReaderTest, FuncByteCode) {
303303

304304
TEST(ElfReaderTest, GolangAppRuntimeBuildVersion) {
305305
const std::string kPath =
306-
px::testing::BazelRunfilePath("src/stirling/obj_tools/testdata/go/test_go_1_19_binary");
306+
px::testing::BazelRunfilePath("src/stirling/obj_tools/testdata/go/test_go_1_24_binary");
307307
const std::string kGoBinNmOutput =
308-
px::testing::BazelRunfilePath("src/stirling/obj_tools/testdata/go/test_go_1_19_nm_output");
308+
px::testing::BazelRunfilePath("src/stirling/obj_tools/testdata/go/test_go_1_24_nm_output");
309309
ASSERT_OK_AND_ASSIGN(std::unique_ptr<ElfReader> elf_reader, ElfReader::Create(kPath));
310310
ASSERT_OK_AND_ASSIGN(ElfReader::SymbolInfo symbol,
311311
elf_reader->SearchTheOnlySymbol("runtime.buildVersion"));

src/stirling/obj_tools/go_syms_test.cc

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ constexpr std::string_view kTestGoWithModulesBinaryPath =
4646
"src/stirling/obj_tools/testdata/go/test_buildinfo_with_mods";
4747

4848
constexpr std::string_view kTestGoBinaryPath =
49-
"src/stirling/obj_tools/testdata/go/test_go_1_19_binary";
50-
constexpr std::string_view kTestGo1_21BinaryPath =
51-
"src/stirling/obj_tools/testdata/go/test_go_1_21_binary";
49+
"src/stirling/obj_tools/testdata/go/test_go_1_24_binary";
50+
constexpr std::string_view kTestGo1_24BinaryPath =
51+
"src/stirling/obj_tools/testdata/go/test_go_1_24_binary";
5252

5353
// The "endian agnostic" case refers to where the Go version data is varint encoded
5454
// directly within the buildinfo header. See the following reference for more details.
@@ -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.19.13"));
61+
EXPECT_THAT(version, StrEq("1.24.4"));
6262
}
6363

6464
TEST(ReadGoBuildInfoTest, BuildinfoLittleEndian) {
@@ -222,7 +222,7 @@ INSTANTIATE_TEST_SUITE_P(
222222
ElfGolangItableTestSuite, ElfGolangItableTest,
223223
::testing::Values(
224224
std::make_tuple(
225-
kTestGo1_21BinaryPath,
225+
kTestGo1_24BinaryPath,
226226
UnorderedElementsAre(
227227
Pair("fmt.State",
228228
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name, "*fmt.pp"))),
@@ -238,23 +238,23 @@ INSTANTIATE_TEST_SUITE_P(
238238
Field(&IntfImplTypeInfo::type_name, "*errors.errorString"),
239239
Field(&IntfImplTypeInfo::type_name, "syscall.Errno"),
240240
Field(&IntfImplTypeInfo::type_name, "*io/fs.PathError"),
241+
Field(&IntfImplTypeInfo::type_name, "*os.SyscallError"),
241242
Field(&IntfImplTypeInfo::type_name, "runtime.errorString"),
243+
Field(&IntfImplTypeInfo::type_name, "runtime.plainError"),
242244
Field(&IntfImplTypeInfo::type_name, "internal/poll.errNetClosing"),
243245
Field(&IntfImplTypeInfo::type_name,
244246
"*internal/poll.DeadlineExceededError"),
245247
Field(&IntfImplTypeInfo::type_name, "*internal/bisect.parseError"))),
246248
Pair("io.Writer",
247249
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name, "*os.File"))),
248-
Pair("sort.Interface", UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
249-
"*internal/fmtsort.SortedMap"))),
250250
Pair("reflect.Type",
251251
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name, "*reflect.rtype"))),
252252
Pair("math/rand.Source64", UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
253-
"*math/rand.fastSource"))),
253+
"*math/rand.runtimeSource"))),
254254
Pair("math/rand.Source", UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
255255
"*math/rand.lockedSource"),
256256
Field(&IntfImplTypeInfo::type_name,
257-
"*math/rand.fastSource"))))),
257+
"*math/rand.runtimeSource"))))),
258258
std::make_tuple(
259259
kTestGoBinaryPath,
260260
UnorderedElementsAre(
@@ -263,20 +263,28 @@ INSTANTIATE_TEST_SUITE_P(
263263
Field(&IntfImplTypeInfo::type_name, "main.IntStruct"),
264264
Field(&IntfImplTypeInfo::type_name, "*errors.errorString"),
265265
Field(&IntfImplTypeInfo::type_name, "*io/fs.PathError"),
266+
Field(&IntfImplTypeInfo::type_name, "*os.SyscallError"),
267+
Field(&IntfImplTypeInfo::type_name, "runtime.errorString"),
268+
Field(&IntfImplTypeInfo::type_name, "runtime.plainError"),
269+
Field(&IntfImplTypeInfo::type_name, "syscall.Errno"),
270+
Field(&IntfImplTypeInfo::type_name, "internal/poll.errNetClosing"),
266271
Field(&IntfImplTypeInfo::type_name,
267272
"*internal/poll.DeadlineExceededError"),
268-
Field(&IntfImplTypeInfo::type_name, "internal/poll.errNetClosing"),
269-
Field(&IntfImplTypeInfo::type_name, "runtime.errorString"),
270-
Field(&IntfImplTypeInfo::type_name, "syscall.Errno"))),
271-
Pair("sort.Interface", UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
272-
"*internal/fmtsort.SortedMap"))),
273+
Field(&IntfImplTypeInfo::type_name, "*internal/bisect.parseError"))),
273274
Pair("math/rand.Source", UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
274-
"*math/rand.lockedSource"))),
275+
"*math/rand.lockedSource"),
276+
Field(&IntfImplTypeInfo::type_name,
277+
"*math/rand.runtimeSource"))),
278+
Pair("math/rand.Source64", UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
279+
"*math/rand.runtimeSource"))),
280+
Pair("internal/bisect.Writer",
281+
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
282+
"*internal/godebug.runtimeStderr"))),
275283
Pair("io.Writer",
276284
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name, "*os.File"))),
277285
Pair("internal/reflectlite.Type",
278286
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name,
279-
"*internal/reflectlite.rtype"))),
287+
"internal/reflectlite.rtype"))),
280288
Pair("reflect.Type",
281289
UnorderedElementsAre(Field(&IntfImplTypeInfo::type_name, "*reflect.rtype"))),
282290
Pair("fmt.State",

0 commit comments

Comments
 (0)