diff --git a/agent/go.mod b/agent/go.mod index c7411ad9c2..a682f6c2dc 100644 --- a/agent/go.mod +++ b/agent/go.mod @@ -1,6 +1,6 @@ module github.com/kubeshop/tracetest/agent -go 1.20 +go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 diff --git a/cli/go.mod b/cli/go.mod index bfc2f7d805..abe3ad58c4 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -1,6 +1,6 @@ module github.com/kubeshop/tracetest/cli -go 1.20 +go 1.21 require ( github.com/Jeffail/gabs/v2 v2.7.0 @@ -12,7 +12,7 @@ require ( github.com/denisbrodbeck/machineid v1.0.1 github.com/goccy/go-yaml v1.11.0 github.com/goware/urlx v0.3.2 - github.com/kubeshop/tracetest/agent v0.0.0-20230911135458-f5c6ebe2e380 + github.com/kubeshop/tracetest/agent v0.0.0-20230907210810-84198fc9f4ef github.com/kubeshop/tracetest/server v0.0.0-20230809150857-6314696222d3 github.com/pterm/pterm v0.12.55 github.com/spf13/cobra v1.7.0 diff --git a/cli/go.sum b/cli/go.sum index 026b1400ff..a74cc30143 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -1,4 +1,5 @@ atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg= +atomicgo.dev/assert v0.0.2/go.mod h1:ut4NcI3QDdJtlmAxQULOmA13Gz6e2DWbSAS8RUOmNYQ= atomicgo.dev/cursor v0.1.1 h1:0t9sxQomCTRh5ug+hAMCs59x/UmC9QL6Ci5uosINKD4= atomicgo.dev/cursor v0.1.1/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU= atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8= @@ -45,7 +46,9 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7 cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -127,6 +130,7 @@ github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzX github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c= github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE= github.com/MarvinJWendt/testza v0.5.2 h1:53KDo64C1z/h/d/stCYCPY69bt/OSwjq5KpFNwi+zB4= +github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc4n3EjyIYvEY= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -138,6 +142,7 @@ github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JP github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -168,6 +173,7 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/participle/v2 v2.0.0-alpha8 h1:X6nuChfgfQXNTE+ZdjTFSfnSNr8E07LSVLAqIIjtsGI= +github.com/alecthomas/participle/v2 v2.0.0-alpha8/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= 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= @@ -226,6 +232,7 @@ github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -242,6 +249,7 @@ github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+Wji github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= github.com/brianvoe/gofakeit/v6 v6.17.0 h1:obbQTJeHfktJtiZzq0Q1bEpsNUs+yHrYlPVWt7BtmJ4= +github.com/brianvoe/gofakeit/v6 v6.17.0/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= @@ -255,6 +263,7 @@ github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEe github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= @@ -425,12 +434,15 @@ github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 h1:Aq github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31/go.mod h1:XrR+08YQxO57vT8gtNmhLfHy/YIutMmmEeKMhU7zXqY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= +github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= 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-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -480,6 +492,7 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fluidtruck/deepcopy v1.0.0 h1:StSep9r2WwYwDfoO7CWu1a8cZT5y3UUOelGxlSvFxIw= github.com/fluidtruck/deepcopy v1.0.0/go.mod h1:AinXaEHc7itYqWSjX9OOwxBbM8/ELusxM8WSwP4RroM= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -491,6 +504,7 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -628,10 +642,14 @@ github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI= +github.com/go-redis/redis/v7 v7.4.1/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -689,6 +707,7 @@ github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-migrate/migrate/v4 v4.15.2 h1:vU+M05vs6jWHKDdmE1Ecwj0BznygFc4QsdRe2E/L7kc= +github.com/golang-migrate/migrate/v4 v4.15.2/go.mod h1:f2toGLkYqD3JH+Todi4aZ2ZdbeUNx4sIwiOK96rE9Lw= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= @@ -753,6 +772,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -806,6 +826,7 @@ github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1: github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -815,6 +836,7 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/goware/urlx v0.3.2 h1:gdoo4kBHlkqZNaf6XlQ12LGtQOmpKJrR04Rc3RnpJEo= github.com/goware/urlx v0.3.2/go.mod h1:h8uwbJy68o+tQXCGZNa9D73WN8n0r9OBae5bUnLcgjw= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -930,10 +952,15 @@ github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0k github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/j2gg0s/otsql v0.14.0 h1:keAORDX9RoQcc47KPE/wAyHZPCA7eI8uhXafpVcrWZ8= +github.com/j2gg0s/otsql v0.14.0/go.mod h1:AV9j/Nmw/qkSR74IAeCnsCQIQCXt7RR5XUZIxwQq6+Y= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg= +github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= github.com/jackc/puddle/v2 v2.2.0 h1:RdcDk92EJBuBS55nQMMYFXTxwstHug4jkhT5pq8VxPk= +github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= @@ -993,6 +1020,7 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= +github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/knadh/koanf v1.4.3 h1:rSJcSH5LSFhvzBRsAYfT3k7eLP0I4UxeZqjtAatk+wc= @@ -1013,8 +1041,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubeshop/tracetest/agent v0.0.0-20230911135458-f5c6ebe2e380 h1:IZxjqHq3xV1nXbvUGVKSRf2NxonFLPmYtCPsLclvZqU= -github.com/kubeshop/tracetest/agent v0.0.0-20230911135458-f5c6ebe2e380/go.mod h1:99N6MkFTPMvfjafUVVy/yEFC/wDDXrE6NYDBUds31CI= +github.com/kubeshop/tracetest/agent v0.0.0-20230907210810-84198fc9f4ef h1:nGJP1wzFkIiYk842dwwHLzFpNXu17oyb3uoVujIDYK8= +github.com/kubeshop/tracetest/agent v0.0.0-20230907210810-84198fc9f4ef/go.mod h1:99N6MkFTPMvfjafUVVy/yEFC/wDDXrE6NYDBUds31CI= github.com/kubeshop/tracetest/server v0.0.0-20230809150857-6314696222d3 h1:vHwRPIkSN65w3fodVH5guMbIjEBaXVavNShdBTFN4NQ= github.com/kubeshop/tracetest/server v0.0.0-20230809150857-6314696222d3/go.mod h1:K5glIMRTzMw18u3jWl2KdOYD7cTo9Oq+LAjq1OVciHE= github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= @@ -1024,8 +1052,10 @@ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4F github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.5 h1:J+gdV2cUmX7ZqL2B0lFcW0m+egaHC2V3lpO8nWxyYiQ= +github.com/lib/pq v1.10.5/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v1.2.1/go.mod h1:x/7+BoaKd4unViBmS2umdjYyVAmpFtBtEXZ0wou7FYQ= @@ -1152,6 +1182,7 @@ github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/ohler55/ojg v1.14.4 h1:L2ds8AlB5t/QbqSfhRwvagJzQ7pgmdrefMIypQs0Xik= +github.com/ohler55/ojg v1.14.4/go.mod h1:7Ghirupn8NC8hSSDpI0gcjorPxj+vSVIONDWfliHR1k= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= @@ -1183,6 +1214,7 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= +github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1214,6 +1246,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/orlangure/gnomock v0.20.0 h1:YrgEekKJrglY0EOFnmIl46KjULufxdTeVvs9Y5CsYYE= +github.com/orlangure/gnomock v0.20.0/go.mod h1:N535y2x1yCqcNNCycTCHqBrpy0Nn/fBdTtZkbzOAWes= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -1224,6 +1257,7 @@ github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUr github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -1345,6 +1379,7 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/segmentio/analytics-go/v3 v3.2.1 h1:G+f90zxtc1p9G+WigVyTR0xNfOghOGs/PYAlljLOyeg= +github.com/segmentio/analytics-go/v3 v3.2.1/go.mod h1:p8owAF8X+5o27jmvUognuXxdtqvSGtD0ZrfY2kcS9bE= github.com/segmentio/backo-go v1.0.1 h1:68RQccglxZeyURy93ASB/2kc9QudzgIDexJ927N++y4= github.com/segmentio/backo-go v1.0.1/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= @@ -1405,6 +1440,7 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1529,6 +1565,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector v0.60.0 h1:rHndW/xILGjNoFaYIvwYpngZnRWw1oQT6GLtzxIs7pw= go.opentelemetry.io/collector v0.60.0/go.mod h1:n2KBSgs7AakuedVxLR/Tayl3EEztmngrrjZBsYS+qBI= go.opentelemetry.io/collector/pdata v0.60.0 h1:jCNR5jtUom2FcUu30h4tw7enZytwGnXX6fs/K2FM/A0= @@ -1549,8 +1586,11 @@ go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydA go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.6.0 h1:w45y7bV0cy526utxqIdPU4FQmoptIhdpwlLPtCoMaPc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.6.0/go.mod h1:Yp+np0jiDujJ7horgIIxZkLlZv97ooiGkrNUTGHDcy0= go.opentelemetry.io/otel/metric v0.32.0 h1:lh5KMDB8xlMM4kwE38vlZJ3rZeiWrjw3As1vclfC01k= go.opentelemetry.io/otel/metric v0.32.0/go.mod h1:PVDNTt297p8ehm949jsIzd+Z2bIZJYQQG/uuHTeWFHY= go.opentelemetry.io/otel/sdk v1.5.0/go.mod h1:CU4J1v+7iEljnm1G14QjdFWOXUyYLHVh0Lh+/BTYyFg= @@ -1761,6 +1801,7 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2255,6 +2296,7 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= +gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/go.work b/go.work index 158a1edb66..718f8e26b3 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.20 +go 1.21 use ( ./agent diff --git a/go.work.sum b/go.work.sum index 54eddebb8b..39fdd8a9b9 100644 --- a/go.work.sum +++ b/go.work.sum @@ -65,6 +65,7 @@ cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2H cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= @@ -97,6 +98,7 @@ cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LK cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= @@ -125,6 +127,7 @@ cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1r cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= @@ -134,29 +137,53 @@ cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= github.com/Azure/azure-sdk-for-go v59.4.0+incompatible h1:gDA8odnngdNd3KYHL2NoK1j9vpWBgEnFSjKKLpkC8Aw= +github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc4n3EjyIYvEY= +github.com/Shopify/toxiproxy/v2 v2.5.0/go.mod h1:yhM2epWtAmel9CB8r2+L+PCmhH6yH2pITaPAo7jxJl0= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= +github.com/containerd/containerd v1.6.2/go.mod h1:sidY30/InSE1j2vdD1ihtKoJz+lWdaXMdiAeIupaf+s= github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/deepmap/oapi-codegen v1.10.1/go.mod h1:TvVmDQlUkFli9gFij/gtW1o+tFBr4qCHyv2zG+R0YZY= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/elastic/go-elasticsearch/v7 v7.17.1/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= +github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/gocql/gocql v0.0.0-20210817081954-bc256bbb90de/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= @@ -168,9 +195,12 @@ github.com/hashicorp/consul/api v1.18.0/go.mod h1:owRRGJ9M5xReDC5nfT8FTJrNAPbT4N github.com/hashicorp/consul/sdk v0.13.0/go.mod h1:0hs/l5fOVhJy/VdcoaNqUSi2AUs95eF5WKtv+EYIQqE= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/influxdata/influxdb-client-go/v2 v2.8.2/go.mod h1:x7Jo5UHHl+w8wu8UnGiNobDDHygojXwJX4mx7rXGKMk= +github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/pgconn v1.8.0 h1:FmjZ0rOyXTr1wfWs45i4a9vjnjWUAGpMuQLD9OSs+lw= @@ -183,9 +213,15 @@ github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHF github.com/jackc/pgtype v1.6.2 h1:b3pDeuhbbzBYcg5kwNmNDun4pFUD/0AAr1kLXZLeNt8= github.com/jackc/pgx/v4 v4.10.1 h1:/6Q3ye4myIj6AaplUm+eRcz4OhK9HAvFf4ePsG40LJY= github.com/jackc/puddle v1.1.3 h1:JnPg/5Q9xVJGfjsO5CPUOjnJps1JaRUm8I9FXVCFK94= +github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= @@ -196,15 +232,22 @@ github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/sagikazarmark/crypt v0.9.0/go.mod h1:RnH7sEhxfdnPm1z+XMgSLjWTEIjyK4z2dw6+4vHTMuo= +github.com/segmentio/conf v1.2.0/go.mod h1:Y3B9O/PqqWqjyxyWWseyj/quPEtMu1zDp/kVbSWWaB0= +github.com/segmentio/kafka-go v0.4.31/go.mod h1:m1lXeqJtIFYZayv0shM/tjrAFljvWLTprxBHd+3PnaU= github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/etcd/api/v3 v3.5.6/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.6/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/v2 v2.305.6/go.mod h1:BHha8XJGe8vCIBfWBpbBLVZ4QjOIlfoouvOwydu63E0= go.etcd.io/etcd/client/v3 v3.5.6/go.mod h1:f6GRinRMCsFVv9Ht42EyY7nfsVGwrNO0WEoS2pRKzQk= +go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/semconv v0.60.0/go.mod h1:aRkHuJ/OshtDFYluKEtnG5nkKTsy1HZuvZVHmakx+Vo= go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= @@ -216,6 +259,7 @@ go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85 go.opentelemetry.io/otel/exporters/prometheus v0.31.0/go.mod h1:QarXIB8L79IwIPoNgG3A6zNvBgVmcppeFogV1d8612s= go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= +go.opentelemetry.io/otel/sdk/export/metric v0.26.0/go.mod h1:UpqzSnUOjFeSIVQLPp3pYIXfB/MiMFyXXzYT/bercxQ= go.opentelemetry.io/otel/sdk/metric v0.31.0/go.mod h1:fl0SmNnX9mN9xgU6OLYLMBMrNAsaZQi7qBwprwO3abk= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -247,6 +291,7 @@ golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= @@ -275,3 +320,11 @@ google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= +k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= +k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= diff --git a/run.sh b/run.sh index 689b0aaf1c..8830aef652 100755 --- a/run.sh +++ b/run.sh @@ -29,6 +29,7 @@ ps() { } down() { + docker compose $opts kill docker compose $opts down } diff --git a/server/app/app.go b/server/app/app.go index 5626ec379b..3c39835d8b 100644 --- a/server/app/app.go +++ b/server/app/app.go @@ -46,6 +46,8 @@ import ( var ( Version = "dev" Env = "dev" + + pgChannelName = "tracetest_queue" ) var EmptyDemoEnabled []string diff --git a/server/app/test_pipeline.go b/server/app/test_pipeline.go index 914687e3a0..5277a2ecaa 100644 --- a/server/app/test_pipeline.go +++ b/server/app/test_pipeline.go @@ -9,6 +9,7 @@ import ( "github.com/kubeshop/tracetest/server/executor/trigger" "github.com/kubeshop/tracetest/server/linter/analyzer" "github.com/kubeshop/tracetest/server/model" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/tracedb" @@ -93,7 +94,7 @@ func buildTestPipeline( cancelRunHandlerFn := executor.HandleRunCancelation(execTestUpdater, tracer, eventEmitter) - queueBuilder := executor.NewQueueBuilder(). + queueBuilder := executor.NewQueueConfigurer(). WithCancelRunHandlerFn(cancelRunHandlerFn). WithSubscriptor(subscriptionManager). WithDataStoreGetter(dsRepo). @@ -102,18 +103,18 @@ func buildTestPipeline( WithRunGetter(runRepo). WithInstanceID(instanceID) - pgQueue := executor.NewPostgresQueueDriver(pool) + pgQueue := pipeline.NewPostgresQueueDriver[executor.Job](pool, pgChannelName) - pipeline := executor.NewPipeline(queueBuilder, - executor.PipelineStep{Processor: triggerResolverWorker, Driver: pgQueue.Channel("trigger_resolve")}, - executor.PipelineStep{Processor: triggerExecuterWorker, Driver: pgQueue.Channel("trigger_execute")}, - executor.PipelineStep{Processor: triggerResultProcessorWorker, Driver: pgQueue.Channel("trigger_result")}, - executor.PipelineStep{Processor: tracePoller, Driver: pgQueue.Channel("tracePoller")}, - executor.PipelineStep{Processor: linterRunner, Driver: pgQueue.Channel("linterRunner")}, - executor.PipelineStep{Processor: assertionRunner, Driver: pgQueue.Channel("assertionRunner")}, + pipeline := pipeline.New(queueBuilder, + pipeline.Step[executor.Job]{Processor: triggerResolverWorker, Driver: pgQueue.Channel("trigger_resolve")}, + pipeline.Step[executor.Job]{Processor: triggerExecuterWorker, Driver: pgQueue.Channel("trigger_execute")}, + pipeline.Step[executor.Job]{Processor: triggerResultProcessorWorker, Driver: pgQueue.Channel("trigger_result")}, + pipeline.Step[executor.Job]{Processor: tracePoller, Driver: pgQueue.Channel("tracePoller")}, + pipeline.Step[executor.Job]{Processor: linterRunner, Driver: pgQueue.Channel("linterRunner")}, + pipeline.Step[executor.Job]{Processor: assertionRunner, Driver: pgQueue.Channel("assertionRunner")}, ) - const assertionRunnerStepIndex = 3 + const assertionRunnerStepIndex = 5 return executor.NewTestPipeline( pipeline, diff --git a/server/app/test_suite_pipeline.go b/server/app/test_suite_pipeline.go index 560b0b7822..15c5f86a2f 100644 --- a/server/app/test_suite_pipeline.go +++ b/server/app/test_suite_pipeline.go @@ -2,6 +2,7 @@ package app import ( "github.com/kubeshop/tracetest/server/executor" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/testsuite" ) @@ -13,12 +14,12 @@ func buildTestSuitePipeline( subscriptionManager *subscription.Manager, ) *executor.TestSuitesPipeline { tranRunner := executor.NewTestSuiteRunner(testRunner, runRepo, subscriptionManager) - queueBuilder := executor.NewQueueBuilder(). + queueBuilder := executor.NewQueueConfigurer(). WithTestSuiteGetter(tranRepo). WithTestSuiteRunGetter(runRepo) - pipeline := executor.NewPipeline(queueBuilder, - executor.PipelineStep{Processor: tranRunner, Driver: executor.NewInMemoryQueueDriver("testSuiteRunner")}, + pipeline := pipeline.New(queueBuilder, + pipeline.Step[executor.Job]{Processor: tranRunner, Driver: pipeline.NewInMemoryQueueDriver[executor.Job]("testSuiteRunner")}, ) return executor.NewTestSuitePipeline( diff --git a/server/executor/assertion_runner.go b/server/executor/assertion_runner.go index 616f908b4d..b004ecdb47 100644 --- a/server/executor/assertion_runner.go +++ b/server/executor/assertion_runner.go @@ -10,6 +10,7 @@ import ( "github.com/kubeshop/tracetest/server/expression" "github.com/kubeshop/tracetest/server/model/events" "github.com/kubeshop/tracetest/server/pkg/maps" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/variableset" @@ -39,7 +40,7 @@ func NewAssertionRunner( } } -func (e *defaultAssertionRunner) SetOutputQueue(Enqueuer) { +func (e *defaultAssertionRunner) SetOutputQueue(pipeline.Enqueuer[Job]) { // this is a no-op, as assertion runner does not need to enqueue anything } diff --git a/server/executor/linter_runner.go b/server/executor/linter_runner.go index f16881c1d8..b754ce2d13 100644 --- a/server/executor/linter_runner.go +++ b/server/executor/linter_runner.go @@ -9,6 +9,7 @@ import ( "github.com/kubeshop/tracetest/server/linter" "github.com/kubeshop/tracetest/server/linter/analyzer" "github.com/kubeshop/tracetest/server/model/events" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" ) @@ -22,7 +23,7 @@ type defaultLinterRunner struct { subscriptionManager *subscription.Manager eventEmitter EventEmitter analyzerGetter AnalyzerGetter - outputQueue Enqueuer + outputQueue pipeline.Enqueuer[Job] } func NewlinterRunner( @@ -39,7 +40,7 @@ func NewlinterRunner( } } -func (e *defaultLinterRunner) SetOutputQueue(queue Enqueuer) { +func (e *defaultLinterRunner) SetOutputQueue(queue pipeline.Enqueuer[Job]) { e.outputQueue = queue } diff --git a/server/executor/queue.go b/server/executor/queue.go index 09dc5c1f9a..76f99031e3 100644 --- a/server/executor/queue.go +++ b/server/executor/queue.go @@ -9,12 +9,11 @@ import ( "log" "strconv" - "github.com/alitto/pond" - "github.com/kubeshop/tracetest/server/datastore" "github.com/kubeshop/tracetest/server/executor/pollingprofile" "github.com/kubeshop/tracetest/server/http/middleware" "github.com/kubeshop/tracetest/server/pkg/id" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/testsuite" @@ -23,9 +22,6 @@ import ( ) const ( - QueueWorkerCount = 20 - QueueWorkerBufferSize = QueueWorkerCount * 1_000 // 1k jobs per worker - JobCountHeader string = "X-Tracetest-Job-Count" ) @@ -150,14 +146,6 @@ func (j *Job) IncreaseEnqueueCount() { j.Headers.SetInt(JobCountHeader, j.EnqueueCount()+1) } -type Enqueuer interface { - Enqueue(context.Context, Job) -} - -type QueueItemProcessor interface { - ProcessItem(context.Context, Job) -} - type pollingProfileGetter interface { Get(context.Context, id.ID) (pollingprofile.PollingProfile, error) } @@ -186,16 +174,7 @@ type subscriptor interface { Subscribe(string, subscription.Subscriber) } -type Listener interface { - Listen(Job) -} - -type QueueDriver interface { - Enqueue(Job) - SetListener(Listener) -} - -type QueueBuilder struct { +type queueConfigurer[T any] struct { cancelRunHandlerFn func(ctx context.Context, run test.Run) error subscriptor subscriptor @@ -211,57 +190,57 @@ type QueueBuilder struct { instanceID string } -func NewQueueBuilder() *QueueBuilder { - return &QueueBuilder{} +func NewQueueConfigurer() *queueConfigurer[Job] { + return &queueConfigurer[Job]{} } -func (qb *QueueBuilder) WithCancelRunHandlerFn(fn func(ctx context.Context, run test.Run) error) *QueueBuilder { +func (qb *queueConfigurer[T]) WithCancelRunHandlerFn(fn func(ctx context.Context, run test.Run) error) *queueConfigurer[T] { qb.cancelRunHandlerFn = fn return qb } -func (qb *QueueBuilder) WithSubscriptor(subscriptor subscriptor) *QueueBuilder { +func (qb *queueConfigurer[T]) WithSubscriptor(subscriptor subscriptor) *queueConfigurer[T] { qb.subscriptor = subscriptor return qb } -func (qb *QueueBuilder) WithRunGetter(runs testRunGetter) *QueueBuilder { +func (qb *queueConfigurer[T]) WithRunGetter(runs testRunGetter) *queueConfigurer[T] { qb.runs = runs return qb } -func (qb *QueueBuilder) WithInstanceID(id string) *QueueBuilder { +func (qb *queueConfigurer[T]) WithInstanceID(id string) *queueConfigurer[T] { qb.instanceID = id return qb } -func (qb *QueueBuilder) WithTestGetter(tests testGetter) *QueueBuilder { +func (qb *queueConfigurer[T]) WithTestGetter(tests testGetter) *queueConfigurer[T] { qb.tests = tests return qb } -func (qb *QueueBuilder) WithPollingProfileGetter(pollingProfiles pollingProfileGetter) *QueueBuilder { +func (qb *queueConfigurer[T]) WithPollingProfileGetter(pollingProfiles pollingProfileGetter) *queueConfigurer[T] { qb.pollingProfiles = pollingProfiles return qb } -func (qb *QueueBuilder) WithDataStoreGetter(dataStore dataStoreGetter) *QueueBuilder { +func (qb *queueConfigurer[T]) WithDataStoreGetter(dataStore dataStoreGetter) *queueConfigurer[T] { qb.dataStores = dataStore return qb } -func (qb *QueueBuilder) WithTestSuiteGetter(suites testSuiteGetter) *QueueBuilder { +func (qb *queueConfigurer[T]) WithTestSuiteGetter(suites testSuiteGetter) *queueConfigurer[T] { qb.testSuites = suites return qb } -func (qb *QueueBuilder) WithTestSuiteRunGetter(suiteRuns testSuiteRunGetter) *QueueBuilder { +func (qb *queueConfigurer[T]) WithTestSuiteRunGetter(suiteRuns testSuiteRunGetter) *queueConfigurer[T] { qb.testSuiteRuns = suiteRuns return qb } -func (qb *QueueBuilder) Build(driver QueueDriver, itemProcessor QueueItemProcessor) *Queue { - queue := &Queue{ +func (qb *queueConfigurer[T]) Configure(queue *pipeline.Queue[Job]) { + q := &Queue{ cancelRunHandlerFn: qb.cancelRunHandlerFn, subscriptor: qb.subscriptor, @@ -274,16 +253,12 @@ func (qb *QueueBuilder) Build(driver QueueDriver, itemProcessor QueueItemProcess pollingProfiles: qb.pollingProfiles, dataStores: qb.dataStores, - driver: driver, - itemProcessor: itemProcessor, - workerPool: pond.New(QueueWorkerCount, QueueWorkerBufferSize), - instanceID: qb.instanceID, } - driver.SetListener(queue) + queue.EnqueuePreprocessorFn = q.enqueuePreprocess + queue.ListenPreprocessorFn = q.listenPreprocess - return queue } type Queue struct { @@ -299,101 +274,59 @@ type Queue struct { pollingProfiles pollingProfileGetter dataStores dataStoreGetter - itemProcessor QueueItemProcessor - driver QueueDriver - workerPool *pond.WorkerPool - instanceID string } -func (q *Queue) SetDriver(driver QueueDriver) { - q.driver = driver - driver.SetListener(q) -} - func propagator() propagation.TextMapPropagator { return propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}, tenantPropagator{}) } -func (q Queue) Enqueue(ctx context.Context, job Job) { - select { - default: - case <-ctx.Done(): - return +func (q Queue) enqueuePreprocess(ctx context.Context, input Job) Job { + if input.Headers == nil { + input.Headers = &headers{} } + propagator().Inject(ctx, propagation.MapCarrier(*input.Headers)) + input.Headers.Set("InstanceID", q.instanceID) - // use a worker to enqueue the job in case the driver takes a bit to actually enqueue - // this way we release the caller as soon as possible - q.workerPool.Submit(func() { - if job.Headers == nil { - job.Headers = &headers{} - } - propagator().Inject(ctx, propagation.MapCarrier(*job.Headers)) - job.Headers.Set("InstanceID", q.instanceID) - - version := 1 - if job.Test.Version != nil { - version = *job.Test.Version - } - - newJob := Job{ - Headers: job.Headers, + version := 1 + if input.Test.Version != nil { + version = *input.Test.Version + } - Test: test.Test{ID: job.Test.ID}, - Run: test.Run{ID: job.Run.ID, TestVersion: version, TraceID: job.Run.TraceID}, + return Job{ + Headers: input.Headers, - TestSuite: testsuite.TestSuite{ID: job.TestSuite.ID}, - TestSuiteRun: testsuite.TestSuiteRun{ID: job.TestSuiteRun.ID}, + Test: test.Test{ID: input.Test.ID}, + Run: test.Run{ID: input.Run.ID, TestVersion: version, TraceID: input.Run.TraceID}, - PollingProfile: pollingprofile.PollingProfile{ID: job.PollingProfile.ID}, - DataStore: datastore.DataStore{ID: job.DataStore.ID}, - } - log.Printf("queue: enqueuing job for run %d", job.Run.ID) + TestSuite: testsuite.TestSuite{ID: input.TestSuite.ID}, + TestSuiteRun: testsuite.TestSuiteRun{ID: input.TestSuiteRun.ID}, - q.driver.Enqueue(newJob) - }) + PollingProfile: pollingprofile.PollingProfile{ID: input.PollingProfile.ID}, + DataStore: datastore.DataStore{ID: input.DataStore.ID}, + } } -func (q Queue) Listen(job Job) { +func (q Queue) listenPreprocess(ctx context.Context, job Job) (context.Context, Job) { log.Printf("queue: received job for run %d", job.Run.ID) // this is called when a new job is put in the queue and we need to process it - ctx := propagator().Extract(context.Background(), propagation.MapCarrier(*job.Headers)) + ctx = propagator().Extract(ctx, propagation.MapCarrier(*job.Headers)) ctx = context.WithValue(ctx, "LastInstanceID", job.Headers.Get("InstanceID")) ctx, cancelCtx := context.WithCancel(ctx) q.listenForStopRequests(context.Background(), cancelCtx, job) - newJob := Job{ - Headers: job.Headers, + return ctx, Job{ + Headers: job.Headers, + Test: q.resolveTest(ctx, job), + Run: q.resolveTestRun(ctx, job), + TestSuite: q.resolveTestSuite(ctx, job), + TestSuiteRun: q.resolveTestSuiteRun(ctx, job), + PollingProfile: q.resolvePollingProfile(ctx, job), + DataStore: q.resolveDataStore(ctx, job), } - newJob.Test = q.resolveTest(ctx, job) - // todo: revert when using actual queues - newJob.Run = q.resolveTestRun(ctx, job) - // todo: change the otlp server to have its own table - // newJob.Run = job.Run - - newJob.TestSuite = q.resolveTestSuite(ctx, job) - newJob.TestSuiteRun = q.resolveTestSuiteRun(ctx, job) - - newJob.PollingProfile = q.resolvePollingProfile(ctx, job) - newJob.DataStore = q.resolveDataStore(ctx, job) - - // Process the item with cancellation monitoring - select { - default: - case <-ctx.Done(): - return - } - - q.workerPool.Submit(func() { - log.Printf("queue: submit to processItem fn for run %d", job.Run.ID) - q.itemProcessor.ProcessItem(ctx, newJob) - }) -} -func (q *Queue) Stop() { - q.workerPool.StopAndWait() } type StopRequest struct { diff --git a/server/executor/queue_driver_in_memory.go b/server/executor/queue_driver_in_memory.go deleted file mode 100644 index 1a2256bb3d..0000000000 --- a/server/executor/queue_driver_in_memory.go +++ /dev/null @@ -1,59 +0,0 @@ -package executor - -import ( - "fmt" - "log" -) - -type loggerFn func(string, ...any) - -func newLoggerFn(name string) loggerFn { - return func(format string, params ...any) { - log.Printf("[%s] %s", name, fmt.Sprintf(format, params...)) - } -} - -func NewInMemoryQueueDriver(name string) *InMemoryQueueDriver { - return &InMemoryQueueDriver{ - log: newLoggerFn(fmt.Sprintf("InMemoryQueueDriver - %s", name)), - queue: make(chan Job), - exit: make(chan bool), - name: name, - } -} - -type InMemoryQueueDriver struct { - log loggerFn - queue chan Job - exit chan bool - listener Listener - name string -} - -func (qd *InMemoryQueueDriver) SetListener(l Listener) { - qd.listener = l -} - -func (qd InMemoryQueueDriver) Enqueue(job Job) { - qd.queue <- job -} - -func (qd InMemoryQueueDriver) Start() { - go func() { - qd.log("start") - for { - select { - case <-qd.exit: - qd.log("exit") - return - case job := <-qd.queue: - qd.listener.Listen(job) - } - } - }() -} - -func (qd InMemoryQueueDriver) Stop() { - qd.log("stopping") - qd.exit <- true -} diff --git a/server/executor/test_pipeline.go b/server/executor/test_pipeline.go index 893b58b7b8..5fb5c516e2 100644 --- a/server/executor/test_pipeline.go +++ b/server/executor/test_pipeline.go @@ -9,6 +9,7 @@ import ( "github.com/kubeshop/tracetest/server/executor/testrunner" "github.com/kubeshop/tracetest/server/model/events" "github.com/kubeshop/tracetest/server/pkg/id" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/variableset" @@ -16,9 +17,9 @@ import ( ) type TestPipeline struct { - *Pipeline + *pipeline.Pipeline[Job] updatePublisher updatePublisher - assertionQueue Enqueuer + assertionQueue pipeline.Enqueuer[Job] runs runsRepo trGetter testRunnerGetter ppGetter defaultPollingProfileGetter @@ -44,11 +45,11 @@ type updatePublisher interface { } func NewTestPipeline( - pipeline *Pipeline, + pipeline *pipeline.Pipeline[Job], updatePublisher updatePublisher, - assertionQueue Enqueuer, + assertionQueue pipeline.Enqueuer[Job], runs runsRepo, trGetter testRunnerGetter, ppGetter defaultPollingProfileGetter, diff --git a/server/executor/test_suite_runner.go b/server/executor/test_suite_runner.go index f9b001a8f9..d92669a386 100644 --- a/server/executor/test_suite_runner.go +++ b/server/executor/test_suite_runner.go @@ -7,6 +7,7 @@ import ( "github.com/kubeshop/tracetest/server/executor/testrunner" "github.com/kubeshop/tracetest/server/pkg/maps" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/testsuite" @@ -46,7 +47,7 @@ type persistentTransactionRunner struct { subscriptionManager *subscription.Manager } -func (r *persistentTransactionRunner) SetOutputQueue(_ Enqueuer) { +func (r *persistentTransactionRunner) SetOutputQueue(_ pipeline.Enqueuer[Job]) { // this is a no-op, as transaction runner does not need to enqueue anything } diff --git a/server/executor/test_suite_runner_test.go b/server/executor/test_suite_runner_test.go index 57105c5f68..42113923bd 100644 --- a/server/executor/test_suite_runner_test.go +++ b/server/executor/test_suite_runner_test.go @@ -13,6 +13,7 @@ import ( "github.com/kubeshop/tracetest/server/model" "github.com/kubeshop/tracetest/server/pkg/id" "github.com/kubeshop/tracetest/server/pkg/maps" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/testmock" @@ -160,12 +161,12 @@ func runTestSuiteRunnerTest(t *testing.T, withErrors bool, assert func(t *testin runner := executor.NewTestSuiteRunner(testRunner, transactionRunRepo, subscriptionManager) - queueBuilder := executor.NewQueueBuilder(). + queueBuilder := executor.NewQueueConfigurer(). WithTestSuiteGetter(transactionsRepo). WithTestSuiteRunGetter(transactionRunRepo) - pipeline := executor.NewPipeline(queueBuilder, - executor.PipelineStep{Processor: runner, Driver: executor.NewInMemoryQueueDriver("runner")}, + pipeline := pipeline.New(queueBuilder, + pipeline.Step[executor.Job]{Processor: runner, Driver: pipeline.NewInMemoryQueueDriver[executor.Job]("testSuiteRunner")}, ) transactionPipeline := executor.NewTestSuitePipeline(pipeline, transactionRunRepo) diff --git a/server/executor/test_suites_pipeline.go b/server/executor/test_suites_pipeline.go index b54c66f2dd..0a7e45ac47 100644 --- a/server/executor/test_suites_pipeline.go +++ b/server/executor/test_suites_pipeline.go @@ -4,13 +4,14 @@ import ( "context" "github.com/kubeshop/tracetest/server/executor/testrunner" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/testsuite" "github.com/kubeshop/tracetest/server/variableset" ) type TestSuitesPipeline struct { - *Pipeline + *pipeline.Pipeline[Job] runs testSuiteRunRepo } @@ -19,7 +20,7 @@ type testSuiteRunRepo interface { } func NewTestSuitePipeline( - pipeline *Pipeline, + pipeline *pipeline.Pipeline[Job], runs testSuiteRunRepo, ) *TestSuitesPipeline { return &TestSuitesPipeline{ diff --git a/server/executor/trace_poller.go b/server/executor/trace_poller.go index 4ab45bf969..299b7a3a08 100644 --- a/server/executor/trace_poller.go +++ b/server/executor/trace_poller.go @@ -10,6 +10,7 @@ import ( "github.com/kubeshop/tracetest/server/analytics" "github.com/kubeshop/tracetest/server/executor/pollingprofile" "github.com/kubeshop/tracetest/server/model/events" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/tracedb/connection" @@ -80,8 +81,8 @@ type tracePoller struct { pollerExecutor pollerExecutor subscriptionManager *subscription.Manager eventEmitter EventEmitter - inputQueue Enqueuer - outputQueue Enqueuer + inputQueue pipeline.Enqueuer[Job] + outputQueue pipeline.Enqueuer[Job] } func (tp tracePoller) handleDBError(err error) { @@ -103,11 +104,11 @@ func (tp tracePoller) isFirstRequest(job Job) bool { return job.EnqueueCount() == 0 } -func (tp *tracePoller) SetOutputQueue(queue Enqueuer) { +func (tp *tracePoller) SetOutputQueue(queue pipeline.Enqueuer[Job]) { tp.outputQueue = queue } -func (tp *tracePoller) SetInputQueue(queue Enqueuer) { +func (tp *tracePoller) SetInputQueue(queue pipeline.Enqueuer[Job]) { tp.inputQueue = queue } diff --git a/server/executor/trigger_executer_worker.go b/server/executor/trigger_executer_worker.go index 73b1dc3fc1..2552ee41a4 100644 --- a/server/executor/trigger_executer_worker.go +++ b/server/executor/trigger_executer_worker.go @@ -10,6 +10,7 @@ import ( triggerer "github.com/kubeshop/tracetest/server/executor/trigger" "github.com/kubeshop/tracetest/server/model/events" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/test/trigger" "go.opentelemetry.io/otel/trace" @@ -34,10 +35,10 @@ type triggerExecuterWorker struct { updater RunUpdater tracer trace.Tracer eventEmitter EventEmitter - outputQueue Enqueuer + outputQueue pipeline.Enqueuer[Job] } -func (r *triggerExecuterWorker) SetOutputQueue(queue Enqueuer) { +func (r *triggerExecuterWorker) SetOutputQueue(queue pipeline.Enqueuer[Job]) { r.outputQueue = queue } diff --git a/server/executor/trigger_resolver_worker.go b/server/executor/trigger_resolver_worker.go index 435048015d..d615c00814 100644 --- a/server/executor/trigger_resolver_worker.go +++ b/server/executor/trigger_resolver_worker.go @@ -8,6 +8,7 @@ import ( triggerer "github.com/kubeshop/tracetest/server/executor/trigger" "github.com/kubeshop/tracetest/server/expression" "github.com/kubeshop/tracetest/server/model/events" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/test/trigger" "github.com/kubeshop/tracetest/server/tracedb" @@ -43,10 +44,10 @@ type triggerResolverWorker struct { newTraceDBFn tracedb.FactoryFunc dsRepo currentDataStoreGetter eventEmitter EventEmitter - outputQueue Enqueuer + outputQueue pipeline.Enqueuer[Job] } -func (r *triggerResolverWorker) SetOutputQueue(queue Enqueuer) { +func (r *triggerResolverWorker) SetOutputQueue(queue pipeline.Enqueuer[Job]) { r.outputQueue = queue } diff --git a/server/executor/trigger_result_processor_worker.go b/server/executor/trigger_result_processor_worker.go index 080995491a..498317dd27 100644 --- a/server/executor/trigger_result_processor_worker.go +++ b/server/executor/trigger_result_processor_worker.go @@ -7,6 +7,7 @@ import ( "github.com/kubeshop/tracetest/server/analytics" "github.com/kubeshop/tracetest/server/model" "github.com/kubeshop/tracetest/server/model/events" + "github.com/kubeshop/tracetest/server/pkg/pipeline" "github.com/kubeshop/tracetest/server/subscription" "github.com/kubeshop/tracetest/server/test" "github.com/kubeshop/tracetest/server/test/trigger" @@ -36,11 +37,11 @@ type triggerResultProcessorWorker struct { tracer trace.Tracer subscriptionManager *subscription.Manager eventEmitter EventEmitter - outputQueue Enqueuer + outputQueue pipeline.Enqueuer[Job] updater RunUpdater } -func (r *triggerResultProcessorWorker) SetOutputQueue(queue Enqueuer) { +func (r *triggerResultProcessorWorker) SetOutputQueue(queue pipeline.Enqueuer[Job]) { r.outputQueue = queue } diff --git a/server/pkg/pipeline/inmemory_driver.go b/server/pkg/pipeline/inmemory_driver.go new file mode 100644 index 0000000000..2269127a08 --- /dev/null +++ b/server/pkg/pipeline/inmemory_driver.go @@ -0,0 +1,50 @@ +package pipeline + +import ( + "fmt" +) + +func NewInMemoryQueueDriver[T any](name string) *InMemoryQueueDriver[T] { + return &InMemoryQueueDriver[T]{ + log: newLoggerFn(fmt.Sprintf("InMemoryQueueDriver - %s", name)), + queue: make(chan T), + exit: make(chan bool), + name: name, + } +} + +type InMemoryQueueDriver[T any] struct { + log loggerFn + queue chan T + exit chan bool + listener Listener[T] + name string +} + +func (qd *InMemoryQueueDriver[T]) SetListener(l Listener[T]) { + qd.listener = l +} + +func (qd InMemoryQueueDriver[T]) Enqueue(item T) { + qd.queue <- item +} + +func (qd InMemoryQueueDriver[T]) Start() { + go func() { + qd.log("start") + for { + select { + case <-qd.exit: + qd.log("exit") + return + case job := <-qd.queue: + qd.listener.Listen(job) + } + } + }() +} + +func (qd InMemoryQueueDriver[T]) Stop() { + qd.log("stopping") + qd.exit <- true +} diff --git a/server/executor/pipeline.go b/server/pkg/pipeline/pipeline.go similarity index 50% rename from server/executor/pipeline.go rename to server/pkg/pipeline/pipeline.go index 32df2650eb..4413d4a1d2 100644 --- a/server/executor/pipeline.go +++ b/server/pkg/pipeline/pipeline.go @@ -1,49 +1,60 @@ -package executor +package pipeline import ( "context" "fmt" + "log" "reflect" ) -type Pipeline struct { - steps []PipelineStep // N - queues []*Queue // N + 1 +type loggerFn func(string, ...any) + +func newLoggerFn(name string) loggerFn { + return func(format string, params ...any) { + log.Printf("[%s] %s", name, fmt.Sprintf(format, params...)) + } +} + +type Pipeline[T any] struct { + steps []Step[T] // N + queues []*Queue[T] // N + 1 } -type workerDriver interface { - QueueDriver +type workerDriver[T any] interface { + QueueDriver[T] Start() Stop() } -type queueBuilder interface { - Build(QueueDriver, QueueItemProcessor) *Queue +type queueConfigurer[T any] interface { + Configure(*Queue[T]) } -type pipelineStep interface { - QueueItemProcessor - SetOutputQueue(Enqueuer) +type step[T any] interface { + QueueItemProcessor[T] + SetOutputQueue(Enqueuer[T]) } -type InputQueueSetter interface { - SetInputQueue(Enqueuer) +type InputQueueSetter[T any] interface { + SetInputQueue(Enqueuer[T]) } -type PipelineStep struct { - Driver workerDriver - Processor pipelineStep +type Step[T any] struct { + Driver workerDriver[T] + Processor step[T] } -func NewPipeline(builder queueBuilder, steps ...PipelineStep) *Pipeline { - pipeline := &Pipeline{ +func New[T any](cfg queueConfigurer[T], steps ...Step[T]) *Pipeline[T] { + pipeline := &Pipeline[T]{ steps: steps, - queues: make([]*Queue, 0, len(steps)), + queues: make([]*Queue[T], 0, len(steps)), } // setup an input queue for each pipeline step for _, step := range steps { - pipeline.queues = append(pipeline.queues, builder.Build(step.Driver, step.Processor)) + q := NewQueue[T](step.Driver, step.Processor) + cfg.Configure(q) + pipeline.queues = append(pipeline.queues, q) } // set the output queue for each step. the ouput queue of a processor (N) is the input queue of the next one (N+1) @@ -57,7 +68,7 @@ func NewPipeline(builder queueBuilder, steps ...PipelineStep) *Pipeline { // a processor might need to have a reference to its input queue, to requeue items for example. // This can be done if it implements the `InputQueueSetter` interace - if setter, ok := reflect.ValueOf(step.Processor).Interface().(InputQueueSetter); ok { + if setter, ok := reflect.ValueOf(step.Processor).Interface().(InputQueueSetter[T]); ok { setter.SetInputQueue(pipeline.queues[i]) } } @@ -65,7 +76,7 @@ func NewPipeline(builder queueBuilder, steps ...PipelineStep) *Pipeline { return pipeline } -func (p *Pipeline) GetQueueForStep(i int) *Queue { +func (p *Pipeline[T]) GetQueueForStep(i int) *Queue[T] { if i < 0 || i >= len(p.queues) { return nil } @@ -73,21 +84,21 @@ func (p *Pipeline) GetQueueForStep(i int) *Queue { return p.queues[i] } -func (p *Pipeline) Begin(ctx context.Context, job Job) { +func (p *Pipeline[T]) Begin(ctx context.Context, item T) { if len(p.queues) < 1 { // this is a panic instead of an error because this could only happen during development panic(fmt.Errorf("pipeline has no input queue")) } - p.queues[0].Enqueue(ctx, job) + p.queues[0].Enqueue(ctx, item) } -func (p *Pipeline) Start() { +func (p *Pipeline[T]) Start() { for _, step := range p.steps { step.Driver.Start() } } -func (p *Pipeline) Stop() { +func (p *Pipeline[T]) Stop() { for _, step := range p.steps { step.Driver.Stop() } diff --git a/server/executor/queue_driver_postgres.go b/server/pkg/pipeline/postgres_driver.go similarity index 63% rename from server/executor/queue_driver_postgres.go rename to server/pkg/pipeline/postgres_driver.go index d5c43bf5ea..f71ba193a8 100644 --- a/server/executor/queue_driver_postgres.go +++ b/server/pkg/pipeline/postgres_driver.go @@ -1,4 +1,4 @@ -package executor +package pipeline import ( "context" @@ -11,32 +11,34 @@ import ( "github.com/kubeshop/tracetest/server/pkg/id" ) -func NewPostgresQueueDriver(pool *pgxpool.Pool) *PostgresQueueDriver { +func NewPostgresQueueDriver[T any](pool *pgxpool.Pool, channelName string) *postgresQueueDriver[T] { id := id.GenerateID() - return &PostgresQueueDriver{ - log: newLoggerFn("PostgresQueueDriver - " + id.String()), - pool: pool, - channels: map[string]*channel{}, - exit: make(chan bool), + return &postgresQueueDriver[T]{ + log: newLoggerFn("PostgresQueueDriver - " + id.String()), + channelName: channelName, + pool: pool, + channels: map[string]*channel[T]{}, + exit: make(chan bool), } } -// PostgresQueueDriver is a queue driver that uses Postgres LISTEN/NOTIFY +// postgresQueueDriver is a queue driver that uses Postgres LISTEN/NOTIFY // Since each queue needs its own connection, it's not practical/scalable // to create a new Driver instance for each queue. Instead, we create a // single Driver instance and use it to create channels for each queue. // // This driver requires one connection that listens to messages in any queue // and routes them to the correct worker. -type PostgresQueueDriver struct { - log loggerFn - pool *pgxpool.Pool - channels map[string]*channel - running bool - exit chan bool +type postgresQueueDriver[T any] struct { + log loggerFn + channelName string + pool *pgxpool.Pool + channels map[string]*channel[T] + running bool + exit chan bool } -func (qd *PostgresQueueDriver) getChannel(name string) (*channel, error) { +func (qd *postgresQueueDriver[T]) getChannel(name string) (*channel[T], error) { ch, ok := qd.channels[name] if !ok { return nil, fmt.Errorf("channel %s not found", name) @@ -45,14 +47,12 @@ func (qd *PostgresQueueDriver) getChannel(name string) (*channel, error) { return ch, nil } -const pgChannelName = "tracetest_queue" - -type pgJob struct { +type pgJob[T any] struct { Channel string `json:"channel"` - Job Job `json:"job"` + Item T `json:"job"` } -func (qd *PostgresQueueDriver) Start() { +func (qd *postgresQueueDriver[T]) Start() { if qd.running { // we want only 1 worker here qd.log("already running") @@ -60,7 +60,7 @@ func (qd *PostgresQueueDriver) Start() { } qd.running = true - go func(qd *PostgresQueueDriver) { + go func(qd *postgresQueueDriver[T]) { qd.log("start") qd.log("acquiring connection") @@ -82,9 +82,9 @@ func (qd *PostgresQueueDriver) Start() { }(qd) } -func (qd *PostgresQueueDriver) worker(conn *pgxpool.Conn) { +func (qd *postgresQueueDriver[T]) worker(conn *pgxpool.Conn) { qd.log("listening for notifications") - _, err := conn.Exec(context.Background(), "listen "+pgChannelName) + _, err := conn.Exec(context.Background(), "listen "+qd.channelName) if err != nil { qd.log("error listening for notifications: %s", err.Error()) return @@ -96,14 +96,14 @@ func (qd *PostgresQueueDriver) worker(conn *pgxpool.Conn) { return } - job := pgJob{} + job := pgJob[T]{} err = json.Unmarshal([]byte(notification.Payload), &job) if err != nil { qd.log("error unmarshalling pgJob: %s", err.Error()) return } - qd.log("received job for channel: %s, runID: %d", job.Channel, job.Job.Run.ID) + qd.log("received job for channel: %s") channel, err := qd.getChannel(job.Channel) if err != nil { @@ -111,24 +111,23 @@ func (qd *PostgresQueueDriver) worker(conn *pgxpool.Conn) { return } - // spin off so we can keep listening for jobs - channel.listener.Listen(job.Job) - qd.log("spun off job for channel: %s, runID: %d", job.Channel, job.Job.Run.ID) + qd.log("processing job for channel: %s", job.Channel) + channel.listener.Listen(job.Item) } -func (qd *PostgresQueueDriver) Stop() { +func (qd *postgresQueueDriver[T]) Stop() { qd.log("stopping") qd.exit <- true } // Channel registers a new queue channel and returns it -func (qd *PostgresQueueDriver) Channel(name string) *channel { +func (qd *postgresQueueDriver[T]) Channel(name string) *channel[T] { if _, channelNameExists := qd.channels[name]; channelNameExists { panic(fmt.Errorf("channel %s already exists", name)) } - ch := &channel{ - PostgresQueueDriver: qd, + ch := &channel[T]{ + postgresQueueDriver: qd, name: name, log: newLoggerFn(fmt.Sprintf("PostgresQueueDriver - %s", name)), pool: qd.pool, @@ -139,26 +138,26 @@ func (qd *PostgresQueueDriver) Channel(name string) *channel { return ch } -type channel struct { - *PostgresQueueDriver +type channel[T any] struct { + *postgresQueueDriver[T] name string log loggerFn pool *pgxpool.Pool - listener Listener + listener Listener[T] } -func (ch *channel) SetListener(l Listener) { +func (ch *channel[T]) SetListener(l Listener[T]) { ch.listener = l } const enqueueTimeout = 5 * time.Minute -func (ch *channel) Enqueue(job Job) { - ch.log("enqueue job for run %d", job.Run.ID) +func (ch *channel[T]) Enqueue(item T) { + ch.log("enqueue item") - jj, err := json.Marshal(pgJob{ + jj, err := json.Marshal(pgJob[T]{ Channel: ch.name, - Job: job, + Item: item, }) if err != nil { @@ -170,7 +169,7 @@ func (ch *channel) Enqueue(job Job) { defer cancelCtx() conn, err := again.Retry[*pgxpool.Conn](ctx, func(ctx context.Context) (*pgxpool.Conn, error) { - ch.log("trying to acquire connection for run %d", job.Run.ID) + ch.log("trying to acquire connection") return ch.pool.Acquire(context.Background()) }) @@ -178,14 +177,14 @@ func (ch *channel) Enqueue(job Job) { ch.log("error acquiring connection: %s", err.Error()) return } - ch.log("aquired connection for run %d", job.Run.ID) + ch.log("aquired connection for") defer conn.Release() - _, err = conn.Query(ctx, fmt.Sprintf(`select pg_notify('%s', $1)`, pgChannelName), jj) + _, err = conn.Query(ctx, fmt.Sprintf(`select pg_notify('%s', $1)`, ch.postgresQueueDriver.channelName), jj) if err != nil { ch.log("error notifying postgres: %s", err.Error()) return } - ch.log("notified postgres for run %d", job.Run.ID) + ch.log("notified postgres") } diff --git a/server/pkg/pipeline/queue.go b/server/pkg/pipeline/queue.go new file mode 100644 index 0000000000..035421ca8b --- /dev/null +++ b/server/pkg/pipeline/queue.go @@ -0,0 +1,95 @@ +package pipeline + +import ( + "context" + + "github.com/alitto/pond" +) + +type Enqueuer[T any] interface { + Enqueue(context.Context, T) +} + +type QueueItemProcessor[T any] interface { + ProcessItem(context.Context, T) +} +type Listener[T any] interface { + Listen(T) +} + +type QueueDriver[T any] interface { + Enqueue(T) + SetListener(Listener[T]) +} + +type Queue[T any] struct { + driver QueueDriver[T] + itemProcessor QueueItemProcessor[T] + + EnqueuePreprocessorFn func(context.Context, T) T + ListenPreprocessorFn func(context.Context, T) (context.Context, T) + + workerPool *pond.WorkerPool +} + +const ( + QueueWorkerCount = 20 + QueueWorkerBufferSize = QueueWorkerCount * 1_000 // 1k jobs per worker +) + +func NewQueue[T any](driver QueueDriver[T], itemProcessor QueueItemProcessor[T]) *Queue[T] { + queue := &Queue[T]{ + itemProcessor: itemProcessor, + workerPool: pond.New(QueueWorkerCount, QueueWorkerBufferSize), + } + + queue.SetDriver(driver) + + return queue +} + +func (q *Queue[T]) SetDriver(driver QueueDriver[T]) { + q.driver = driver + driver.SetListener(q) +} + +func (q Queue[T]) Enqueue(ctx context.Context, item T) { + select { + default: + case <-ctx.Done(): + return + } + + // use a worker to enqueue the job in case the driver takes a bit to actually enqueue + // this way we release the caller as soon as possible + q.workerPool.Submit(func() { + if q.EnqueuePreprocessorFn != nil { + item = q.EnqueuePreprocessorFn(ctx, item) + } + + q.driver.Enqueue(item) + }) +} + +func (q Queue[T]) Listen(item T) { + ctx := context.Background() + + if q.ListenPreprocessorFn != nil { + ctx, item = q.ListenPreprocessorFn(ctx, item) + } + + // Process the item with cancellation monitoring + select { + default: + case <-ctx.Done(): + return + } + + q.workerPool.Submit(func() { + q.itemProcessor.ProcessItem(ctx, item) + }) +} + +func (q *Queue[T]) Stop() { + q.workerPool.StopAndWait() +}