From 37401bafbdae4e0419b3db63d21ec1162567e26d Mon Sep 17 00:00:00 2001 From: ShashwatDadhich Date: Thu, 9 May 2024 18:21:09 +0530 Subject: [PATCH] dependabot version upgrade --- go.mod | 8 +- go.sum | 31 +++-- .../common-lib/pubsub-lib/JetStreamUtil.go | 5 + .../common-lib/utils/k8s/K8sUtil.go | 40 +++--- .../common-lib/utils/k8s/commonBean/bean.go | 22 ++++ .../utils/k8sObjectsUtil/DockerImageFinder.go | 121 ++++++++++++++++++ .../utils/k8sObjectsUtil/ImageUtil.go | 51 ++++++++ .../golang/protobuf/jsonpb/decode.go | 1 + .../golang/protobuf/jsonpb/encode.go | 1 + .../github.com/golang/protobuf/ptypes/any.go | 7 +- vendor/github.com/google/wire/.gitattributes | 1 + vendor/github.com/google/wire/.travis.yml | 53 -------- vendor/github.com/google/wire/CONTRIBUTING.md | 4 +- vendor/github.com/google/wire/README.md | 4 +- vendor/github.com/google/wire/wire.go | 36 +++--- vendor/golang.org/x/sync/errgroup/errgroup.go | 3 + vendor/golang.org/x/sync/errgroup/go120.go | 1 - .../golang.org/x/sync/errgroup/pre_go120.go | 1 - vendor/modules.txt | 12 +- 19 files changed, 284 insertions(+), 118 deletions(-) create mode 100644 vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/DockerImageFinder.go create mode 100644 vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/ImageUtil.go create mode 100644 vendor/github.com/google/wire/.gitattributes delete mode 100644 vendor/github.com/google/wire/.travis.yml diff --git a/go.mod b/go.mod index 075d8d7a6..f342dc210 100644 --- a/go.mod +++ b/go.mod @@ -6,18 +6,18 @@ require ( //github.com/argoproj/gitops-engine v0.7.1-0.20231013183858-f15cf615b814 github.com/aws/aws-sdk-go v1.44.285 github.com/caarlos0/env v3.5.0+incompatible - github.com/devtron-labs/common-lib v0.0.16-0.20240503082245-7ab933f8381f + github.com/devtron-labs/common-lib v0.0.16-0.20240509124735-240663359542 github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/evanphx/json-patch v5.7.0+incompatible github.com/go-pg/pg v6.15.1+incompatible - github.com/golang/protobuf v1.5.3 - github.com/google/wire v0.5.0 + github.com/golang/protobuf v1.5.4 + github.com/google/wire v0.6.0 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/prometheus/client_golang v1.16.0 github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.21.0 - golang.org/x/sync v0.3.0 + golang.org/x/sync v0.6.0 google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.33.0 helm.sh/helm/v3 v3.14.3 diff --git a/go.sum b/go.sum index 9bf7d8c12..a78972fb1 100644 --- a/go.sum +++ b/go.sum @@ -716,8 +716,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/devtron-labs/authenticator v0.4.31 h1:CEMLek3JnMuH9ULsC6BHNJr+NiyGzBd4lgdSxH2IGnc= github.com/devtron-labs/authenticator v0.4.31/go.mod h1:ozNfT8WcruiSgnUbyp48WVfc41++W6xYXhKFp67lNTU= -github.com/devtron-labs/common-lib v0.0.16-0.20240503082245-7ab933f8381f h1:DcnCVtWaqwL6rptUD2eMaSwQEIL4/VaRWBfjyJbXy4U= -github.com/devtron-labs/common-lib v0.0.16-0.20240503082245-7ab933f8381f/go.mod h1:mzEk3pf4JDXsOPNvCxjoSnsMBTwmt4A73Qc2tobLkZM= +github.com/devtron-labs/common-lib v0.0.16-0.20240509124735-240663359542 h1:yCuktNTDqGqn813wX29PmsGTJF8EuiNCrl1cFcNhY34= +github.com/devtron-labs/common-lib v0.0.16-0.20240509124735-240663359542/go.mod h1:Kd0C3v9ulmQfpmq17w/gJfToZ4JrfUGp5haptczHUxE= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= @@ -873,8 +873,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= @@ -935,13 +936,13 @@ github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkj github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= -github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= +github.com/google/wire v0.6.0 h1:HBkoIh4BdSxoyo9PveV8giw7ZsaBOvzWKfcg/6MrVwI= +github.com/google/wire v0.6.0/go.mod h1:F4QhpQ9EDIdJ1Mbop/NZBRB+5yrR6qg3BnctaoUk6NA= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -1348,7 +1349,9 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1411,8 +1414,9 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1482,7 +1486,9 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1534,8 +1540,9 @@ golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1633,6 +1640,7 @@ golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1648,7 +1656,9 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1687,7 +1697,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1750,8 +1759,10 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go b/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go index 711316cba..93af19e66 100644 --- a/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go +++ b/vendor/github.com/devtron-labs/common-lib/pubsub-lib/JetStreamUtil.go @@ -101,6 +101,9 @@ const ( CD_PIPELINE_DELETE_EVENT_TOPIC string = "CD-PIPELINE-DELETE-EVENT" CD_PIPELINE_DELETE_EVENT_GROUP string = "CD-PIPELINE-DELETE-EVENT-GROUP" CD_PIPELINE_DELETE_EVENT_DURABLE string = "CD-PIPELINE-DELETE-EVENT-DURABLE" + CHART_SCAN_TOPIC string = "CHART-SCAN-TOPIC" + CHART_SCAN_GROUP string = "CHART-SCAN-GROUP" + CHART_SCAN_DURABLE string = "CHART-SCAN-DURABLE" ) type NatsTopic struct { @@ -147,6 +150,7 @@ var natsTopicMapping = map[string]NatsTopic{ CD_STAGE_SUCCESS_EVENT_TOPIC: {topicName: CD_STAGE_SUCCESS_EVENT_TOPIC, streamName: ORCHESTRATOR_STREAM, queueName: CD_STAGE_SUCCESS_EVENT_GROUP, consumerName: CD_STAGE_SUCCESS_EVENT_DURABLE}, CD_PIPELINE_DELETE_EVENT_TOPIC: {topicName: CD_PIPELINE_DELETE_EVENT_TOPIC, streamName: ORCHESTRATOR_STREAM, queueName: CD_PIPELINE_DELETE_EVENT_GROUP, consumerName: CD_PIPELINE_DELETE_EVENT_DURABLE}, + CHART_SCAN_TOPIC: {topicName: CHART_SCAN_TOPIC, streamName: ORCHESTRATOR_STREAM, queueName: CHART_SCAN_GROUP, consumerName: CHART_SCAN_DURABLE}, } var NatsStreamWiseConfigMapping = map[string]NatsStreamConfig{ @@ -242,6 +246,7 @@ func ParseAndFillStreamWiseAndConsumerWiseConfigMaps() error { err = env.Parse(&defaultConfig) if err != nil { log.Print("error while parsing config from environment params", "err", err) + return err } // default stream and consumer config values diff --git a/vendor/github.com/devtron-labs/common-lib/utils/k8s/K8sUtil.go b/vendor/github.com/devtron-labs/common-lib/utils/k8s/K8sUtil.go index 1900c5452..f6d1efb3c 100644 --- a/vendor/github.com/devtron-labs/common-lib/utils/k8s/K8sUtil.go +++ b/vendor/github.com/devtron-labs/common-lib/utils/k8s/K8sUtil.go @@ -128,8 +128,8 @@ type K8sService interface { GetApiResources(restConfig *rest.Config, includeOnlyVerb string) ([]*K8sApiResource, error) CreateResources(ctx context.Context, restConfig *rest.Config, manifest string, gvk schema.GroupVersionKind, namespace string) (*ManifestResponse, error) PatchResourceRequest(ctx context.Context, restConfig *rest.Config, pt types.PatchType, manifest string, name string, namespace string, gvk schema.GroupVersionKind) (*ManifestResponse, error) - GetResourceList(ctx context.Context, restConfig *rest.Config, gvk schema.GroupVersionKind, namespace string) (*ResourceListResponse, bool, error) - GetResourceIfWithAcceptHeader(restConfig *rest.Config, groupVersionKind schema.GroupVersionKind) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error) + GetResourceList(ctx context.Context, restConfig *rest.Config, gvk schema.GroupVersionKind, namespace string, asTable bool, listOptions *metav1.ListOptions) (*ResourceListResponse, bool, error) + GetResourceIfWithAcceptHeader(restConfig *rest.Config, groupVersionKind schema.GroupVersionKind, asTable bool) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error) GetPodLogs(ctx context.Context, restConfig *rest.Config, name string, namespace string, sinceTime *metav1.Time, tailLines int, sinceSeconds int, follow bool, containerName string, isPrevContainerLogsEnabled bool) (io.ReadCloser, error) ListEvents(restConfig *rest.Config, namespace string, groupVersionKind schema.GroupVersionKind, ctx context.Context, name string) (*v1.EventList, error) GetResourceIf(restConfig *rest.Config, groupVersionKind schema.GroupVersionKind) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error) @@ -1243,7 +1243,7 @@ func (impl K8sServiceImpl) GetPodLogs(ctx context.Context, restConfig *rest.Conf } return stream, nil } -func (impl K8sServiceImpl) GetResourceIfWithAcceptHeader(restConfig *rest.Config, groupVersionKind schema.GroupVersionKind) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error) { +func (impl K8sServiceImpl) GetResourceIfWithAcceptHeader(restConfig *rest.Config, groupVersionKind schema.GroupVersionKind, asTable bool) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error) { httpClient, err := OverrideK8sHttpClientWithTracer(restConfig) if err != nil { impl.logger.Errorw("error in getting http client", "err", err) @@ -1261,12 +1261,14 @@ func (impl K8sServiceImpl) GetResourceIfWithAcceptHeader(restConfig *rest.Config } resource := groupVersionKind.GroupVersion().WithResource(apiResource.Name) wt := restConfig.WrapTransport // Reference: https://github.com/kubernetes/client-go/issues/407 - restConfig.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { - if wt != nil { - rt = wt(rt) - } - return &http2.HeaderAdder{ - Rt: rt, + if asTable { + restConfig.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { + if wt != nil { + rt = wt(rt) + } + return &http2.HeaderAdder{ + Rt: rt, + } } } httpClient, err = OverrideK8sHttpClientWithTracer(restConfig) @@ -1294,23 +1296,25 @@ func ServerResourceForGroupVersionKind(discoveryClient discovery.DiscoveryInterf } return nil, errors.NewNotFound(schema.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, "") } -func (impl K8sServiceImpl) GetResourceList(ctx context.Context, restConfig *rest.Config, gvk schema.GroupVersionKind, namespace string) (*ResourceListResponse, bool, error) { - resourceIf, namespaced, err := impl.GetResourceIfWithAcceptHeader(restConfig, gvk) +func (impl K8sServiceImpl) GetResourceList(ctx context.Context, restConfig *rest.Config, gvk schema.GroupVersionKind, namespace string, asTable bool, listOptions *metav1.ListOptions) (*ResourceListResponse, bool, error) { + resourceIf, namespaced, err := impl.GetResourceIfWithAcceptHeader(restConfig, gvk, asTable) if err != nil { impl.logger.Errorw("error in getting dynamic interface for resource", "err", err, "namespace", namespace) return nil, namespaced, err } var resp *unstructured.UnstructuredList - listOptions := metav1.ListOptions{ - TypeMeta: metav1.TypeMeta{ - Kind: gvk.Kind, - APIVersion: gvk.GroupVersion().String(), - }, + if listOptions == nil { + listOptions = &metav1.ListOptions{ + TypeMeta: metav1.TypeMeta{ + Kind: gvk.Kind, + APIVersion: gvk.GroupVersion().String(), + }, + } } if len(namespace) > 0 && namespaced { - resp, err = resourceIf.Namespace(namespace).List(ctx, listOptions) + resp, err = resourceIf.Namespace(namespace).List(ctx, *listOptions) } else { - resp, err = resourceIf.List(ctx, listOptions) + resp, err = resourceIf.List(ctx, *listOptions) } if err != nil { impl.logger.Errorw("error in getting resource", "err", err, "namespace", namespace) diff --git a/vendor/github.com/devtron-labs/common-lib/utils/k8s/commonBean/bean.go b/vendor/github.com/devtron-labs/common-lib/utils/k8s/commonBean/bean.go index cea57955f..a5ef4afc5 100644 --- a/vendor/github.com/devtron-labs/common-lib/utils/k8s/commonBean/bean.go +++ b/vendor/github.com/devtron-labs/common-lib/utils/k8s/commonBean/bean.go @@ -24,12 +24,34 @@ const ( NamespaceKind = "Namespace" HorizontalPodAutoscalerKind = "HorizontalPodAutoscaler" Spec = "spec" + Template = "template" + JobTemplate = "jobTemplate" Ports = "ports" Port = "port" Subsets = "subsets" Nodes = "nodes" + Containers = "containers" + InitContainers = "initContainers" + EphemeralContainers = "ephemeralContainers" + Image = "image" ) +var defaultContainerPath = []string{Spec, Template, Spec} +var cronJobContainerPath = []string{Spec, JobTemplate, Spec, Template, Spec} +var podContainerPath = []string{Spec} + +var kindToPath = map[string][]string{ + PodKind: podContainerPath, + K8sClusterResourceCronJobKind: cronJobContainerPath, +} + +func GetContainerSubPathForKind(kind string) []string { + if path, ok := kindToPath[kind]; ok { + return path + } + return defaultContainerPath +} + const ( PersistentVolumeClaimsResourceType = "persistentvolumeclaims" StatefulSetsResourceType = "statefulsets" diff --git a/vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/DockerImageFinder.go b/vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/DockerImageFinder.go new file mode 100644 index 000000000..e4a858d51 --- /dev/null +++ b/vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/DockerImageFinder.go @@ -0,0 +1,121 @@ +package k8sObjectsUtil + +import ( + k8sCommonBean "github.com/devtron-labs/common-lib/utils/k8s/commonBean" + appsV1 "k8s.io/api/apps/v1" + batchV1 "k8s.io/api/batch/v1" + coreV1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func ExtractAllDockerImages(manifests []unstructured.Unstructured) ([]string, error) { + var dockerImages []string + for _, manifest := range manifests { + switch manifest.GroupVersionKind() { + case schema.GroupVersionKind{Group: "", Version: "v1", Kind: k8sCommonBean.PodKind}: + var pod coreV1.Pod + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &pod) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(pod.Spec)...) + case schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: k8sCommonBean.DeploymentKind}: + var deployment appsV1.Deployment + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &deployment) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(deployment.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: k8sCommonBean.ReplicaSetKind}: + var replicaSet appsV1.ReplicaSet + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &replicaSet) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(replicaSet.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: k8sCommonBean.StatefulSetKind}: + var statefulSet appsV1.StatefulSet + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &statefulSet) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(statefulSet.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: k8sCommonBean.DaemonSetKind}: + var daemonSet appsV1.DaemonSet + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &daemonSet) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(daemonSet.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: k8sCommonBean.JobKind}: + var job batchV1.Job + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &job) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(job.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "CronJob"}: + var cronJob batchV1.CronJob + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &cronJob) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(cronJob.Spec.JobTemplate.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ReplicationController"}: + var replicationController coreV1.ReplicationController + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &replicationController) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromPodTemplate(replicationController.Spec.Template.Spec)...) + case schema.GroupVersionKind{Group: "argoproj.io", Version: "v1alpha1", Kind: "Rollout"}: + var rolloutSpec map[string]interface{} + err := runtime.DefaultUnstructuredConverter.FromUnstructured(manifest.UnstructuredContent(), &rolloutSpec) + if err != nil { + return nil, err + } + dockerImages = append(dockerImages, extractImagesFromRolloutTemplate(rolloutSpec)...) + } + } + + return dockerImages, nil +} + +func extractImagesFromPodTemplate(podSpec coreV1.PodSpec) []string { + var dockerImages []string + for _, container := range podSpec.Containers { + dockerImages = append(dockerImages, container.Image) + } + for _, initContainer := range podSpec.InitContainers { + dockerImages = append(dockerImages, initContainer.Image) + } + for _, ephContainer := range podSpec.EphemeralContainers { + dockerImages = append(dockerImages, ephContainer.Image) + } + + return dockerImages +} + +func extractImagesFromRolloutTemplate(rolloutSpec map[string]interface{}) []string { + var dockerImages []string + if rolloutSpec != nil && rolloutSpec["spec"] != nil { + spec := rolloutSpec["spec"].(map[string]interface{}) + if spec != nil && spec["template"] != nil { + template := spec["template"].(map[string]interface{}) + if template != nil && template["spec"] != nil { + templateSpec := template["spec"].(map[string]interface{}) + if templateSpec != nil && templateSpec["containers"] != nil { + containers := templateSpec["containers"].([]interface{}) + for _, item := range containers { + container := item.(map[string]interface{}) + images := container["image"].(interface{}) + dockerImages = append(dockerImages, images.(string)) + } + } + } + } + } + return dockerImages +} diff --git a/vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/ImageUtil.go b/vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/ImageUtil.go new file mode 100644 index 000000000..54700f243 --- /dev/null +++ b/vendor/github.com/devtron-labs/common-lib/utils/k8sObjectsUtil/ImageUtil.go @@ -0,0 +1,51 @@ +package k8sObjectsUtil + +import ( + "github.com/devtron-labs/common-lib/utils/k8s/commonBean" + yamlUtil "github.com/devtron-labs/common-lib/utils/yaml" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" +) + +func getPath(item string, path []string) []string { + return append(path, item) +} + +func ExtractImages(obj unstructured.Unstructured) []string { + images := make([]string, 0) + + subPath := commonBean.GetContainerSubPathForKind(obj.GetKind()) + allContainers := make([]interface{}, 0) + containers, _, _ := unstructured.NestedSlice(obj.Object, getPath(commonBean.Containers, subPath)...) + if len(containers) > 0 { + allContainers = append(allContainers, containers...) + } + iContainers, _, _ := unstructured.NestedSlice(obj.Object, getPath(commonBean.InitContainers, subPath)...) + if len(iContainers) > 0 { + allContainers = append(allContainers, iContainers...) + } + ephContainers, _, _ := unstructured.NestedSlice(obj.Object, getPath(commonBean.EphemeralContainers, subPath)...) + if len(ephContainers) > 0 { + allContainers = append(allContainers, ephContainers...) + } + for _, container := range allContainers { + containerMap := container.(map[string]interface{}) + if image, ok := containerMap[commonBean.Image].(string); ok { + images = append(images, image) + } + } + return images +} + +func ExtractImageFromManifestYaml(manifestYaml string) []string { + var dockerImagesFinal []string + parsedManifests, err := yamlUtil.SplitYAMLs([]byte(manifestYaml)) + if err != nil { + + return dockerImagesFinal + } + for _, manifest := range parsedManifests { + dockerImages := ExtractImages(manifest) + dockerImagesFinal = append(dockerImagesFinal, dockerImages...) + } + return dockerImagesFinal +} diff --git a/vendor/github.com/golang/protobuf/jsonpb/decode.go b/vendor/github.com/golang/protobuf/jsonpb/decode.go index 6c16c255f..c6f66f103 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/decode.go +++ b/vendor/github.com/golang/protobuf/jsonpb/decode.go @@ -56,6 +56,7 @@ type Unmarshaler struct { // implement JSONPBMarshaler so that the custom format can be produced. // // The JSON unmarshaling must follow the JSON to proto specification: +// // https://developers.google.com/protocol-buffers/docs/proto3#json // // Deprecated: Custom types should implement protobuf reflection instead. diff --git a/vendor/github.com/golang/protobuf/jsonpb/encode.go b/vendor/github.com/golang/protobuf/jsonpb/encode.go index 685c80a62..e9438a93f 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/encode.go +++ b/vendor/github.com/golang/protobuf/jsonpb/encode.go @@ -55,6 +55,7 @@ type Marshaler struct { // implement JSONPBUnmarshaler so that the custom format can be parsed. // // The JSON marshaling must follow the proto to JSON specification: +// // https://developers.google.com/protocol-buffers/docs/proto3#json // // Deprecated: Custom types should implement protobuf reflection instead. diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go index 85f9f5736..fdff3fdb4 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any.go +++ b/vendor/github.com/golang/protobuf/ptypes/any.go @@ -127,9 +127,10 @@ func Is(any *anypb.Any, m proto.Message) bool { // The allocated message is stored in the embedded proto.Message. // // Example: -// var x ptypes.DynamicAny -// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } -// fmt.Printf("unmarshaled message: %v", x.Message) +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) // // Deprecated: Use the any.UnmarshalNew method instead to unmarshal // the any message contents into a new instance of the underlying message. diff --git a/vendor/github.com/google/wire/.gitattributes b/vendor/github.com/google/wire/.gitattributes new file mode 100644 index 000000000..fcadb2cf9 --- /dev/null +++ b/vendor/github.com/google/wire/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/vendor/github.com/google/wire/.travis.yml b/vendor/github.com/google/wire/.travis.yml deleted file mode 100644 index 680a5003a..000000000 --- a/vendor/github.com/google/wire/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2018 The Wire Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -language: go -go_import_path: github.com/google/wire - -before_install: - # The Bash that comes with OS X is ancient. - # grep is similar: it's not GNU grep, which means commands aren't portable. - # Homebrew installs grep as ggrep if you don't build from source, so it needs - # moving so it takes precedence in the PATH. - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - HOMEBREW_NO_AUTO_UPDATE=1 brew install bash grep; - mv $(brew --prefix)/bin/ggrep $(brew --prefix)/bin/grep; - fi - -install: - # Re-checkout files preserving line feeds. This prevents Windows builds from - # converting \n to \r\n. - - "git config --global core.autocrlf input" - - "git checkout -- ." - -script: - - 'internal/runtests.sh' - -env: - global: - - GO111MODULE=on - - GOPROXY=https://proxy.golang.org - -# When updating Go versions: -# In addition to changing the "go:" versions below, edit the version -# test in internal/runtests.sh. - -jobs: - include: - - go: "1.13.x" - os: linux - - go: "1.13.x" - os: osx - - go: "1.13.x" - os: windows diff --git a/vendor/github.com/google/wire/CONTRIBUTING.md b/vendor/github.com/google/wire/CONTRIBUTING.md index 68445fc46..ee19499f4 100644 --- a/vendor/github.com/google/wire/CONTRIBUTING.md +++ b/vendor/github.com/google/wire/CONTRIBUTING.md @@ -78,11 +78,11 @@ again. If you are submitting code on behalf of your employer, there's a single commit before merging your change. * Check the diffs, write a useful description (including something like `Fixes #123` if it's fixing a bug) and send the PR out. -* [Travis CI](http://travis-ci.com) will run tests against the PR. This should +* Github will run tests against the PR. This should happen within 10 minutes or so. If a test fails, go back to the coding stage and try to fix the test and push the same branch again. You won't need to make a new pull request, the changes will be rolled directly into the PR you - already opened. Wait for Travis again. There is no need to assign a reviewer + already opened. Wait for the tests again. There is no need to assign a reviewer to the PR, the project team will assign someone for review during the standard [triage](#triaging) process. diff --git a/vendor/github.com/google/wire/README.md b/vendor/github.com/google/wire/README.md index 10983be0f..ccafb0e27 100644 --- a/vendor/github.com/google/wire/README.md +++ b/vendor/github.com/google/wire/README.md @@ -1,6 +1,6 @@ # Wire: Automated Initialization in Go -[![Build Status](https://travis-ci.com/google/wire.svg?branch=master)][travis] +[![Build Status](https://github.com/google/wire/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/google/wire/actions) [![godoc](https://godoc.org/github.com/google/wire?status.svg)][godoc] [![Coverage](https://codecov.io/gh/google/wire/branch/master/graph/badge.svg)](https://codecov.io/gh/google/wire) @@ -24,7 +24,7 @@ For an overview, see the [introductory blog post][]. Install Wire by running: ```shell -go get github.com/google/wire/cmd/wire +go install github.com/google/wire/cmd/wire@latest ``` and ensuring that `$GOPATH/bin` is added to your `$PATH`. diff --git a/vendor/github.com/google/wire/wire.go b/vendor/github.com/google/wire/wire.go index fe8edc8c8..6af91dda6 100644 --- a/vendor/github.com/google/wire/wire.go +++ b/vendor/github.com/google/wire/wire.go @@ -156,12 +156,12 @@ type StructProvider struct{} // // For example: // -// type S struct { -// MyFoo *Foo -// MyBar *Bar -// } -// var Set = wire.NewSet(wire.Struct(new(S), "MyFoo")) -> inject only S.MyFoo -// var Set = wire.NewSet(wire.Struct(new(S), "*")) -> inject all fields +// type S struct { +// MyFoo *Foo +// MyBar *Bar +// } +// var Set = wire.NewSet(wire.Struct(new(S), "MyFoo")) -> inject only S.MyFoo +// var Set = wire.NewSet(wire.Struct(new(S), "*")) -> inject all fields func Struct(structType interface{}, fieldNames ...string) StructProvider { return StructProvider{} } @@ -175,22 +175,22 @@ type StructFields struct{} // // The following example would provide Foo and Bar using S.MyFoo and S.MyBar respectively: // -// type S struct { -// MyFoo Foo -// MyBar Bar -// } +// type S struct { +// MyFoo Foo +// MyBar Bar +// } // -// func NewStruct() S { /* ... */ } -// var Set = wire.NewSet(wire.FieldsOf(new(S), "MyFoo", "MyBar")) +// func NewStruct() S { /* ... */ } +// var Set = wire.NewSet(wire.FieldsOf(new(S), "MyFoo", "MyBar")) // -// or +// or // -// func NewStruct() *S { /* ... */ } -// var Set = wire.NewSet(wire.FieldsOf(new(*S), "MyFoo", "MyBar")) +// func NewStruct() *S { /* ... */ } +// var Set = wire.NewSet(wire.FieldsOf(new(*S), "MyFoo", "MyBar")) // -// If the structType argument is a pointer to a pointer to a struct, then FieldsOf -// additionally provides a pointer to each field type (e.g., *Foo and *Bar in the -// example above). +// If the structType argument is a pointer to a pointer to a struct, then FieldsOf +// additionally provides a pointer to each field type (e.g., *Foo and *Bar in the +// example above). func FieldsOf(structType interface{}, fieldNames ...string) StructFields { return StructFields{} } diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go index b18efb743..948a3ee63 100644 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -4,6 +4,9 @@ // Package errgroup provides synchronization, error propagation, and Context // cancelation for groups of goroutines working on subtasks of a common task. +// +// [errgroup.Group] is related to [sync.WaitGroup] but adds handling of tasks +// returning errors. package errgroup import ( diff --git a/vendor/golang.org/x/sync/errgroup/go120.go b/vendor/golang.org/x/sync/errgroup/go120.go index 7d419d376..f93c740b6 100644 --- a/vendor/golang.org/x/sync/errgroup/go120.go +++ b/vendor/golang.org/x/sync/errgroup/go120.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.20 -// +build go1.20 package errgroup diff --git a/vendor/golang.org/x/sync/errgroup/pre_go120.go b/vendor/golang.org/x/sync/errgroup/pre_go120.go index 1795c18ac..88ce33434 100644 --- a/vendor/golang.org/x/sync/errgroup/pre_go120.go +++ b/vendor/golang.org/x/sync/errgroup/pre_go120.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.20 -// +build !go1.20 package errgroup diff --git a/vendor/modules.txt b/vendor/modules.txt index 601a2050c..0117a7a13 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -137,7 +137,7 @@ github.com/davecgh/go-spew/spew github.com/devtron-labs/authenticator/client github.com/devtron-labs/authenticator/jwt github.com/devtron-labs/authenticator/oidc -# github.com/devtron-labs/common-lib v0.0.16-0.20240503082245-7ab933f8381f +# github.com/devtron-labs/common-lib v0.0.16-0.20240509124735-240663359542 ## explicit; go 1.20 github.com/devtron-labs/common-lib/constants github.com/devtron-labs/common-lib/middlewares @@ -277,8 +277,8 @@ github.com/gogo/protobuf/sortkeys # github.com/golang-jwt/jwt/v4 v4.5.0 ## explicit; go 1.16 github.com/golang-jwt/jwt/v4 -# github.com/golang/protobuf v1.5.3 -## explicit; go 1.9 +# github.com/golang/protobuf v1.5.4 +## explicit; go 1.17 github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes @@ -312,7 +312,7 @@ github.com/google/shlex # github.com/google/uuid v1.3.0 ## explicit github.com/google/uuid -# github.com/google/wire v0.5.0 +# github.com/google/wire v0.6.0 ## explicit; go 1.12 github.com/google/wire # github.com/gorilla/mux v1.8.0 @@ -625,8 +625,8 @@ golang.org/x/net/trace ## explicit; go 1.17 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sync v0.3.0 -## explicit; go 1.17 +# golang.org/x/sync v0.6.0 +## explicit; go 1.18 golang.org/x/sync/errgroup golang.org/x/sync/semaphore # golang.org/x/sys v0.18.0