Skip to content

Commit b9c0e3f

Browse files
authored
run go 1.23 on latestdepth tests (#175)
* run go 1.23 on latestdepth tests
1 parent c2472a2 commit b9c0e3f

File tree

7 files changed

+44
-9
lines changed

7 files changed

+44
-9
lines changed

.github/workflows/latestdepth.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Go
2020
uses: actions/setup-go@v4
2121
with:
22-
go-version: '1.21'
22+
go-version: '1.23'
2323

2424
- name: Build
2525
run: make build

.github/workflows/muzzle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Go
2020
uses: actions/setup-go@v4
2121
with:
22-
go-version: '1.21'
22+
go-version: '1.23'
2323

2424
- name: Build
2525
run: make build

test/hertz/v0.9.0/go.mod

+7-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ require (
1414
require (
1515
github.com/bytedance/go-tagexpr/v2 v2.9.2 // indirect
1616
github.com/bytedance/gopkg v0.0.0-20220413063733-65bf48ffb3a7 // indirect
17-
github.com/bytedance/sonic v1.8.1 // indirect
17+
github.com/bytedance/sonic v1.12.4 // indirect
18+
github.com/bytedance/sonic/loader v0.2.1 // indirect
1819
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
20+
github.com/cloudwego/base64x v0.1.4 // indirect
21+
github.com/cloudwego/iasm v0.2.0 // indirect
1922
github.com/cloudwego/netpoll v0.5.0 // indirect
2023
github.com/fsnotify/fsnotify v1.5.4 // indirect
2124
github.com/go-logr/logr v1.4.2 // indirect
@@ -24,7 +27,7 @@ require (
2427
github.com/google/uuid v1.6.0 // indirect
2528
github.com/henrylee2cn/ameda v1.4.10 // indirect
2629
github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 // indirect
27-
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
30+
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
2831
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
2932
github.com/nyaruka/phonenumbers v1.0.55 // indirect
3033
github.com/tidwall/gjson v1.14.4 // indirect
@@ -34,7 +37,7 @@ require (
3437
go.opentelemetry.io/otel/metric v1.31.0 // indirect
3538
go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect
3639
go.opentelemetry.io/otel/trace v1.31.0 // indirect
37-
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
38-
golang.org/x/sys v0.26.0 // indirect
40+
golang.org/x/arch v0.12.0 // indirect
41+
golang.org/x/sys v0.27.0 // indirect
3942
google.golang.org/protobuf v1.33.0 // indirect
4043
)

test/hertz/v0.9.0/go.sum

+22
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,27 @@ github.com/bytedance/mockey v1.2.1/go.mod h1:+Jm/fzWZAuhEDrPXVjDf/jLM2BlLXJkwk94
77
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
88
github.com/bytedance/sonic v1.8.1 h1:NqAHCaGaTzro0xMmnTCLUyRlbEP6r8MCA1cJUrH3Pu4=
99
github.com/bytedance/sonic v1.8.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
10+
github.com/bytedance/sonic v1.12.4 h1:9Csb3c9ZJhfUWeMtpCDCq6BUoH5ogfDFLUgQ/jG+R0k=
11+
github.com/bytedance/sonic v1.12.4/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk=
12+
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
13+
github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E=
14+
github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
1015
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
1116
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
1217
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
18+
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
19+
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
1320
github.com/cloudwego/hertz v0.9.0 h1:vmgSMSBx3qgB+ZnqbuEwfy+BFMS1cMr1ZSddif9zZ3A=
1421
github.com/cloudwego/hertz v0.9.0/go.mod h1:WliNtVbwihWHHgAaIQEbVXl0O3aWj0ks1eoPrcEAnjs=
22+
github.com/cloudwego/hertz v0.9.1 h1:+jK9A6MDNTUVy6q/zSOlhbnp1fFMiOaPIsq0jlOfjZE=
23+
github.com/cloudwego/hertz v0.9.1/go.mod h1:cs8dH6unM4oaJ5k9m6pqbgLBPqakGWMG0+cthsxitsg=
24+
github.com/cloudwego/hertz v0.9.2 h1:VbqddZ5RuvcgxzfxvXcmTiRisGYoo0+WnHGeDJKhjqI=
25+
github.com/cloudwego/hertz v0.9.2/go.mod h1:cs8dH6unM4oaJ5k9m6pqbgLBPqakGWMG0+cthsxitsg=
26+
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
27+
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
1528
github.com/cloudwego/netpoll v0.5.0 h1:oRrOp58cPCvK2QbMozZNDESvrxQaEHW2dCimmwH1lcU=
1629
github.com/cloudwego/netpoll v0.5.0/go.mod h1:xVefXptcyheopwNDZjDPcfU6kIjZXZ4nY550k1yH9eQ=
30+
github.com/cloudwego/netpoll v0.6.0/go.mod h1:xVefXptcyheopwNDZjDPcfU6kIjZXZ4nY550k1yH9eQ=
1731
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1832
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1933
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -44,6 +58,9 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7
4458
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
4559
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
4660
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
61+
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
62+
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
63+
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
4764
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
4865
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
4966
github.com/nyaruka/phonenumbers v1.0.55 h1:bj0nTO88Y68KeUQ/n3Lo2KgK7lM1hF7L9NFuwcCl3yg=
@@ -89,6 +106,8 @@ go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06F
89106
golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4=
90107
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU=
91108
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
109+
golang.org/x/arch v0.12.0 h1:UsYJhbzPYGsT0HbEdmYcqtCv8UNGvnaL561NnIUvaKg=
110+
golang.org/x/arch v0.12.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
92111
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
93112
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
94113
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -97,6 +116,8 @@ golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBc
97116
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
98117
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
99118
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
119+
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
120+
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
100121
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
101122
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
102123
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -109,4 +130,5 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
109130
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
110131
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
111132
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
133+
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
112134
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=

test/hertz_tests.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ func init() {
2525
NewGeneralTestCase("hertz-090-basic-test-with-exception", hertz_module_name, "v0.9.0", "", "1.18", "1.22", TestBasicHertzWithException),
2626
NewGeneralTestCase("hertz-090-basic-test-with-regex", hertz_module_name, "v0.9.0", "", "1.18", "1.22", TestBasicHertzWithRegex),
2727
NewLatestDepthTestCase("hertz-090-basic-test-latestdepth", hertz_dependency_name, hertz_module_name, "v0.9.0", "", "1.18", "", TestBasicHertz),
28-
NewMuzzleTestCase("hertz-090-basic-muzzle", hertz_dependency_name, hertz_module_name, "v0.9.0", "", "1.18", "", []string{"test_hertz_basic.go", "basic_func.go"}))
28+
NewMuzzleTestCase("hertz-090-basic-muzzle", hertz_dependency_name, hertz_module_name, "v0.9.0", "v0.9.1", "1.18", "1.22.9", []string{"test_hertz_basic.go", "basic_func.go"}),
29+
NewMuzzleTestCase("hertz-090-basic-muzzle-high", hertz_dependency_name, hertz_module_name, "v0.9.1", "", "1.18", "", []string{"test_hertz_basic.go", "basic_func.go"}))
2930
}
3031

3132
func TestBasicHertz(t *testing.T, env ...string) {

test/infra.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"strings"
2424
"testing"
2525

26-
"github.com/alibaba/opentelemetry-go-auto-instrumentation/test/version"
2726
"github.com/alibaba/opentelemetry-go-auto-instrumentation/test/verifier"
27+
"github.com/alibaba/opentelemetry-go-auto-instrumentation/test/version"
2828

2929
"github.com/alibaba/opentelemetry-go-auto-instrumentation/tool/shared"
3030
"github.com/alibaba/opentelemetry-go-auto-instrumentation/tool/util"
@@ -102,10 +102,13 @@ func RunInstrument(t *testing.T, args ...string) {
102102
err := cmd.Run()
103103
if err != nil {
104104
stderr := readStderrLog(t)
105+
stdout := readStdoutLog(t)
106+
t.Log(stdout)
107+
t.Log("\n\n\n")
108+
t.Log(stderr)
105109
log1 := ReadPreprocessLog(t, shared.DebugLogFile)
106110
log2 := ReadInstrumentLog(t, shared.DebugLogFile)
107111
text := fmt.Sprintf("failed to run instrument: %v\n", err)
108-
text += fmt.Sprintf("stderr: %v\n", stderr)
109112
text += fmt.Sprintf("preprocess: %v\n", log1)
110113
text += fmt.Sprintf("instrument: %v\n", log2)
111114
t.Fatal(text)

test/test_main.go

+6
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ func NewGeneralTestCase(testName, moduleName, minVersion, maxVersion, minGoVersi
7777

7878
func NewMuzzleTestCase(testName, dependencyName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion string, muzzleClasses []string) *TestCase {
7979
c := NewGeneralTestCase(testName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion, nil)
80+
if c == nil {
81+
return nil
82+
}
8083
c.IsMuzzleCheck = true
8184
c.DependencyName = dependencyName
8285
c.MuzzleClasses = muzzleClasses
@@ -85,6 +88,9 @@ func NewMuzzleTestCase(testName, dependencyName, moduleName, minVersion, maxVers
8588

8689
func NewLatestDepthTestCase(testName, dependencyName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion string, latestTestFunc func(t *testing.T, env ...string)) *TestCase {
8790
c := NewGeneralTestCase(testName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion, nil)
91+
if c == nil {
92+
return nil
93+
}
8894
c.LatestDepthFunc = latestTestFunc
8995
c.DependencyName = dependencyName
9096
c.IsLatestDepthCheck = true

0 commit comments

Comments
 (0)