From febc629ac8510db9efa8c9d9ba8dc6a6059f4591 Mon Sep 17 00:00:00 2001 From: James Bartlett Date: Tue, 15 Aug 2023 07:17:40 -0700 Subject: [PATCH] [build] Add go1.21.0 (#1672) --- Makefile | 2 +- WORKSPACE | 8 +++- bazel/external/rules_go.patch | 21 +++++---- bazel/pl_build_system.bzl | 5 +-- bazel/repository_locations.bzl | 18 ++++---- docker.properties | 8 ++-- go.mod | 2 +- go.sum | 13 ++++++ go_deps.bzl | 11 ++++- src/carnot/planner/ir/BUILD.bazel | 2 +- src/cloud/vzconn/bridge/BUILD.bazel | 2 +- .../perf_tool/pkg/cluster/gke/BUILD.bazel | 2 +- src/stirling/obj_tools/dwarf_reader_test.cc | 7 ++- .../obj_tools/testdata/go/BUILD.bazel | 1 + .../perf_profiler/symbolizers/BUILD.bazel | 2 +- .../socket_tracer/BUILD.bazel | 6 +++ .../socket_tracer/go_tls_trace_bpf_test.cc | 9 +++- .../socket_tracer/grpc_trace_bpf_test.cc | 1 + .../socket_tracer/http2_trace_bpf_test.cc | 9 +++- .../testing/container_images/BUILD.bazel | 1 + .../go_1_21_grpc_client_container.h | 45 +++++++++++++++++++ .../go_1_21_grpc_server_container.h | 45 +++++++++++++++++++ .../go_1_21_tls_client_container.h | 45 +++++++++++++++++++ .../go_1_21_tls_server_container.h | 45 +++++++++++++++++++ .../chef/cookbooks/px_dev/attributes/linux.rb | 4 +- .../cookbooks/px_dev/attributes/mac_os_x.rb | 4 +- 26 files changed, 275 insertions(+), 43 deletions(-) create mode 100644 src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_client_container.h create mode 100644 src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h create mode 100644 src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_client_container.h create mode 100644 src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h diff --git a/Makefile b/Makefile index c4f65645e35..1d2db23887f 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ test-tsan: ## Run all the tests, with thread sanitizer. .PHONY: go-mod-tidy go-mod-tidy: ## Ensure that go are cleaned up. - go mod tidy -compat=1.20 + go mod tidy -compat=1.21 .PHONY: go-mod-ensure go-mod-ensure: ## Ensure that go dependencies exist. diff --git a/WORKSPACE b/WORKSPACE index 111f5ca7eb4..01f96533a72 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -33,7 +33,7 @@ pl_go_overrides() go_download_sdk( name = "go_sdk", - version = "1.20.5", + version = "1.21.0", ) go_rules_dependencies() @@ -229,6 +229,11 @@ go_download_sdk( version = "1.20.5", ) +go_download_sdk( + name = "go_sdk_1_21", + version = "1.21.0", +) + # The go_sdk_boringcrypto SDK is used for testing boringcrypto specific functionality (TLS tracing). # This SDK is used for specific test cases and is not meant to be used wholesale for a particular go # version. @@ -239,6 +244,7 @@ go_download_sdk( go_download_sdk( name = "go_sdk_boringcrypto", experiments = ["boringcrypto"], + # TODO(james): update this to 1.21.0, once there is a 1.21.1 release. version = "1.20.4", ) diff --git a/bazel/external/rules_go.patch b/bazel/external/rules_go.patch index 8877b24364e..d2c12a5dd30 100644 --- a/bazel/external/rules_go.patch +++ b/bazel/external/rules_go.patch @@ -1,14 +1,13 @@ diff --git a/go/private/actions/stdlib.bzl b/go/private/actions/stdlib.bzl -index 11a8278f..7346aecd 100644 +index abacbc80..09b2c9bf 100644 --- a/go/private/actions/stdlib.bzl +++ b/go/private/actions/stdlib.bzl -@@ -92,7 +92,8 @@ def _build_stdlib(go): - ldflags = [ - option - for option in extldflags_from_cc_toolchain(go) -- if option not in ("-lstdc++", "-lc++") -+ if option not in ("-lstdc++", "-lc++", "-l:libstdc++.a", "-l:libc++.a", "-l:libc++abi.a") and -+ not (option.startswith("-fsanitize") or option.startswith("-fno-sanitize")) - ] - env.update({ - "CGO_ENABLED": "1", +@@ -100,7 +100,7 @@ def _build_env(go): + ldflags = [ + option + for option in extldflags_from_cc_toolchain(go) +- if option not in ("-lstdc++", "-lc++", "-static") and option not in COVERAGE_OPTIONS_DENYLIST ++ if option not in ("-lstdc++", "-lc++", "-static", "-l:libstdc++.a", "-l:libc++.a", "-l:libc++abi.a") and option not in COVERAGE_OPTIONS_DENYLIST + ] + env.update({ + "CGO_ENABLED": "1", diff --git a/bazel/pl_build_system.bzl b/bazel/pl_build_system.bzl index 19d4692635e..e281aa624e2 100644 --- a/bazel/pl_build_system.bzl +++ b/bazel/pl_build_system.bzl @@ -24,7 +24,7 @@ load("@rules_python//python:defs.bzl", "py_test") load("//bazel:toolchain_transitions.bzl", "qemu_interactive_runner") pl_boringcrypto_go_sdk = ["1.20.4"] -pl_supported_go_sdk_versions = ["1.16", "1.17", "1.18", "1.19", "1.20"] +pl_supported_go_sdk_versions = ["1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] # The last version in this list corresponds to the boringcrypto go sdk version. pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk @@ -148,7 +148,6 @@ def pl_cc_library_internal( copts = [], includes = [], visibility = None, - external_deps = [], tcmalloc_dep = False, repository = "", linkstamp = None, @@ -196,7 +195,6 @@ def pl_cc_binary( args = [], testonly = 0, visibility = None, - external_deps = [], repository = "", stamp = 0, tags = [], @@ -318,7 +316,6 @@ def pl_cc_test_library( srcs = [], hdrs = [], data = [], - external_deps = [], deps = [], visibility = None, repository = "", diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 02846426350..af1d84f1361 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -16,10 +16,10 @@ REPOSITORY_LOCATIONS = dict( bazel_gazelle = dict( - sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d", + sha256 = "29218f8e0cebe583643cbf93cae6f971be8a2484cdcfa1e45057658df8d54002", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz", ], ), bazel_skylib = dict( @@ -62,9 +62,9 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/arun11299/cpp-jwt/archive/refs/tags/v1.1.1.tar.gz"], ), com_github_bazelbuild_buildtools = dict( - sha256 = "d368c47bbfc055010f118efb2962987475418737e901f7782d2a966d1dc80296", - strip_prefix = "buildtools-4.2.5", - urls = ["https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.5.tar.gz"], + sha256 = "977a0bd4593c8d4c8f45e056d181c35e48aa01ad4f8090bdb84f78dca42f47dc", + strip_prefix = "buildtools-6.1.2", + urls = ["https://github.com/bazelbuild/buildtools/archive/refs/tags/v6.1.2.tar.gz"], ), com_github_cameron314_concurrentqueue = dict( sha256 = "eb37336bf9ae59aca7b954db3350d9b30d1cab24b96c7676f36040aa76e915e8", @@ -415,10 +415,10 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"], ), io_bazel_rules_go = dict( - sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d", + sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", ], ), io_bazel_rules_k8s = dict( diff --git a/docker.properties b/docker.properties index 45c30d5b7ad..66f3e5f1b95 100644 --- a/docker.properties +++ b/docker.properties @@ -1,4 +1,4 @@ -DOCKER_IMAGE_TAG=202306170607 -LINTER_IMAGE_DIGEST=f9826c782c047279ba348c51b04595680be68dd0d33d0d87a3fedb275626c0db -DEV_IMAGE_DIGEST=b3508ad90d22f77d1a77cbc2d69a9e61846b6b6978cbef117bd9a2e18ce04248 -DEV_IMAGE_WITH_EXTRAS_DIGEST=32f74b898f226df8c49042c8435ff9bcd3aed2cc9932f83893a81ae839738ccc +DOCKER_IMAGE_TAG=202308141857 +LINTER_IMAGE_DIGEST=ac78d64a06b7174e013f81b0fa5682eb4d580ea61dae5a67ac8b3d34863f115e +DEV_IMAGE_DIGEST=0408c793b8954ca96e6712b574993845bcabfc2d6c28fd07ea409929da95cb0e +DEV_IMAGE_WITH_EXTRAS_DIGEST=13c1b60494e08f7f8380d601646e7884c58e905901a29cc0a201d7b664a69079 diff --git a/go.mod b/go.mod index 65e6889dd14..0a0bacbba40 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module px.dev/pixie -go 1.20 +go 1.21 require ( cloud.google.com/go v0.81.0 diff --git a/go.sum b/go.sum index 3b4d47c9149..ab2416664de 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,7 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7O github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= @@ -65,6 +66,7 @@ github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/g github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/assert/v2 v2.0.3 h1:WKqJODfOiQG0nEJKFKzDIG3E29CN2/4zR9XGJzKIkbg= +github.com/alecthomas/assert/v2 v2.0.3/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= @@ -79,6 +81,7 @@ github.com/alecthomas/participle/v2 v2.0.0-beta.5/go.mod h1:RC764t6n4L8D8ITAJv0q github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -106,6 +109,7 @@ github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go github.com/bazelbuild/rules_go v0.35.0 h1:ViPR65vOrg74JKntAUFY6qZkheBKGB6to7wFd8gCRU4= github.com/bazelbuild/rules_go v0.35.0/go.mod h1:ahciH68Viyxtm/gvCQplaAiu8buhf/b+gWswcPjFixI= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -145,6 +149,7 @@ github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= @@ -203,6 +208,7 @@ github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55k github.com/docker/cli v20.10.11+incompatible h1:tXU1ezXcruZQRrMP8RN2z9N91h+6egZTS1gsPsKantc= github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -214,6 +220,7 @@ github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elliotchance/orderedmap v1.5.0 h1:1IsExUsjv5XNBD3ZdC7jkAAqLWOOKdbPTmkHx63OsBg= github.com/elliotchance/orderedmap v1.5.0/go.mod h1:wsDwEaX5jEoyhbs7x93zk2H/qv0zwuhg4inXhDkYqys= github.com/emicklei/dot v0.10.1 h1:bkzvwgIhhw/cuxxnJy5/5+ZL3GnhFxFfv0eolHtWE2w= @@ -284,6 +291,7 @@ github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= @@ -517,6 +525,7 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -760,9 +769,11 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -799,6 +810,7 @@ github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5/go.mod h1:iIss55rK github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1035,6 +1047,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= diff --git a/go_deps.bzl b/go_deps.bzl index ad179940dc6..ba892fd1210 100644 --- a/go_deps.bzl +++ b/go_deps.bzl @@ -1662,6 +1662,7 @@ def pl_go_dependencies(): go_repository( name = "com_github_googleapis_gax_go_v2", build_directives = ["gazelle:map_kind go_binary pl_go_binary @px//bazel:pl_build_system.bzl", "gazelle:map_kind go_test pl_go_test @px//bazel:pl_build_system.bzl"], + build_file_proto_mode = "disable", importpath = "github.com/googleapis/gax-go/v2", sum = "h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ=", version = "v2.7.0", @@ -1763,7 +1764,13 @@ def pl_go_dependencies(): ) go_repository( name = "com_github_grpc_ecosystem_grpc_gateway", - build_directives = ["gazelle:map_kind go_binary pl_go_binary @px//bazel:pl_build_system.bzl", "gazelle:map_kind go_test pl_go_test @px//bazel:pl_build_system.bzl"], + build_directives = [ + "gazelle:map_kind go_binary pl_go_binary @px//bazel:pl_build_system.bzl", + "gazelle:map_kind go_test pl_go_test @px//bazel:pl_build_system.bzl", + "gazelle:exclude third_party", + ], + # Force generation of new build files for this package, required due to changes in how gazelle handles @go_googleapis. + build_file_generation = "on", build_naming_convention = "go_default_library", importpath = "github.com/grpc-ecosystem/grpc-gateway", sum = "h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=", @@ -1772,6 +1779,8 @@ def pl_go_dependencies(): go_repository( name = "com_github_grpc_ecosystem_grpc_gateway_v2", build_directives = ["gazelle:map_kind go_binary pl_go_binary @px//bazel:pl_build_system.bzl", "gazelle:map_kind go_test pl_go_test @px//bazel:pl_build_system.bzl"], + # Force generation of new build files for this package, required due to changes in how gazelle handles @go_googleapis. + build_file_generation = "on", importpath = "github.com/grpc-ecosystem/grpc-gateway/v2", sum = "h1:gDLXvp5S9izjldquuoAhDzccbskOL6tDC5jMSyx3zxE=", version = "v2.15.2", diff --git a/src/carnot/planner/ir/BUILD.bazel b/src/carnot/planner/ir/BUILD.bazel index f3683cf8c24..55b3ac401d4 100644 --- a/src/carnot/planner/ir/BUILD.bazel +++ b/src/carnot/planner/ir/BUILD.bazel @@ -30,8 +30,8 @@ pl_cc_library( "**/*_test_utils.h", ], ) + [ - "ir_nodes.inl", "expressions.inl", + "ir_nodes.inl", "operators.inl", ], hdrs = glob( diff --git a/src/cloud/vzconn/bridge/BUILD.bazel b/src/cloud/vzconn/bridge/BUILD.bazel index 6cb1e886590..39bf0474500 100644 --- a/src/cloud/vzconn/bridge/BUILD.bazel +++ b/src/cloud/vzconn/bridge/BUILD.bazel @@ -72,7 +72,7 @@ pl_go_test( "@com_github_spf13_viper//:viper", "@com_github_stretchr_testify//assert", "@com_github_stretchr_testify//require", - "@go_googleapis//google/rpc:code_go_proto", + "@org_golang_google_genproto//googleapis/rpc/code", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//credentials/insecure", "@org_golang_google_grpc//metadata", diff --git a/src/e2e_test/perf_tool/pkg/cluster/gke/BUILD.bazel b/src/e2e_test/perf_tool/pkg/cluster/gke/BUILD.bazel index f6ab2f8e797..6ce7e4cdab3 100644 --- a/src/e2e_test/perf_tool/pkg/cluster/gke/BUILD.bazel +++ b/src/e2e_test/perf_tool/pkg/cluster/gke/BUILD.bazel @@ -31,9 +31,9 @@ go_library( "@com_github_cenkalti_backoff_v4//:backoff", "@com_github_sirupsen_logrus//:logrus", "@com_google_cloud_go//container/apiv1", - "@go_googleapis//google/container/v1:container_go_proto", "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", "@org_golang_google_api//option", + "@org_golang_google_genproto//googleapis/container/v1:container", "@org_golang_google_grpc//codes", "@org_golang_google_grpc//status", ], diff --git a/src/stirling/obj_tools/dwarf_reader_test.cc b/src/stirling/obj_tools/dwarf_reader_test.cc index 5352a2ac2da..62c999c3872 100644 --- a/src/stirling/obj_tools/dwarf_reader_test.cc +++ b/src/stirling/obj_tools/dwarf_reader_test.cc @@ -32,6 +32,8 @@ constexpr std::string_view kTestGo1_19Binary = "src/stirling/obj_tools/testdata/go/test_go_1_19_binary"; constexpr std::string_view kTestGo1_20Binary = "src/stirling/obj_tools/testdata/go/test_go_1_20_binary"; +constexpr std::string_view kTestGo1_21Binary = + "src/stirling/obj_tools/testdata/go/test_go_1_21_binary"; constexpr std::string_view kGoGRPCServer = "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_19_grpc_tls_server_binary"; constexpr std::string_view kCppBinary = "src/stirling/obj_tools/testdata/cc/test_exe_/test_exe"; @@ -43,6 +45,7 @@ const auto kGo1_17BinaryPath = px::testing::BazelRunfilePath(kTestGo1_17Binary); const auto kGo1_18BinaryPath = px::testing::BazelRunfilePath(kTestGo1_18Binary); const auto kGo1_19BinaryPath = px::testing::BazelRunfilePath(kTestGo1_19Binary); const auto kGo1_20BinaryPath = px::testing::BazelRunfilePath(kTestGo1_20Binary); +const auto kGo1_21BinaryPath = px::testing::BazelRunfilePath(kTestGo1_21Binary); const auto kGoServerBinaryPath = px::testing::BazelRunfilePath(kGoGRPCServer); const auto kGoBinaryUnconventionalPath = px::testing::BazelRunfilePath(kGoBinaryUnconventional); @@ -567,7 +570,9 @@ INSTANTIATE_TEST_SUITE_P(GolangDwarfReaderParameterizedTest, GolangDwarfReaderTe DwarfReaderTestParam{kGo1_19BinaryPath, true}, DwarfReaderTestParam{kGo1_19BinaryPath, false}, DwarfReaderTestParam{kGo1_20BinaryPath, true}, - DwarfReaderTestParam{kGo1_20BinaryPath, false})); + DwarfReaderTestParam{kGo1_20BinaryPath, false}, + DwarfReaderTestParam{kGo1_21BinaryPath, true}, + DwarfReaderTestParam{kGo1_21BinaryPath, false})); INSTANTIATE_TEST_SUITE_P(GolangDwarfReaderParameterizedIndexTest, GolangDwarfReaderIndexTest, ::testing::Values(true, false)); diff --git a/src/stirling/obj_tools/testdata/go/BUILD.bazel b/src/stirling/obj_tools/testdata/go/BUILD.bazel index 2d6649343c7..8ee1ac31481 100644 --- a/src/stirling/obj_tools/testdata/go/BUILD.bazel +++ b/src/stirling/obj_tools/testdata/go/BUILD.bazel @@ -65,5 +65,6 @@ filegroup( ":test_go_1_18_binary", ":test_go_1_19_binary", ":test_go_1_20_binary", + ":test_go_1_21_binary", ], ) diff --git a/src/stirling/source_connectors/perf_profiler/symbolizers/BUILD.bazel b/src/stirling/source_connectors/perf_profiler/symbolizers/BUILD.bazel index 4305060d91d..f6eb7d4b790 100644 --- a/src/stirling/source_connectors/perf_profiler/symbolizers/BUILD.bazel +++ b/src/stirling/source_connectors/perf_profiler/symbolizers/BUILD.bazel @@ -52,8 +52,8 @@ pl_cc_test( "--java_image_name $(location %s)" % java_image_tar, ], data = [ + "//src/stirling/source_connectors/perf_profiler/testing/java", "//src/stirling/source_connectors/perf_profiler/testing/java:profiler_test", - "//src/stirling/source_connectors/perf_profiler/testing/java:java", ] + [java_image_tar] + agent_libs + [px_jattach], tags = [ "requires_root", diff --git a/src/stirling/source_connectors/socket_tracer/BUILD.bazel b/src/stirling/source_connectors/socket_tracer/BUILD.bazel index 33a44f41cb3..b908d2a30bf 100644 --- a/src/stirling/source_connectors/socket_tracer/BUILD.bazel +++ b/src/stirling/source_connectors/socket_tracer/BUILD.bazel @@ -307,12 +307,14 @@ pl_cc_bpf_test( "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_18_grpc_client", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_19_grpc_client", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_20_grpc_client", + "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_21_grpc_client", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_boringcrypto_grpc_client", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_16_grpc_server_with_certs", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_17_grpc_server_with_certs", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_18_grpc_server_with_certs", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_19_grpc_server_with_certs", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_20_grpc_server_with_certs", + "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_21_grpc_server_with_certs", "//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_boringcrypto_grpc_server_with_certs", ], flaky = True, @@ -356,6 +358,8 @@ pl_cc_bpf_test( "//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_client_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_client_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_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:product_catalog_client_container", @@ -553,6 +557,8 @@ pl_cc_bpf_test( "//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_client_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_client_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_boringcrypto_tls_client_container", "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_server_container", "//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 e3ad3048d2b..6c66e0a0c0d 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 @@ -28,6 +28,8 @@ #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_client_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_client_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_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/protocol_checkers.h" @@ -87,6 +89,11 @@ struct Go1_20TLSClientServerContainers { using GoTLSClientContainer = ::px::stirling::testing::Go1_20_TLSClientContainer; }; +struct Go1_21TLSClientServerContainers { + using GoTLSServerContainer = ::px::stirling::testing::Go1_21_TLSServerContainer; + using GoTLSClientContainer = ::px::stirling::testing::Go1_21_TLSClientContainer; +}; + struct GoBoringCryptoTLSClientServerContainers { using GoTLSServerContainer = ::px::stirling::testing::GoBoringCryptoTLSServerContainer; using GoTLSClientContainer = ::px::stirling::testing::GoBoringCryptoTLSClientContainer; @@ -94,7 +101,7 @@ struct GoBoringCryptoTLSClientServerContainers { typedef ::testing::Types + Go1_21TLSClientServerContainers, GoBoringCryptoTLSClientServerContainers> GoVersions; TYPED_TEST_SUITE(GoTLSTraceTest, GoVersions); 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 7c17e1f94b8..084cac55a6f 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 @@ -194,6 +194,7 @@ INSTANTIATE_TEST_SUITE_P(SecurityModeTest, GRPCTraceTest, TestParams{"1_18", false, true}, TestParams{"1_18", true, false}, TestParams{"1_19", false, false}, TestParams{"1_19", true, true}, TestParams{"1_20", true, true}, TestParams{"1_20", true, false}, + TestParams{"1_21", true, true}, TestParams{"1_21", true, false}, TestParams{"boringcrypto", true, true})); class PyGRPCTraceTest : public testing::SocketTraceBPFTestFixture { 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 3b7813a8f65..4b9a3708fab 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 @@ -29,6 +29,8 @@ #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_client_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_client_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_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/product_catalog_client_container.h" @@ -91,6 +93,11 @@ struct Go1_20GRPCClientServerContainers { using ClientContainer = ::px::stirling::testing::Go1_20_GRPCClientContainer; }; +struct Go1_21GRPCClientServerContainers { + using ServerContainer = ::px::stirling::testing::Go1_21_GRPCServerContainer; + using ClientContainer = ::px::stirling::testing::Go1_21_GRPCClientContainer; +}; + struct GoBoringCryptoGRPCClientServerContainers { using ServerContainer = ::px::stirling::testing::GoBoringCryptoGRPCServerContainer; using ClientContainer = ::px::stirling::testing::GoBoringCryptoGRPCClientContainer; @@ -98,7 +105,7 @@ struct GoBoringCryptoGRPCClientServerContainers { typedef ::testing::Types + Go1_21GRPCClientServerContainers, GoBoringCryptoGRPCClientServerContainers> GoVersions; TYPED_TEST_SUITE(HTTP2TraceTest, GoVersions); 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 c8d52cac1de..934009dea6d 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 @@ -22,6 +22,7 @@ pl_supported_go_sdk_versions = [ "1.18", "1.19", "1.20", + "1.21", ] pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_client_container.h new file mode 100644 index 00000000000..3cf4e91ef72 --- /dev/null +++ b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_client_container.h @@ -0,0 +1,45 @@ +/* + * 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_GRPCClientContainer : public ContainerRunner { + public: + Go1_21_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_21_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_21_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h new file mode 100644 index 00000000000..00ceb84e000 --- /dev/null +++ b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h @@ -0,0 +1,45 @@ +/* + * 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) {} + + private: + static constexpr std::string_view kBazelImageTar = + "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_21_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_21_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_client_container.h new file mode 100644 index 00000000000..5a22d65df81 --- /dev/null +++ b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_client_container.h @@ -0,0 +1,45 @@ +/* + * 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_TLSClientContainer : public ContainerRunner { + public: + Go1_21_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_21_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_21_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h new file mode 100644 index 00000000000..331e1b28339 --- /dev/null +++ b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h @@ -0,0 +1,45 @@ +/* + * 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) {} + + private: + static constexpr std::string_view kBazelImageTar = + "src/stirling/testing/demo_apps/go_https/server/golang_1_21_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/tools/chef/cookbooks/px_dev/attributes/linux.rb b/tools/chef/cookbooks/px_dev/attributes/linux.rb index 1abddf03a7c..0c938ef3fff 100644 --- a/tools/chef/cookbooks/px_dev/attributes/linux.rb +++ b/tools/chef/cookbooks/px_dev/attributes/linux.rb @@ -33,9 +33,9 @@ '648b599397548e4bb92429eec6391374c2cbb0edb835e3b3f03d4281c011f401' default['golang']['download_path'] = - 'https://go.dev/dl/go1.20.5.linux-amd64.tar.gz' + 'https://go.dev/dl/go1.21.0.linux-amd64.tar.gz' default['golang']['sha256'] = - 'd7ec48cde0d3d2be2c69203bc3e0a44de8660b9c09a6e85c4732a3f7dc442612' + 'd0398903a16ba2232b389fb31032ddf57cac34efda306a0eebac34f0965a0742' default['golangci-lint']['download_path'] = 'https://github.com/golangci/golangci-lint/releases/download/v1.51.1/golangci-lint-1.51.1-linux-amd64.tar.gz' diff --git a/tools/chef/cookbooks/px_dev/attributes/mac_os_x.rb b/tools/chef/cookbooks/px_dev/attributes/mac_os_x.rb index eca44a1b793..11d9e60c8c3 100644 --- a/tools/chef/cookbooks/px_dev/attributes/mac_os_x.rb +++ b/tools/chef/cookbooks/px_dev/attributes/mac_os_x.rb @@ -34,9 +34,9 @@ '8d3709d957c7115610e764621569728be102d213fee15bc1d1aa9d465eb2c258' default['golang']['download_path'] = - 'https://go.dev/dl/go1.20.5.darwin-amd64.tar.gz' + 'https://go.dev/dl/go1.21.0.darwin-amd64.tar.gz' default['golang']['sha256'] = - '79715ca5b8becd120703ac9af5d1da749e095d2b9bf830c4f3af4b15b2cb049d' + 'b314de9f704ab122c077d2ec8e67e3670affe8865479d1f01991e7ac55d65e70' default['golangci-lint']['download_path'] = 'https://github.com/golangci/golangci-lint/releases/download/v1.51.1/golangci-lint-1.51.1-darwin-amd64.tar.gz'